diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 894a9b084c6..bc90d93a7e3 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 ada3c2a5034..43220f724be 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -161,4 +161,6 @@ in { }; }; + python27 = super.python27.override { static = true; }; + }