From 895f51222e9aa87b11028502d3cd2895c1d91dda Mon Sep 17 00:00:00 2001
From: Nikolay Amiantov <ab@fmap.me>
Date: Tue, 16 Feb 2016 17:45:15 +0300
Subject: [PATCH] buildPythonPackage: add installFlags

---
 pkgs/development/python-modules/generic/default.nix | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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