about summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authoradisbladis <adisbladis@gmail.com>2023-12-02 17:47:20 +1300
committeradisbladis <adisbladis@gmail.com>2024-02-18 17:40:42 +1300
commit4d0cca465476a1142c187198c9fe3fcd89aec6d1 (patch)
tree9cd3b8c4a8fbe59ab409a5774c578ad25bb643a3 /pkgs/development/interpreters
parentb9138b7c072f55dcfd7b8c0747c3c4291bd0b28e (diff)
mk-python-derivation: Add build-system argument
Much like the previous commit that adds dependencies &
optional-dependencies this aligns PEP-517 build systems with how they
are defined in PEP-518/PEP-621.

The naming `build-system` (singular) is aligned with upstream Python standards.
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/python/mk-python-derivation.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix
index d06c2e3099aef..074ccbf1bd23a 100644
--- a/pkgs/development/interpreters/python/mk-python-derivation.nix
+++ b/pkgs/development/interpreters/python/mk-python-derivation.nix
@@ -50,6 +50,9 @@
 , dependencies ? []
 , optional-dependencies ? {}
 
+# Python PEP-517 build systems.
+, build-system ? []
+
 # DEPRECATED: use propagatedBuildInputs
 , pythonPath ? []
 
@@ -208,13 +211,16 @@ let
     }
     // lib.optionalAttrs (optional-dependencies != {}) {
       inherit optional-dependencies;
+    }
+    // lib.optionalAttrs (build-system != []) {
+      inherit build-system;
     };
 
   # Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
   self = toPythonModule (stdenv.mkDerivation ((builtins.removeAttrs attrs [
     "disabled" "checkPhase" "checkInputs" "nativeCheckInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "pyproject" "format"
     "disabledTestPaths" "outputs" "stdenv"
-    "dependencies" "optional-dependencies"
+    "dependencies" "optional-dependencies" "build-system"
   ]) // {
 
     name = namePrefix + name_;
@@ -274,7 +280,7 @@ let
       pythonNamespacesHook
     ] ++ lib.optionals withDistOutput [
       pythonOutputDistHook
-    ] ++ nativeBuildInputs;
+    ] ++ nativeBuildInputs ++ build-system;
 
     buildInputs = validatePythonMatches "buildInputs" (buildInputs ++ pythonPath);