nixpkgs/pkgs/top-level/release-python.nix
Silvan Mosberger c1e96ff74f
release*: Support nixpkgsArgs for all release-*.nix files
This is a bit dirty because there's no easy way to propagate these
function arguments while still allowing --arg from the command line
2020-09-11 18:22:01 +02:00

27 lines
798 B
Nix

/*
test for example like this
$ hydra-eval-jobs pkgs/top-level/release-python.nix
*/
{ # The platforms for which we build Nixpkgs.
supportedSystems ? [ "x86_64-linux" ]
, # Attributes passed to nixpkgs. Don't build packages marked as unfree.
nixpkgsArgs ? { config = { allowUnfree = false; inHydra = true; }; }
}:
with import ./release-lib.nix {inherit supportedSystems nixpkgsArgs; };
with lib;
let
packagePython = mapAttrs (name: value:
let res = builtins.tryEval (
if isDerivation value then
value.meta.isBuildPythonPackage or []
else if value.recurseForDerivations or false || value.recurseForRelease or false then
packagePython value
else
[]);
in if res.success then res.value else []
);
in (mapTestOn (packagePython pkgs))