python: make buildRequirements optional

This commit is contained in:
phaer 2022-11-29 14:02:50 +01:00
parent eb88125101
commit 780b9ab83d

View File

@ -37,6 +37,8 @@
(src: src.original or src) (src: src.original or src)
allDependencySources'; allDependencySources';
buildRequirements = lib.concatStringsSep " " (subsystemAttrs.buildRequirements or []);
package = produceDerivation defaultPackageName (buildFunc { package = produceDerivation defaultPackageName (buildFunc {
name = defaultPackageName; name = defaultPackageName;
src = getSource defaultPackageName defaultPackageVersion; src = getSource defaultPackageName defaultPackageVersion;
@ -72,7 +74,7 @@
--no-cache \ --no-cache \
--ignore-installed \ --ignore-installed \
$pipInstallFlags" $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 wheel --verbose --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist .
${python}/bin/python -m pip install $pipInstallFlags .\ ${python}/bin/python -m pip install $pipInstallFlags .\
''; '';