diff options
author | David McFarland <corngood@gmail.com> | 2017-05-23 10:35:52 -0300 |
---|---|---|
committer | David McFarland <corngood@gmail.com> | 2017-06-26 09:26:10 -0300 |
commit | 087c32715b9ed50a45e81fc438f179a899ea96e0 (patch) | |
tree | d9aa1c5b6f6f391cc22ae2f666cce70f18ed0aaf | |
parent | f254af9c1934ad4e1b10853d5478a297f91ed662 (diff) | |
download | nixpkgs-087c32715b9ed50a45e81fc438f179a899ea96e0.tar nixpkgs-087c32715b9ed50a45e81fc438f179a899ea96e0.tar.gz nixpkgs-087c32715b9ed50a45e81fc438f179a899ea96e0.tar.bz2 nixpkgs-087c32715b9ed50a45e81fc438f179a899ea96e0.tar.lz nixpkgs-087c32715b9ed50a45e81fc438f179a899ea96e0.tar.xz nixpkgs-087c32715b9ed50a45e81fc438f179a899ea96e0.tar.zst nixpkgs-087c32715b9ed50a45e81fc438f179a899ea96e0.zip |
python2: copy stub library to output on cygwin
-rw-r--r-- | pkgs/development/interpreters/python/cpython/2.7/default.nix | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index c5fa05651bb..34058c558af 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl +{ stdenv, hostPlatform, fetchurl , bzip2 , gdbm , fetchpatch @@ -69,7 +69,7 @@ let ./glibc-2.25-enosys.patch - ] ++ optionals stdenv.isCygwin [ + ] ++ optionals hostPlatform.isCygwin [ ./2.5.2-ctypes-util-find_library.patch ./2.5.2-tkinter-x11.patch ./2.6.2-ssl-threads.patch @@ -110,7 +110,7 @@ let "--enable-shared" "--with-threads" "--enable-unicode=ucs4" - ] ++ optionals stdenv.isCygwin [ + ] ++ optionals hostPlatform.isCygwin [ "--with-system-ffi" "--with-system-expat" "ac_cv_func_bind_textdomain_codeset=yes" @@ -118,14 +118,14 @@ let "--disable-toolbox-glue" ]; - postConfigure = if stdenv.isCygwin then '' + postConfigure = if hostPlatform.isCygwin then '' sed -i Makefile -e 's,PYTHONPATH="$(srcdir),PYTHONPATH="$(abs_srcdir),' '' else null; buildInputs = optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++ [ bzip2 openssl zlib ] - ++ optionals stdenv.isCygwin [ expat libffi ] + ++ optionals hostPlatform.isCygwin [ expat libffi ] ++ [ db gdbm ncurses sqlite readline ] ++ optionals x11Support [ tcl tk xlibsWrapper libX11 ] ++ optionals stdenv.isDarwin [ CF configd ]; @@ -190,6 +190,8 @@ in stdenv.mkDerivation { find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i - find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i - find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i - + '' + optionalString hostPlatform.isCygwin '' + cp libpython2.7.dll.a $out/lib ''; passthru = let |