···66# * application: Whether this package is a python library or an
77# application which happens to be written in python.
88# * doCheck: Whether to run the test suites.
99-pythonPackages:
1010-{ src, info, meta ? {}, application ? false, doCheck ? true }: let
99+lib: pythonPackages:
1010+{ src, info, meta ? {}, application ? false, doCheck ? true}: let
1111 build = if application
1212 then pythonPackages.buildPythonApplication
1313 else pythonPackages.buildPythonPackage;
···18181919 nativeBuildInputs = map (p: pythonPackages.${p}) (
2020 (info.setup_requires or []) ++
2121- (if doCheck then (info.tests_require or []) else []));
2121+ (lib.optionals doCheck (info.tests_require or []))
2222+ );
22232324 propagatedBuildInputs = map (p: pythonPackages.${p})
2425 (info.install_requires or []);
···4141 useAppleSDKLibs = stdenv.hostPlatform.isAarch64;
42424343 selectAttrs = attrs: names:
4444- lib.listToAttrs (lib.concatMap (n: if attrs ? "${n}" then [(lib.nameValuePair n attrs."${n}")] else []) names);
4444+ lib.listToAttrs (lib.concatMap (n: lib.optionals (attrs ? "${n}") [(lib.nameValuePair n attrs."${n}")]) names);
45454646 chooseLibs = (
4747 # There are differences in which libraries are exported. Avoid evaluation
+1-3
pkgs/top-level/release-haskell.nix
···3939 attrs:
4040 if lib.isDerivation attrs
4141 then [ attrs ]
4242- else if lib.isAttrs attrs
4343- then accumulateDerivations (lib.attrValues attrs)
4444- else []
4242+ else lib.optionals (lib.isAttrs attrs) (accumulateDerivations (lib.attrValues attrs))
4543 ) jobList;
46444745 # names of all subsets of `pkgs.haskell.packages`
+1-1
pkgs/top-level/release-python.nix
···2424 packagePython value
2525 else
2626 []);
2727- in if res.success then res.value else []
2727+ in lib.optionals res.success res.value
2828 );
29293030 jobs = {