2018-12-31 12:59:20 +00:00
|
|
|
{ pkgs, lib }:
|
|
|
|
|
|
|
|
with pkgs;
|
|
|
|
|
|
|
|
(let
|
|
|
|
|
|
|
|
# Common passthru for all Python interpreters.
|
|
|
|
passthruFun =
|
|
|
|
{ implementation
|
|
|
|
, libPrefix
|
|
|
|
, executable
|
|
|
|
, sourceVersion
|
|
|
|
, pythonVersion
|
|
|
|
, packageOverrides
|
|
|
|
, sitePackages
|
|
|
|
, pythonForBuild
|
|
|
|
, self
|
|
|
|
}: let
|
|
|
|
pythonPackages = callPackage ../../../top-level/python-packages.nix {
|
|
|
|
python = self;
|
|
|
|
overrides = packageOverrides;
|
|
|
|
};
|
|
|
|
in rec {
|
|
|
|
isPy27 = pythonVersion == "2.7";
|
|
|
|
isPy33 = pythonVersion == "3.3"; # TODO: remove
|
|
|
|
isPy34 = pythonVersion == "3.4"; # TODO: remove
|
|
|
|
isPy35 = pythonVersion == "3.5";
|
|
|
|
isPy36 = pythonVersion == "3.6";
|
|
|
|
isPy37 = pythonVersion == "3.7";
|
2019-01-04 11:31:42 +00:00
|
|
|
isPy2 = lib.strings.substring 0 1 pythonVersion == "2";
|
|
|
|
isPy3 = lib.strings.substring 0 1 pythonVersion == "3";
|
|
|
|
isPy3k = isPy3;
|
2018-12-31 12:59:20 +00:00
|
|
|
isPyPy = interpreter == "pypy";
|
|
|
|
|
|
|
|
buildEnv = callPackage ./wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
|
|
|
|
withPackages = import ./with-packages.nix { inherit buildEnv pythonPackages;};
|
|
|
|
pkgs = pythonPackages;
|
|
|
|
interpreter = "${self}/bin/${executable}";
|
2019-01-02 19:09:44 +00:00
|
|
|
inherit executable implementation libPrefix pythonVersion sitePackages;
|
2018-12-31 12:59:20 +00:00
|
|
|
inherit sourceVersion;
|
|
|
|
pythonAtLeast = lib.versionAtLeast pythonVersion;
|
|
|
|
pythonOlder = lib.versionOlder pythonVersion;
|
|
|
|
inherit pythonForBuild;
|
|
|
|
};
|
|
|
|
|
|
|
|
in {
|
|
|
|
|
|
|
|
python27 = callPackage ./cpython/2.7 {
|
|
|
|
self = python27;
|
|
|
|
sourceVersion = {
|
|
|
|
major = "2";
|
|
|
|
minor = "7";
|
2019-03-04 07:56:15 +00:00
|
|
|
patch = "16";
|
2018-12-31 12:59:20 +00:00
|
|
|
suffix = "";
|
|
|
|
};
|
2019-03-04 07:56:15 +00:00
|
|
|
sha256 = "1mqfcqp5y8r0bfyr7ppl74n0lig45p9mc4b8adlcpvj74rhfy8pj";
|
2018-12-31 12:59:20 +00:00
|
|
|
inherit (darwin) CF configd;
|
|
|
|
inherit passthruFun;
|
|
|
|
};
|
|
|
|
|
|
|
|
python35 = callPackage ./cpython {
|
|
|
|
self = python35;
|
|
|
|
sourceVersion = {
|
|
|
|
major = "3";
|
|
|
|
minor = "5";
|
2019-03-23 07:42:38 +00:00
|
|
|
patch = "7";
|
2018-12-31 12:59:20 +00:00
|
|
|
suffix = "";
|
|
|
|
};
|
2019-03-23 07:42:38 +00:00
|
|
|
sha256 = "1p67pnp2ca5przx2s45r8m55dcn6f5hsm0l4s1zp7mglkf4r4n18";
|
2018-12-31 12:59:20 +00:00
|
|
|
inherit (darwin) CF configd;
|
|
|
|
inherit passthruFun;
|
|
|
|
};
|
|
|
|
|
|
|
|
python36 = callPackage ./cpython {
|
|
|
|
self = python36;
|
|
|
|
sourceVersion = {
|
|
|
|
major = "3";
|
|
|
|
minor = "6";
|
|
|
|
patch = "8";
|
|
|
|
suffix = "";
|
|
|
|
};
|
|
|
|
sha256 = "14qi6n5gpcjnwy165wi9hkfcmbadc95ny6bxxldknxwmx50n4i1m";
|
|
|
|
inherit (darwin) CF configd;
|
|
|
|
inherit passthruFun;
|
|
|
|
};
|
|
|
|
|
|
|
|
python37 = callPackage ./cpython {
|
|
|
|
self = python37;
|
|
|
|
sourceVersion = {
|
|
|
|
major = "3";
|
|
|
|
minor = "7";
|
2019-03-26 15:24:04 +00:00
|
|
|
patch = "3";
|
2018-12-31 12:59:20 +00:00
|
|
|
suffix = "";
|
|
|
|
};
|
2019-03-26 15:24:04 +00:00
|
|
|
sha256 = "066ka8csjwkycqpgyv424d8hhqhfd7r6svsp4sfcvkylci0baq6s";
|
2018-12-31 12:59:20 +00:00
|
|
|
inherit (darwin) CF configd;
|
|
|
|
inherit passthruFun;
|
|
|
|
};
|
|
|
|
|
2019-01-01 10:34:44 +00:00
|
|
|
pypy27 = callPackage ./pypy {
|
|
|
|
self = pypy27;
|
|
|
|
sourceVersion = {
|
|
|
|
major = "6";
|
|
|
|
minor = "0";
|
|
|
|
patch = "0";
|
|
|
|
};
|
|
|
|
sha256 = "1qjwpc8n68sxxlfg36s5vn1h2gdfvvd6lxvr4lzbvfwhzrgqahsw";
|
|
|
|
pythonVersion = "2.7";
|
|
|
|
db = db.override { dbmSupport = true; };
|
|
|
|
python = python27;
|
|
|
|
inherit passthruFun;
|
|
|
|
};
|
|
|
|
|
2019-01-02 19:09:44 +00:00
|
|
|
pypy35 = callPackage ./pypy {
|
|
|
|
self = pypy35;
|
2019-01-01 10:34:44 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "6";
|
|
|
|
minor = "0";
|
|
|
|
patch = "0";
|
|
|
|
};
|
|
|
|
sha256 = "0lwq8nn0r5yj01bwmkk5p7xvvrp4s550l8184mkmn74d3gphrlwg";
|
|
|
|
pythonVersion = "3.5";
|
|
|
|
db = db.override { dbmSupport = true; };
|
|
|
|
python = python27;
|
|
|
|
inherit passthruFun;
|
|
|
|
};
|
2018-12-31 12:59:20 +00:00
|
|
|
|
2019-01-03 11:00:44 +00:00
|
|
|
pypy27_prebuilt = callPackage ./pypy/prebuilt.nix {
|
|
|
|
# Not included at top-level
|
|
|
|
self = pythonInterpreters.pypy27_prebuilt;
|
|
|
|
sourceVersion = {
|
|
|
|
major = "6";
|
|
|
|
minor = "0";
|
|
|
|
patch = "0";
|
|
|
|
};
|
|
|
|
sha256 = "0rxgnp3fm18b87ln8bbjr13g2fsf4ka4abkaim6m03y9lwmr9gvc"; # linux64
|
|
|
|
pythonVersion = "2.7";
|
|
|
|
inherit passthruFun;
|
|
|
|
ncurses = ncurses5;
|
|
|
|
};
|
|
|
|
|
|
|
|
pypy35_prebuilt = callPackage ./pypy/prebuilt.nix {
|
|
|
|
# Not included at top-level
|
|
|
|
self = pythonInterpreters.pypy35_prebuilt;
|
|
|
|
sourceVersion = {
|
|
|
|
major = "6";
|
|
|
|
minor = "0";
|
|
|
|
patch = "0";
|
|
|
|
};
|
|
|
|
sha256 = "0j3h08s7wpglghasmym3baycpif5jshvmk9rpav4pwwy5clzmzsc"; # linux64
|
|
|
|
pythonVersion = "3.5";
|
|
|
|
inherit passthruFun;
|
|
|
|
ncurses = ncurses5;
|
|
|
|
};
|
|
|
|
|
2019-03-04 07:56:15 +00:00
|
|
|
})
|