summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2016-08-31 11:01:16 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2016-09-01 16:16:31 +0200
commit4f6b6f14726296c1d402f187db995031bccd791f (patch)
tree56b714c2eb6d16e4bfd98f9c64c84fbfbac3c031 /pkgs/development/interpreters
parente9c4d00cacea699c0e23e7c09967dd3fe12edc23 (diff)
downloadnixlib-4f6b6f14726296c1d402f187db995031bccd791f.tar
nixlib-4f6b6f14726296c1d402f187db995031bccd791f.tar.gz
nixlib-4f6b6f14726296c1d402f187db995031bccd791f.tar.bz2
nixlib-4f6b6f14726296c1d402f187db995031bccd791f.tar.lz
nixlib-4f6b6f14726296c1d402f187db995031bccd791f.tar.xz
nixlib-4f6b6f14726296c1d402f187db995031bccd791f.tar.zst
nixlib-4f6b6f14726296c1d402f187db995031bccd791f.zip
pythonPackages: use mkPythonDerivation
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/python/mk-python-derivation.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix
index e46f9afde963..47e55be4bafc 100644
--- a/pkgs/development/interpreters/python/mk-python-derivation.nix
+++ b/pkgs/development/interpreters/python/mk-python-derivation.nix
@@ -13,8 +13,13 @@
 # by default prefix `name` e.g. "python3.3-${name}"
 , namePrefix ? python.libPrefix + "-"
 
+# Dependencies for building the package
 , buildInputs ? []
 
+# Dependencies needed for running the checkPhase.
+# These are added to buildInputs when doCheck = true.
+, checkInputs ? []
+
 # propagate build dependencies so in case we have A -> B -> C,
 # C can import package A propagated by B
 , propagatedBuildInputs ? []
@@ -52,7 +57,8 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled"] // {
 
   buildInputs = [ wrapPython ] ++ buildInputs ++ pythonPath
     ++ [ (ensureNewerSourcesHook { year = "1980"; }) ]
-    ++ (lib.optional (lib.hasSuffix "zip" attrs.src.name or "") unzip);
+    ++ (lib.optional (lib.hasSuffix "zip" attrs.src.name or "") unzip)
+    ++ lib.optionals attrs.doCheck checkInputs;
 
   # propagate python/setuptools to active setup-hook in nix-shell
   propagatedBuildInputs = propagatedBuildInputs ++ [ python setuptools ];