summary refs log tree commit diff
path: root/pkgs/development/interpreters/python/cpython/3.6/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters/python/cpython/3.6/default.nix')
-rw-r--r--pkgs/development/interpreters/python/cpython/3.6/default.nix21
1 files changed, 12 insertions, 9 deletions
diff --git a/pkgs/development/interpreters/python/cpython/3.6/default.nix b/pkgs/development/interpreters/python/cpython/3.6/default.nix
index 3a6635cd8b62..3f25640afeaa 100644
--- a/pkgs/development/interpreters/python/cpython/3.6/default.nix
+++ b/pkgs/development/interpreters/python/cpython/3.6/default.nix
@@ -24,9 +24,11 @@ with stdenv.lib;
 
 let
   majorVersion = "3.6";
+  minorVersion = "0";
+  minorVersionSuffix = "b1";
   pythonVersion = majorVersion;
-  version = "${majorVersion}.0a3";
-  fullVersion = "${version}";
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
+  libPrefix = "python${majorVersion}";
 
   buildInputs = filter (p: p != null) [
     glibc
@@ -46,15 +48,15 @@ let
   ] ++ optionals stdenv.isDarwin [ CF configd ];
 in
 stdenv.mkDerivation {
-  name = "python3-${fullVersion}";
+  name = "python3-${version}";
   pythonVersion = majorVersion;
   inherit majorVersion version;
 
   inherit buildInputs;
 
   src = fetchurl {
-    url = "https://www.python.org/ftp/python/${majorVersion}.0/Python-${fullVersion}.tar.xz";
-    sha256 = "08c3598bwihibwca9lwxq923sjq9shvgv3wxv4vkga2n6hf63l1c";
+    url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
+    sha256 = "0hjdlwkjanjagz4qggbfgal8ggmas26mx2jlgjx1z2mzi950jfx8";
   };
 
   NIX_LDFLAGS = optionalString stdenv.isLinux "-lgcc_s";
@@ -73,8 +75,6 @@ stdenv.mkDerivation {
        export MACOSX_DEPLOYMENT_TARGET=10.6
      ''}
 
-    substituteInPlace ./Lib/plat-generic/regen --replace "/usr/include" ${glibc.dev}/include
-
     configureFlagsArray=( --enable-shared --with-threads
                           CPPFLAGS="${concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs)}"
                           LDFLAGS="${concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs)}"
@@ -98,17 +98,20 @@ stdenv.mkDerivation {
 
     ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}"
     paxmark E $out/bin/python${majorVersion}
+
+    # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+    echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
   '';
 
   passthru = rec {
+    inherit libPrefix;
     zlibSupport = zlib != null;
     sqliteSupport = sqlite != null;
     dbSupport = db != null;
     readlineSupport = readline != null;
     opensslSupport = openssl != null;
     tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
-    libPrefix = "python${majorVersion}";
-    executable = "python${majorVersion}m";
+    executable = "${libPrefix}m";
     buildEnv = callPackage ../../wrapper.nix { python = self; };
     withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python36Packages; };
     isPy3 = true;