diff options
author | Domen Kožar <domen@dev.si> | 2015-11-19 16:39:34 +0100 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2015-11-21 21:44:12 +0100 |
commit | c6c58dc92ddd02b54bc0b999eae09a85bbec6d84 (patch) | |
tree | 9216816d1be09ef802deb75c3e5b6f0be831a979 | |
parent | 686dae7c5081b7160c5a36f442ffba63663bc4e1 (diff) |
release-python.nix: automatically detect buildPythonPackage
-rw-r--r-- | pkgs/development/python-modules/generic/default.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/release-python.nix | 20 |
2 files changed, 15 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index 048576e0741ea..e836ed3f93bb5 100644 --- a/pkgs/development/python-modules/generic/default.nix +++ b/pkgs/development/python-modules/generic/default.nix @@ -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; }; }) diff --git a/pkgs/top-level/release-python.nix b/pkgs/top-level/release-python.nix index 1c654272bb8ec..79bbd9d21a0df 100644 --- a/pkgs/top-level/release-python.nix +++ b/pkgs/top-level/release-python.nix @@ -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)) |