From 4d0cca465476a1142c187198c9fe3fcd89aec6d1 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Sat, 2 Dec 2023 17:47:20 +1300 Subject: 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. --- pkgs/development/interpreters/python/mk-python-derivation.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pkgs/development/interpreters') 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); -- cgit 1.4.1