about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/interpreters/python/cpython/2.7/default.nix4
-rw-r--r--pkgs/top-level/static.nix2
2 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix
index 894a9b084c68..bc90d93a7e3d 100644
--- a/pkgs/development/interpreters/python/cpython/2.7/default.nix
+++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix
@@ -22,6 +22,7 @@
 , sourceVersion
 , sha256
 , passthruFun
+, static ? false
 }:
 
 assert x11Support -> tcl != null
@@ -164,7 +165,8 @@ let
   ]
     # Never even try to use lchmod on linux,
     # don't rely on detecting glibc-isms.
-  ++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no";
+  ++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no"
+  ++ optional static "LDFLAGS=-static";
 
   buildInputs =
     optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix
index ada3c2a5034c..43220f724bec 100644
--- a/pkgs/top-level/static.nix
+++ b/pkgs/top-level/static.nix
@@ -161,4 +161,6 @@ in {
     };
   };
 
+  python27 = super.python27.override { static = true; };
+
 }