diff options
author | Felix Buehler <account@buehler.rocks> | 2023-02-14 19:11:59 +0100 |
---|---|---|
committer | Felix Buehler <account@buehler.rocks> | 2023-02-14 19:11:59 +0100 |
commit | bc3d5934d7f276a21537b40159491257ee163d94 (patch) | |
tree | 53b1d9bd9cb148a0ab34f2fd9e1d94802dde639e /pkgs/build-support/build-setupcfg | |
parent | 3bee4ab8db244db328b41ae5f4fbce19b658f1be (diff) |
treewide: use lib.optionals
Diffstat (limited to 'pkgs/build-support/build-setupcfg')
-rw-r--r-- | pkgs/build-support/build-setupcfg/default.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/build-support/build-setupcfg/default.nix b/pkgs/build-support/build-setupcfg/default.nix index bc6482f0a88e6..5737989249af4 100644 --- a/pkgs/build-support/build-setupcfg/default.nix +++ b/pkgs/build-support/build-setupcfg/default.nix @@ -6,8 +6,8 @@ # * application: Whether this package is a python library or an # application which happens to be written in python. # * doCheck: Whether to run the test suites. -pythonPackages: -{ src, info, meta ? {}, application ? false, doCheck ? true }: let +lib: pythonPackages: +{ src, info, meta ? {}, application ? false, doCheck ? true}: let build = if application then pythonPackages.buildPythonApplication else pythonPackages.buildPythonPackage; @@ -18,7 +18,8 @@ in build { nativeBuildInputs = map (p: pythonPackages.${p}) ( (info.setup_requires or []) ++ - (if doCheck then (info.tests_require or []) else [])); + (lib.optionals doCheck (info.tests_require or [])) + ); propagatedBuildInputs = map (p: pythonPackages.${p}) (info.install_requires or []); |