diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-06-03 12:22:40 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2019-06-03 12:28:25 -0400 |
commit | 9f7bb1f512ba305ed5b0bf0132dd3f50b158a517 (patch) | |
tree | 4a2da79e5161f73b305753a8970c1b4f4e250310 /pkgs | |
parent | 7531309c6e9bf54f864daba2aee1f7272ac46abc (diff) |
python27: add override to build statically
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/interpreters/python/cpython/2.7/default.nix | 4 | ||||
-rw-r--r-- | pkgs/top-level/static.nix | 2 |
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 894a9b084c68b..bc90d93a7e3dd 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 ada3c2a5034c5..43220f724bec6 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -161,4 +161,6 @@ in { }; }; + python27 = super.python27.override { static = true; }; + } |