diff options
Diffstat (limited to 'pkgs/development/python-modules/generic/default.nix')
-rw-r--r-- | pkgs/development/python-modules/generic/default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index 75fb974e7355..4c9c53aab834 100644 --- a/pkgs/development/python-modules/generic/default.nix +++ b/pkgs/development/python-modules/generic/default.nix @@ -34,7 +34,10 @@ # The difference is that `pythonPath' is not propagated to the user # environment. This is preferrable for programs because it doesn't # pollute the user environment. -, pythonPath ? [] +, pythonPath ? [] + +# used to disable derivation, useful for specific python versions +, disabled ? false , meta ? {} @@ -46,8 +49,9 @@ , ... } @ attrs: + # Keep extra attributes from `attrs`, e.g., `patchPhase', etc. -python.stdenv.mkDerivation (attrs // { +if disabled then throw "${name} not supported for interpreter ${python.executable}" else python.stdenv.mkDerivation (attrs // { inherit doCheck; name = namePrefix + name; |