buildPythonPackage: introduce "disabled" argument

Useful to disable the package for specific python versions.

Typically usage: disable = isPy3k;
This commit is contained in:
Domen Kožar
2014-08-24 16:01:21 +02:00
parent fc5f6e4e79
commit 47673e43c9
2 changed files with 12 additions and 2 deletions

View File

@@ -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,6 +49,8 @@
, ... } @ attrs:
assert (!disabled);
# Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
python.stdenv.mkDerivation (attrs // {
inherit doCheck;