release-python.nix: automatically detect buildPythonPackage

This commit is contained in:
Domen Kožar 2015-11-19 16:39:34 +01:00
parent 686dae7c50
commit c6c58dc92d
2 changed files with 15 additions and 7 deletions

View file

@ -127,5 +127,7 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled"] // {
} // meta // {
# add extra maintainer(s) to every package
maintainers = (meta.maintainers or []) ++ [ chaoflow iElectric ];
# a marker for release utilies to discover python packages
isBuildPythonPackage = python.meta.platforms;
};
})

View file

@ -9,12 +9,18 @@
supportedSystems ? [ "x86_64-linux" ]
}:
with import ../../lib;
with import ./release-lib.nix {inherit supportedSystems; };
(mapTestOn {
pypyPackages = packagePlatforms pkgs.pypyPackages;
pythonPackages = packagePlatforms pkgs.pythonPackages;
python33Packages = packagePlatforms pkgs.python33Packages;
python34Packages = packagePlatforms pkgs.python34Packages;
python35Packages = packagePlatforms pkgs.python35Packages;
})
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))