summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2017-09-16 01:16:08 +0300
committerTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2017-09-16 01:16:08 +0300
commita0a8f0ac87349a6eaf09f952805fdf739d8a87f8 (patch)
treed7aefb29488bfa43cf22c1c93141ee2362758791 /pkgs/development/interpreters
parent65445212df63934c8f05d19f5c4a9ecaff92276d (diff)
downloadnixpkgs-a0a8f0ac87349a6eaf09f952805fdf739d8a87f8.tar
nixpkgs-a0a8f0ac87349a6eaf09f952805fdf739d8a87f8.tar.gz
nixpkgs-a0a8f0ac87349a6eaf09f952805fdf739d8a87f8.tar.bz2
nixpkgs-a0a8f0ac87349a6eaf09f952805fdf739d8a87f8.tar.lz
nixpkgs-a0a8f0ac87349a6eaf09f952805fdf739d8a87f8.tar.xz
nixpkgs-a0a8f0ac87349a6eaf09f952805fdf739d8a87f8.tar.zst
nixpkgs-a0a8f0ac87349a6eaf09f952805fdf739d8a87f8.zip
python2: Use system libffi on Aarch64
libffi needs a patch to actually work on aarch64 (or the cffi Python package
fails its testsuite). Of course the bundled version of libffi has the
same bug, so don't use the buggy version on aarch64.

Python3 already uses the system libffi on all platforms. I don't know
why Python2 doesn't.
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/python/cpython/2.7/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix
index f601fbc9808..5f0d8d0655c 100644
--- a/pkgs/development/interpreters/python/cpython/2.7/default.nix
+++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix
@@ -110,8 +110,9 @@ let
     "--enable-shared"
     "--with-threads"
     "--enable-unicode=ucs4"
-  ] ++ optionals hostPlatform.isCygwin [
+  ] ++ optionals (hostPlatform.isCygwin || hostPlatform.isAarch64) [
     "--with-system-ffi"
+  ] ++ optionals hostPlatform.isCygwin [
     "--with-system-expat"
     "ac_cv_func_bind_textdomain_codeset=yes"
   ] ++ optionals stdenv.isDarwin [
@@ -125,7 +126,8 @@ let
   buildInputs =
     optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
     [ bzip2 openssl zlib ]
-    ++ optionals hostPlatform.isCygwin [ expat libffi ]
+    ++ optional (hostPlatform.isCygwin || hostPlatform.isAarch64) libffi
+    ++ optional hostPlatform.isCygwin expat
     ++ [ db gdbm ncurses sqlite readline ]
     ++ optionals x11Support [ tcl tk xlibsWrapper libX11 ]
     ++ optionals stdenv.isDarwin [ CF configd ];