summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFrederik Rietdijk <freddyrietdijk@fridh.nl>2016-02-21 17:49:45 +0100
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2016-02-21 17:49:45 +0100
commit846aa6e77665fba3fb1f1e1eadc7a715f4b4e89d (patch)
tree65455f3fffc1288a6686b3851e941f067218e1a8 /pkgs
parenta6638c62a84a5208251cf40cceade9c472a47217 (diff)
parent696052cb622b718cfe7543126b86d543ba19f43b (diff)
downloadnixlib-846aa6e77665fba3fb1f1e1eadc7a715f4b4e89d.tar
nixlib-846aa6e77665fba3fb1f1e1eadc7a715f4b4e89d.tar.gz
nixlib-846aa6e77665fba3fb1f1e1eadc7a715f4b4e89d.tar.bz2
nixlib-846aa6e77665fba3fb1f1e1eadc7a715f4b4e89d.tar.lz
nixlib-846aa6e77665fba3fb1f1e1eadc7a715f4b4e89d.tar.xz
nixlib-846aa6e77665fba3fb1f1e1eadc7a715f4b4e89d.tar.zst
nixlib-846aa6e77665fba3fb1f1e1eadc7a715f4b4e89d.zip
Merge pull request #13165 from NixOS/python-wip
Python PIP fix, fixes #12190, closes #13035
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/generic/default.nix5
-rw-r--r--pkgs/top-level/python-packages.nix6
2 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix
index 15f369a44f2d..1fdbd4ffc0bd 100644
--- a/pkgs/development/python-modules/generic/default.nix
+++ b/pkgs/development/python-modules/generic/default.nix
@@ -42,6 +42,9 @@
 # generated binaries.
 , makeWrapperArgs ? []
 
+# Additional flags to pass to "pip install".
+, installFlags ? []
+
 , ... } @ attrs:
 
 
@@ -95,7 +98,7 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "doCheck"] //
     export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
 
     pushd dist
-    ${bootstrapped-pip}/bin/pip install *.whl --no-index --prefix=$out --no-cache
+    ${bootstrapped-pip}/bin/pip install *.whl --no-index --prefix=$out --no-cache ${toString installFlags}
     popd
 
     runHook postInstall
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index f925e688933e..df742a5c84cf 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -15067,6 +15067,10 @@ in modules // {
       sha256 = "46f4bd0d8dfd51125a554568d646fe4200a3c2c6c36b9f2d06d2212148439521";
     };
 
+    # pip detects that we already have bootstrapped_pip "installed", so we need
+    # to force it a little.
+    installFlags = [ "--ignore-installed" ];
+
     buildInputs = with self; [ mock scripttest virtualenv pytest ];
   };
 
@@ -15492,7 +15496,7 @@ in modules // {
       ${python.executable} setup.py test
     '';
 
-    installFlags = optional (versionAtLeast protobuf.version "2.6.0") "--cpp_implementation";
+    installFlags = optional (versionAtLeast protobuf.version "2.6.0") "--install-option='--cpp_implementation'";
 
     doCheck = true;