diff --git a/pkgs/development/interpreters/python/3.5/default.nix b/pkgs/development/interpreters/python/3.5/default.nix index d689fdeee4c..2d85a52a2e9 100644 --- a/pkgs/development/interpreters/python/3.5/default.nix +++ b/pkgs/development/interpreters/python/3.5/default.nix @@ -12,6 +12,8 @@ , zlib , callPackage , self + +, CF, configd }: assert readline != null -> ncurses != null; @@ -33,6 +35,8 @@ stdenv.mkDerivation { pythonVersion = majorVersion; inherit majorVersion version; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CF configd ]; + src = fetchurl { url = "http://www.python.org/ftp/python/${version}/Python-${fullVersion}.tar.xz"; sha256 = "14dywb94mci0kqbsji9riyyq8kx0h9ljdjjgxnkfrvm56hbammyn"; @@ -40,6 +44,10 @@ stdenv.mkDerivation { NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s"; + prePatch = stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"' + ''; + preConfigure = '' for i in /usr /sw /opt /pkg; do # improve purity substituteInPlace ./setup.py --replace $i /no-such-path diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f55b0a536d6..e9768fe4eb8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5081,6 +5081,7 @@ let self = python34; }); python35 = hiPrio (callPackage ../development/interpreters/python/3.5 { + inherit (darwin) CF configd; self = python35; }); pypy = callPackage ../development/interpreters/pypy {