diff options
Diffstat (limited to 'pkgs/development/interpreters/python/3.5/default.nix')
-rw-r--r-- | pkgs/development/interpreters/python/3.5/default.nix | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/pkgs/development/interpreters/python/3.5/default.nix b/pkgs/development/interpreters/python/3.5/default.nix index 4bc39f4c2b3a7..087b5988e26af 100644 --- a/pkgs/development/interpreters/python/3.5/default.nix +++ b/pkgs/development/interpreters/python/3.5/default.nix @@ -27,24 +27,36 @@ let fullVersion = "${version}"; buildInputs = filter (p: p != null) [ - zlib bzip2 lzma gdbm sqlite db readline ncurses openssl tcl tk libX11 xproto - ]; + zlib + bzip2 + lzma + gdbm + sqlite + db + readline + ncurses + openssl + tcl + tk + libX11 + xproto + ] ++ optionals stdenv.isDarwin [ CF configd ]; in stdenv.mkDerivation { name = "python3-${fullVersion}"; pythonVersion = majorVersion; inherit majorVersion version; - buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CF configd ]; + inherit buildInputs; src = fetchurl { url = "http://www.python.org/ftp/python/${version}/Python-${fullVersion}.tar.xz"; sha256 = "1j95yx32ggqx8jf13h3c8qfp34ixpyg8ipqcdjmn143d6q67rmf6"; }; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s"; + NIX_LDFLAGS = optionalString stdenv.isLinux "-lgcc_s"; - prePatch = stdenv.lib.optionalString stdenv.isDarwin '' + prePatch = optionalString stdenv.isDarwin '' substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"' ''; @@ -58,8 +70,8 @@ stdenv.mkDerivation { ''} configureFlagsArray=( --enable-shared --with-threads - CPPFLAGS="${concatStringsSep " " (map (p: "-I${p.dev or p}/include") buildInputs)}" - LDFLAGS="${concatStringsSep " " (map (p: "-L${p.lib or (p.out or p)}/lib") buildInputs)}" + CPPFLAGS="${concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs)}" + LDFLAGS="${concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs)}" LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}" ) ''; @@ -113,8 +125,8 @@ stdenv.mkDerivation { hierarchical packages; exception-based error handling; and very high level dynamic data types. ''; - license = stdenv.lib.licenses.psfl; - platforms = with stdenv.lib.platforms; linux ++ darwin; - maintainers = with stdenv.lib.maintainers; [ simons chaoflow iElectric cstrahan ]; + license = licenses.psfl; + platforms = with platforms; linux ++ darwin; + maintainers = with maintainers; [ chaoflow domenkozar cstrahan ]; }; } |