From 780b9ab83da232f4d4cbea67c9edee5ca5b389d6 Mon Sep 17 00:00:00 2001 From: phaer Date: Tue, 29 Nov 2022 14:02:50 +0100 Subject: [PATCH] python: make buildRequirements optional --- src/subsystems/python/builders/simple-python/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/subsystems/python/builders/simple-python/default.nix b/src/subsystems/python/builders/simple-python/default.nix index e4b08e52..b6c30023 100644 --- a/src/subsystems/python/builders/simple-python/default.nix +++ b/src/subsystems/python/builders/simple-python/default.nix @@ -37,6 +37,8 @@ (src: src.original or src) allDependencySources'; + buildRequirements = lib.concatStringsSep " " (subsystemAttrs.buildRequirements or []); + package = produceDerivation defaultPackageName (buildFunc { name = defaultPackageName; src = getSource defaultPackageName defaultPackageVersion; @@ -72,7 +74,7 @@ --no-cache \ --ignore-installed \ $pipInstallFlags" - ${python}/bin/python -m pip install $pipInstallFlags ${lib.concatStringsSep " " subsystemAttrs.buildRequirements} + ${lib.optionalString (buildRequirements != "") "${python}/bin/python -m pip install $pipInstallFlags ${buildRequirements}"} ${python}/bin/python -m pip wheel --verbose --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist . ${python}/bin/python -m pip install $pipInstallFlags .\ '';