2022-10-21 18:38:19 +00:00
|
|
|
{ __splicedPackages
|
|
|
|
, callPackage
|
|
|
|
, config
|
|
|
|
, darwin
|
|
|
|
, db
|
|
|
|
, lib
|
|
|
|
, libffiBoot
|
2023-01-11 07:51:40 +00:00
|
|
|
, makeScopeWithSplicing
|
2022-10-21 18:38:19 +00:00
|
|
|
, pythonPackagesExtensions
|
|
|
|
, stdenv
|
2023-07-15 17:15:38 +00:00
|
|
|
}@args:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
(let
|
|
|
|
|
|
|
|
# Common passthru for all Python interpreters.
|
2023-07-15 17:15:38 +00:00
|
|
|
passthruFun = import ./passthrufun.nix args;
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
sources = {
|
2023-03-04 12:14:45 +00:00
|
|
|
python310 = {
|
2021-07-21 07:28:18 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "3";
|
2023-03-04 12:14:45 +00:00
|
|
|
minor = "10";
|
2023-07-15 17:15:38 +00:00
|
|
|
patch = "12";
|
2021-07-21 07:28:18 +00:00
|
|
|
suffix = "";
|
|
|
|
};
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-r7dL8ZEw56R9EDEsj154TyTgUnmB6raOIFRs+4ZYMLg=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
2023-03-04 12:14:45 +00:00
|
|
|
|
|
|
|
python311 = {
|
2022-02-10 20:34:41 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "3";
|
2023-03-04 12:14:45 +00:00
|
|
|
minor = "11";
|
2023-07-15 17:15:38 +00:00
|
|
|
patch = "4";
|
2022-02-10 20:34:41 +00:00
|
|
|
suffix = "";
|
|
|
|
};
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-Lw5AnfKrV6qfxMvd+5dq9E5OVb9vYZ7ua8XCKXJkp/Y=";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
in {
|
|
|
|
|
|
|
|
python27 = callPackage ./cpython/2.7 {
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.python27;
|
2020-04-24 23:36:52 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "2";
|
|
|
|
minor = "7";
|
|
|
|
patch = "18";
|
2023-01-11 07:51:40 +00:00
|
|
|
suffix = ".6"; # ActiveState's Python 2 extended support
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-+I0QOBkuTHMIQz71lgNn1X1vjPsjJMtFbgC0xcGTwWY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (darwin) configd;
|
|
|
|
inherit passthruFun;
|
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
python38 = callPackage ./cpython {
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.python38;
|
2022-03-30 09:31:56 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "3";
|
|
|
|
minor = "8";
|
2023-07-15 17:15:38 +00:00
|
|
|
patch = "17";
|
2022-03-30 09:31:56 +00:00
|
|
|
suffix = "";
|
|
|
|
};
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-LlSwxoGR8WVS9t4ul6I5ZUBXKiGfa7soWRoTfOzEkKk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (darwin) configd;
|
|
|
|
inherit passthruFun;
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
python39 = callPackage ./cpython {
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.python39;
|
2023-03-04 12:14:45 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "3";
|
|
|
|
minor = "9";
|
2023-07-15 17:15:38 +00:00
|
|
|
patch = "17";
|
2023-03-04 12:14:45 +00:00
|
|
|
suffix = "";
|
|
|
|
};
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-MM4FfETyg/jtk2Bsy9uNUd1Sa9xMYszl4Nwhe/o+jO4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (darwin) configd;
|
|
|
|
inherit passthruFun;
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
python310 = callPackage ./cpython ({
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.python310;
|
2020-10-19 23:25:03 +00:00
|
|
|
inherit (darwin) configd;
|
|
|
|
inherit passthruFun;
|
2022-02-10 20:34:41 +00:00
|
|
|
} // sources.python310);
|
2020-10-19 23:25:03 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
python311 = callPackage ./cpython ({
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.python311;
|
2022-12-17 10:02:37 +00:00
|
|
|
inherit (darwin) configd;
|
|
|
|
inherit passthruFun;
|
2023-03-04 12:14:45 +00:00
|
|
|
} // sources.python311);
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
python312 = callPackage ./cpython {
|
|
|
|
self = __splicedPackages.python312;
|
|
|
|
sourceVersion = {
|
|
|
|
major = "3";
|
|
|
|
minor = "12";
|
|
|
|
patch = "0";
|
2023-08-04 22:07:22 +00:00
|
|
|
suffix = "b4";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-8FcQw2ruWFD1wnab52uAvyEq7DUUOP34rcIMOMg2H6w=";
|
2021-12-26 17:43:05 +00:00
|
|
|
inherit (darwin) configd;
|
|
|
|
inherit passthruFun;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Minimal versions of Python (built without optional dependencies)
|
2021-04-05 15:23:46 +00:00
|
|
|
python3Minimal = (callPackage ./cpython ({
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.python3Minimal;
|
2021-04-05 15:23:46 +00:00
|
|
|
inherit passthruFun;
|
2021-03-09 03:18:52 +00:00
|
|
|
pythonAttr = "python3Minimal";
|
2020-04-24 23:36:52 +00:00
|
|
|
# strip down that python version as much as possible
|
|
|
|
openssl = null;
|
|
|
|
readline = null;
|
|
|
|
ncurses = null;
|
|
|
|
gdbm = null;
|
|
|
|
sqlite = null;
|
|
|
|
configd = null;
|
2021-04-05 15:23:46 +00:00
|
|
|
tzdata = null;
|
2022-10-21 18:38:19 +00:00
|
|
|
libffi = libffiBoot; # without test suite
|
2020-04-24 23:36:52 +00:00
|
|
|
stripConfig = true;
|
|
|
|
stripIdlelib = true;
|
|
|
|
stripTests = true;
|
|
|
|
stripTkinter = true;
|
|
|
|
rebuildBytecode = false;
|
|
|
|
stripBytecode = true;
|
|
|
|
includeSiteCustomize = false;
|
2020-06-18 07:06:33 +00:00
|
|
|
enableOptimizations = false;
|
2021-07-21 07:28:18 +00:00
|
|
|
enableLTO = false;
|
2021-04-05 15:23:46 +00:00
|
|
|
mimetypesSupport = false;
|
2022-06-26 10:26:21 +00:00
|
|
|
} // sources.python310)).overrideAttrs(old: {
|
2022-06-16 17:23:12 +00:00
|
|
|
# TODO(@Artturin): Add this to the main cpython expr
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "python3-minimal";
|
|
|
|
});
|
|
|
|
|
|
|
|
pypy27 = callPackage ./pypy {
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.pypy27;
|
2020-04-24 23:36:52 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "7";
|
2020-08-20 17:08:02 +00:00
|
|
|
minor = "3";
|
2023-01-11 07:51:40 +00:00
|
|
|
patch = "11";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-ERevtmgx2k6m852NIIR4enRon9AineC+MB+e2bJVCTw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
pythonVersion = "2.7";
|
|
|
|
db = db.override { dbmSupport = !stdenv.isDarwin; };
|
2023-01-11 07:51:40 +00:00
|
|
|
python = __splicedPackages.pythonInterpreters.pypy27_prebuilt;
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit passthruFun;
|
|
|
|
inherit (darwin) libunwind;
|
|
|
|
inherit (darwin.apple_sdk.frameworks) Security;
|
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
pypy39 = callPackage ./pypy {
|
|
|
|
self = __splicedPackages.pypy39;
|
2020-04-24 23:36:52 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "7";
|
2020-08-20 17:08:02 +00:00
|
|
|
minor = "3";
|
2023-01-11 07:51:40 +00:00
|
|
|
patch = "11";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-sPMWb7Klqt/VzrnbXN1feSmg7MygK0omwNrgSS98qOo=";
|
2022-10-21 18:38:19 +00:00
|
|
|
pythonVersion = "3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
db = db.override { dbmSupport = !stdenv.isDarwin; };
|
2023-01-11 07:51:40 +00:00
|
|
|
python = __splicedPackages.pypy27;
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit passthruFun;
|
|
|
|
inherit (darwin) libunwind;
|
|
|
|
inherit (darwin.apple_sdk.frameworks) Security;
|
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
pypy38 = __splicedPackages.pypy39.override {
|
|
|
|
self = __splicedPackages.pythonInterpreters.pypy38;
|
|
|
|
pythonVersion = "3.8";
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-TWdpv8pzc06GZv1wUDt86wam4lkRDmFzMbs4mcpOYFg=";
|
2021-12-24 04:21:11 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
pypy37 = throw "pypy37 has been removed from nixpkgs since it is no longer supported upstream"; # Added 2023-01-04
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
pypy27_prebuilt = callPackage ./pypy/prebuilt_2_7.nix {
|
2020-04-24 23:36:52 +00:00
|
|
|
# Not included at top-level
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.pythonInterpreters.pypy27_prebuilt;
|
2020-04-24 23:36:52 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "7";
|
2020-08-20 17:08:02 +00:00
|
|
|
minor = "3";
|
2023-01-11 07:51:40 +00:00
|
|
|
patch = "11";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = {
|
2023-01-11 07:51:40 +00:00
|
|
|
aarch64-linux = "sha256-6pJNod7+kyXvdg4oiwT5hGFOQFWA9TIetqXI9Tm9QVo=";
|
|
|
|
x86_64-linux = "sha256-uo7ZWKkFwHNaTP/yh1wlCJlU3AIOCH2YKw/6W52jFs0=";
|
|
|
|
aarch64-darwin = "sha256-zFaWq0+TzTSBweSZC13t17pgrAYC+hiQ02iImmxb93E=";
|
|
|
|
x86_64-darwin = "sha256-Vt7unCJkD1aGw1udZP2xzjq9BEWD5AePCxccov0qGY4=";
|
|
|
|
}.${stdenv.system};
|
2020-04-24 23:36:52 +00:00
|
|
|
pythonVersion = "2.7";
|
|
|
|
inherit passthruFun;
|
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
pypy39_prebuilt = callPackage ./pypy/prebuilt.nix {
|
2020-04-24 23:36:52 +00:00
|
|
|
# Not included at top-level
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.pythonInterpreters.pypy38_prebuilt;
|
2020-04-24 23:36:52 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "7";
|
2020-08-20 17:08:02 +00:00
|
|
|
minor = "3";
|
2023-01-11 07:51:40 +00:00
|
|
|
patch = "11";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = {
|
2023-01-11 07:51:40 +00:00
|
|
|
aarch64-linux = "sha256-CRddxlLtiV2Y6a1j0haBK/PufjmNkAqb+espBrqDArk=";
|
|
|
|
x86_64-linux = "sha256-1QYXLKEQcSdBdddOnFgcMWZDLQF5sDZHDjuejSDq5YE=";
|
|
|
|
aarch64-darwin = "sha256-ka11APGjlTHb76CzRaPc/5J/+ZcWVOjS6e98WuMR9X4=";
|
|
|
|
x86_64-darwin = "sha256-0z9AsgcJmHJYWv1xhzV1ym6mOKJ9gjvGISOMWuglQu0=";
|
|
|
|
}.${stdenv.system};
|
2022-10-21 18:38:19 +00:00
|
|
|
pythonVersion = "3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit passthruFun;
|
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
rustpython = darwin.apple_sdk_11_0.callPackage ./rustpython/default.nix {
|
|
|
|
inherit (darwin.apple_sdk_11_0.frameworks) SystemConfiguration;
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
})
|