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 | |
parent | 7531309c6e9bf54f864daba2aee1f7272ac46abc (diff) | |
download | nixlib-9f7bb1f512ba305ed5b0bf0132dd3f50b158a517.tar nixlib-9f7bb1f512ba305ed5b0bf0132dd3f50b158a517.tar.gz nixlib-9f7bb1f512ba305ed5b0bf0132dd3f50b158a517.tar.bz2 nixlib-9f7bb1f512ba305ed5b0bf0132dd3f50b158a517.tar.lz nixlib-9f7bb1f512ba305ed5b0bf0132dd3f50b158a517.tar.xz nixlib-9f7bb1f512ba305ed5b0bf0132dd3f50b158a517.tar.zst nixlib-9f7bb1f512ba305ed5b0bf0132dd3f50b158a517.zip |
python27: add override to build statically
-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 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; }; + } |