nixpkgs/pkgs/development/interpreters/python/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

321 lines
9.8 KiB
Nix
Raw Normal View History

pythonInterpreters: get self from __splicedPackages BEFORE: the python derivation did not contain .nativeDrv and .crossDrv because it was not from the __splicedPackages set the python used in mk-python-derivation.nix was for host ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/bhz39ds4v02hn6x4py4mzjyilw4a589h-python3-aarch64-unknown-linux-gnu-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «deri→ ``` AFTER: the python derivation does contain .nativeDrv and .crossDrv because it is from the __splicedPackages set those 2 are what makes nativeBuildInputs and buildInputs function properly the python used in mk-python-derivation.nix is for build ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/hvb9yxgv1133cfhxxd869sibldvv2vdx-python3-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «derivation /nix/store/7vyhynla→ ```
2022-10-15 01:47:23 +00:00
{ __splicedPackages
, callPackage
, config
, darwin
, db
, lib
, libffiBoot
, makeScopeWithSplicing
, pythonPackagesExtensions
, stdenv
}:
(let
# Common passthru for all Python interpreters.
passthruFun =
{ implementation
, libPrefix
, executable
, sourceVersion
, pythonVersion
, packageOverrides
, sitePackages
, hasDistutilsCxxPatch
, pythonOnBuildForBuild
, pythonOnBuildForHost
, pythonOnBuildForTarget
, pythonOnHostForHost
, pythonOnTargetForTarget
, pythonAttr ? null
, self # is pythonOnHostForTarget
}: let
pythonPackages = let
ensurePythonModules = items: let
exceptions = [
stdenv
];
providesSetupHook = lib.attrByPath [ "provides" "setupHook"] false;
valid = value: pythonPackages.hasPythonModule value || providesSetupHook value || lib.elem value exceptions;
func = name: value:
if lib.isDerivation value then
lib.extendDerivation (valid value || throw "${name} should use `buildPythonPackage` or `toPythonModule` if it is to be part of the Python packages set.") {} value
else
value;
in lib.mapAttrs func items;
in ensurePythonModules (callPackage
# Function that when called
# - imports python-packages.nix
# - adds spliced package sets to the package set
# - applies overrides from `packageOverrides` and `pythonPackagesOverlays`.
({ pkgs, stdenv, python, overrides }: let
pythonPackagesFun = import ./python-packages-base.nix {
inherit stdenv pkgs lib;
python = self;
};
otherSplices = {
selfBuildBuild = pythonOnBuildForBuild.pkgs;
selfBuildHost = pythonOnBuildForHost.pkgs;
selfBuildTarget = pythonOnBuildForTarget.pkgs;
selfHostHost = pythonOnHostForHost.pkgs;
selfTargetTarget = pythonOnTargetForTarget.pkgs or {}; # There is no Python TargetTarget.
};
hooks = import ./hooks/default.nix;
keep = lib.extends hooks pythonPackagesFun;
extra = _: {};
2023-02-14 18:11:59 +00:00
optionalExtensions = cond: as: lib.optionals cond as;
pythonExtension = import ../../../top-level/python-packages.nix;
2021-03-24 11:12:48 +00:00
python2Extension = import ../../../top-level/python2-packages.nix;
extensions = lib.composeManyExtensions ([
pythonExtension
] ++ (optionalExtensions (!self.isPy3k) [
python2Extension
]) ++ pythonPackagesExtensions ++ [
overrides
]);
aliases = self: super: lib.optionalAttrs config.allowAliases (import ../../../top-level/python-aliases.nix lib self super);
in makeScopeWithSplicing
otherSplices
keep
extra
(lib.extends (lib.composeExtensions aliases extensions) keep))
{
overrides = packageOverrides;
python = self;
});
in rec {
isPy27 = pythonVersion == "2.7";
isPy37 = pythonVersion == "3.7";
isPy38 = pythonVersion == "3.8";
isPy39 = pythonVersion == "3.9";
2020-10-13 06:28:25 +00:00
isPy310 = pythonVersion == "3.10";
2021-11-13 13:28:38 +00:00
isPy311 = pythonVersion == "3.11";
isPy312 = pythonVersion == "3.12";
isPy2 = lib.strings.substring 0 1 pythonVersion == "2";
isPy3 = lib.strings.substring 0 1 pythonVersion == "3";
isPy3k = isPy3;
isPyPy = lib.hasInfix "pypy" interpreter;
buildEnv = callPackage ./wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
withPackages = import ./with-packages.nix { inherit buildEnv pythonPackages;};
pkgs = pythonPackages;
interpreter = "${self}/bin/${executable}";
inherit executable implementation libPrefix pythonVersion sitePackages;
inherit sourceVersion;
pythonAtLeast = lib.versionAtLeast pythonVersion;
pythonOlder = lib.versionOlder pythonVersion;
inherit hasDistutilsCxxPatch;
# TODO: rename to pythonOnBuild
# Not done immediately because its likely used outside Nixpkgs.
pythonForBuild = pythonOnBuildForHost.override { inherit packageOverrides; self = pythonForBuild; };
tests = callPackage ./tests.nix {
python = self;
};
inherit pythonAttr;
};
sources = {
2022-01-15 08:50:35 +00:00
python310 = {
sourceVersion = {
major = "3";
minor = "10";
patch = "11";
2022-01-15 08:50:35 +00:00
suffix = "";
};
hash = "sha256-PDvDBIMDchyQSgPrgya2Mekh8RzDvimIRWpC8RXa8Ew=";
2021-03-13 14:31:22 +00:00
};
python311 = {
sourceVersion = {
major = "3";
minor = "11";
patch = "3";
suffix = "";
};
hash = "sha256-il25nJYafs8nx1lWGJyWAslodR8R2+riuQDb/xwIW14=";
};
};
in {
python27 = callPackage ./cpython/2.7 {
pythonInterpreters: get self from __splicedPackages BEFORE: the python derivation did not contain .nativeDrv and .crossDrv because it was not from the __splicedPackages set the python used in mk-python-derivation.nix was for host ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/bhz39ds4v02hn6x4py4mzjyilw4a589h-python3-aarch64-unknown-linux-gnu-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «deri→ ``` AFTER: the python derivation does contain .nativeDrv and .crossDrv because it is from the __splicedPackages set those 2 are what makes nativeBuildInputs and buildInputs function properly the python used in mk-python-derivation.nix is for build ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/hvb9yxgv1133cfhxxd869sibldvv2vdx-python3-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «derivation /nix/store/7vyhynla→ ```
2022-10-15 01:47:23 +00:00
self = __splicedPackages.python27;
sourceVersion = {
major = "2";
minor = "7";
2020-04-21 06:30:23 +00:00
patch = "18";
2023-01-04 21:12:03 +00:00
suffix = ".6"; # ActiveState's Python 2 extended support
};
hash = "sha256-+I0QOBkuTHMIQz71lgNn1X1vjPsjJMtFbgC0xcGTwWY=";
inherit (darwin) configd;
inherit passthruFun;
};
python38 = callPackage ./cpython {
pythonInterpreters: get self from __splicedPackages BEFORE: the python derivation did not contain .nativeDrv and .crossDrv because it was not from the __splicedPackages set the python used in mk-python-derivation.nix was for host ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/bhz39ds4v02hn6x4py4mzjyilw4a589h-python3-aarch64-unknown-linux-gnu-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «deri→ ``` AFTER: the python derivation does contain .nativeDrv and .crossDrv because it is from the __splicedPackages set those 2 are what makes nativeBuildInputs and buildInputs function properly the python used in mk-python-derivation.nix is for build ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/hvb9yxgv1133cfhxxd869sibldvv2vdx-python3-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «derivation /nix/store/7vyhynla→ ```
2022-10-15 01:47:23 +00:00
self = __splicedPackages.python38;
sourceVersion = {
major = "3";
minor = "8";
patch = "16";
suffix = "";
};
hash = "sha256-2F27N3QTJHPYCB3LFY80oQzK16kLlsflDqS7YfXORWI=";
inherit (darwin) configd;
2019-07-09 13:19:19 +00:00
inherit passthruFun;
};
2019-07-09 13:19:19 +00:00
2023-02-08 21:55:50 +00:00
python39 = callPackage ./cpython {
pythonInterpreters: get self from __splicedPackages BEFORE: the python derivation did not contain .nativeDrv and .crossDrv because it was not from the __splicedPackages set the python used in mk-python-derivation.nix was for host ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/bhz39ds4v02hn6x4py4mzjyilw4a589h-python3-aarch64-unknown-linux-gnu-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «deri→ ``` AFTER: the python derivation does contain .nativeDrv and .crossDrv because it is from the __splicedPackages set those 2 are what makes nativeBuildInputs and buildInputs function properly the python used in mk-python-derivation.nix is for build ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/hvb9yxgv1133cfhxxd869sibldvv2vdx-python3-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «derivation /nix/store/7vyhynla→ ```
2022-10-15 01:47:23 +00:00
self = __splicedPackages.python39;
2023-02-08 21:55:50 +00:00
sourceVersion = {
major = "3";
minor = "9";
patch = "16";
suffix = "";
};
hash = "sha256-It3cCZJG3SdgZlVh6K23OU6gzEOnJoTGSA+TgPd4ZDk=";
inherit (darwin) configd;
inherit passthruFun;
2023-02-08 21:55:50 +00:00
};
2022-01-15 08:50:35 +00:00
python310 = callPackage ./cpython ({
pythonInterpreters: get self from __splicedPackages BEFORE: the python derivation did not contain .nativeDrv and .crossDrv because it was not from the __splicedPackages set the python used in mk-python-derivation.nix was for host ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/bhz39ds4v02hn6x4py4mzjyilw4a589h-python3-aarch64-unknown-linux-gnu-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «deri→ ``` AFTER: the python derivation does contain .nativeDrv and .crossDrv because it is from the __splicedPackages set those 2 are what makes nativeBuildInputs and buildInputs function properly the python used in mk-python-derivation.nix is for build ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/hvb9yxgv1133cfhxxd869sibldvv2vdx-python3-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «derivation /nix/store/7vyhynla→ ```
2022-10-15 01:47:23 +00:00
self = __splicedPackages.python310;
2020-10-13 06:28:25 +00:00
inherit (darwin) configd;
inherit passthruFun;
2022-01-15 08:50:35 +00:00
} // sources.python310);
2020-10-13 06:28:25 +00:00
python311 = callPackage ./cpython ({
pythonInterpreters: get self from __splicedPackages BEFORE: the python derivation did not contain .nativeDrv and .crossDrv because it was not from the __splicedPackages set the python used in mk-python-derivation.nix was for host ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/bhz39ds4v02hn6x4py4mzjyilw4a589h-python3-aarch64-unknown-linux-gnu-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «deri→ ``` AFTER: the python derivation does contain .nativeDrv and .crossDrv because it is from the __splicedPackages set those 2 are what makes nativeBuildInputs and buildInputs function properly the python used in mk-python-derivation.nix is for build ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/hvb9yxgv1133cfhxxd869sibldvv2vdx-python3-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «derivation /nix/store/7vyhynla→ ```
2022-10-15 01:47:23 +00:00
self = __splicedPackages.python311;
2021-11-13 13:28:38 +00:00
inherit (darwin) configd;
inherit passthruFun;
} // sources.python311);
2021-11-13 13:28:38 +00:00
python312 = callPackage ./cpython {
self = __splicedPackages.python312;
sourceVersion = {
major = "3";
minor = "12";
patch = "0";
suffix = "a7";
};
hash = "sha256-oZrk3Fr+vf9eExI0bxYAYqEeDb1fnmimqYHqN7IWCOE=";
inherit (darwin) configd;
inherit passthruFun;
};
# Minimal versions of Python (built without optional dependencies)
python3Minimal = (callPackage ./cpython ({
pythonInterpreters: get self from __splicedPackages BEFORE: the python derivation did not contain .nativeDrv and .crossDrv because it was not from the __splicedPackages set the python used in mk-python-derivation.nix was for host ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/bhz39ds4v02hn6x4py4mzjyilw4a589h-python3-aarch64-unknown-linux-gnu-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «deri→ ``` AFTER: the python derivation does contain .nativeDrv and .crossDrv because it is from the __splicedPackages set those 2 are what makes nativeBuildInputs and buildInputs function properly the python used in mk-python-derivation.nix is for build ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/hvb9yxgv1133cfhxxd869sibldvv2vdx-python3-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «derivation /nix/store/7vyhynla→ ```
2022-10-15 01:47:23 +00:00
self = __splicedPackages.python3Minimal;
inherit passthruFun;
pythonAttr = "python3Minimal";
# strip down that python version as much as possible
openssl = null;
readline = null;
ncurses = null;
gdbm = null;
sqlite = null;
configd = null;
tzdata = null;
libffi = libffiBoot; # without test suite
stripConfig = true;
stripIdlelib = true;
stripTests = true;
stripTkinter = true;
rebuildBytecode = false;
stripBytecode = true;
includeSiteCustomize = false;
enableOptimizations = false;
cpython: Enable LTO on all builds as it doesn't break reproducibility LTO allows us to optimise the binaries we are shipping a bit further than just with the regular -Ox and other compiler flags. It also is deterministic and doesn't harm our reproducibility efforts while providing us with up to 10% performance gain (and sometimes slightly slower). See the table below for a comparsion of this version with the Python 3.9 build that sets -fno-semantic-interposition. +-------------------------+--------------------+------------------------+--------------+------------------------+ | Benchmark | py39-nsip.nix.json | py39-nsip-lto.nix.json | Change | Significance | +=========================+====================+========================+==============+========================+ | 2to3 | 642 ms | 620 ms | 1.03x faster | Significant (t=12.04) | +-------------------------+--------------------+------------------------+--------------+------------------------+ | chameleon | 14.6 ms | 14.4 ms | 1.02x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | chaos | 182 ms | 182 ms | 1.00x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | crypto_pyaes | 175 ms | 172 ms | 1.02x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | deltablue | 11.2 ms | 11.2 ms | 1.00x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | django_template | 82.0 ms | 81.4 ms | 1.01x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | dulwich_log | 101 ms | 99.8 ms | 1.01x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | fannkuch | 634 ms | 638 ms | 1.01x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | float | 176 ms | 189 ms | 1.08x slower | Significant (t=-4.30) | +-------------------------+--------------------+------------------------+--------------+------------------------+ | go | 366 ms | 365 ms | 1.00x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | hexiom | 14.9 ms | 15.1 ms | 1.01x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | json_dumps | 18.7 ms | 18.5 ms | 1.01x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | json_loads | 37.9 us | 37.3 us | 1.02x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | logging_format | 14.2 us | 14.3 us | 1.01x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | logging_silent | 305 ns | 313 ns | 1.02x slower | Significant (t=-3.91) | +-------------------------+--------------------+------------------------+--------------+------------------------+ | logging_simple | 13.0 us | 13.2 us | 1.01x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | mako | 24.7 ms | 23.3 ms | 1.06x faster | Significant (t=10.74) | +-------------------------+--------------------+------------------------+--------------+------------------------+ | meteor_contest | 130 ms | 128 ms | 1.01x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | nbody | 201 ms | 201 ms | 1.00x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | nqueens | 152 ms | 154 ms | 1.01x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | pathlib | 26.3 ms | 26.2 ms | 1.01x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | pickle | 13.1 us | 13.7 us | 1.05x slower | Significant (t=-10.36) | +-------------------------+--------------------+------------------------+--------------+------------------------+ | pickle_dict | 26.6 us | 27.1 us | 1.02x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | pickle_list | 4.34 us | 4.31 us | 1.01x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | pickle_pure_python | 738 us | 759 us | 1.03x slower | Significant (t=-5.26) | +-------------------------+--------------------+------------------------+--------------+------------------------+ | pidigits | 181 ms | 181 ms | 1.00x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | pyflate | 959 ms | 974 ms | 1.02x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | python_startup | 34.0 ms | 31.4 ms | 1.08x faster | Significant (t=29.75) | +-------------------------+--------------------+------------------------+--------------+------------------------+ | python_startup_no_site | 15.3 ms | 14.5 ms | 1.06x faster | Significant (t=17.58) | +-------------------------+--------------------+------------------------+--------------+------------------------+ | raytrace | 849 ms | 846 ms | 1.00x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | regex_compile | 261 ms | 261 ms | 1.00x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | regex_dna | 187 ms | 221 ms | 1.18x slower | Significant (t=-46.94) | +-------------------------+--------------------+------------------------+--------------+------------------------+ | regex_effbot | 3.66 ms | 3.98 ms | 1.09x slower | Significant (t=-18.55) | +-------------------------+--------------------+------------------------+--------------+------------------------+ | regex_v8 | 29.7 ms | 29.3 ms | 1.01x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | richards | 113 ms | 110 ms | 1.03x faster | Significant (t=3.47) | +-------------------------+--------------------+------------------------+--------------+------------------------+ | scimark_fft | 592 ms | 590 ms | 1.00x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | scimark_lu | 253 ms | 265 ms | 1.05x slower | Significant (t=-8.97) | +-------------------------+--------------------+------------------------+--------------+------------------------+ | scimark_monte_carlo | 170 ms | 177 ms | 1.04x slower | Significant (t=-4.96) | +-------------------------+--------------------+------------------------+--------------+------------------------+ | scimark_sor | 310 ms | 315 ms | 1.02x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | scimark_sparse_mat_mult | 8.36 ms | 8.33 ms | 1.00x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | spectral_norm | 232 ms | 229 ms | 1.02x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | sqlalchemy_declarative | 185 ms | 183 ms | 1.01x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | sqlalchemy_imperative | 27.4 ms | 27.6 ms | 1.01x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | sqlite_synth | 4.73 us | 4.73 us | 1.00x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | sympy_expand | 813 ms | 819 ms | 1.01x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | sympy_integrate | 31.6 ms | 31.8 ms | 1.01x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | sympy_str | 477 ms | 479 ms | 1.00x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | sympy_sum | 245 ms | 247 ms | 1.01x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | telco | 11.3 ms | 11.4 ms | 1.00x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | tornado_http | 172 ms | 172 ms | 1.00x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | unpack_sequence | 56.2 ns | 51.2 ns | 1.10x faster | Significant (t=2.50) | +-------------------------+--------------------+------------------------+--------------+------------------------+ | unpickle | 19.8 us | 19.5 us | 1.02x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | unpickle_list | 5.75 us | 5.75 us | 1.00x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | unpickle_pure_python | 524 us | 522 us | 1.01x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | xml_etree_generate | 148 ms | 148 ms | 1.00x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | xml_etree_iterparse | 129 ms | 131 ms | 1.02x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | xml_etree_parse | 179 ms | 177 ms | 1.01x faster | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+ | xml_etree_process | 118 ms | 119 ms | 1.00x slower | Not significant | +-------------------------+--------------------+------------------------+--------------+------------------------+
2021-05-25 18:30:28 +00:00
enableLTO = false;
2021-03-14 12:00:44 +00:00
mimetypesSupport = false;
2022-05-29 18:17:02 +00:00
} // sources.python310)).overrideAttrs(old: {
# TODO(@Artturin): Add this to the main cpython expr
strictDeps = true;
pname = "python3-minimal";
});
pypy27 = callPackage ./pypy {
pythonInterpreters: get self from __splicedPackages BEFORE: the python derivation did not contain .nativeDrv and .crossDrv because it was not from the __splicedPackages set the python used in mk-python-derivation.nix was for host ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/bhz39ds4v02hn6x4py4mzjyilw4a589h-python3-aarch64-unknown-linux-gnu-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «deri→ ``` AFTER: the python derivation does contain .nativeDrv and .crossDrv because it is from the __splicedPackages set those 2 are what makes nativeBuildInputs and buildInputs function properly the python used in mk-python-derivation.nix is for build ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/hvb9yxgv1133cfhxxd869sibldvv2vdx-python3-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «derivation /nix/store/7vyhynla→ ```
2022-10-15 01:47:23 +00:00
self = __splicedPackages.pypy27;
sourceVersion = {
major = "7";
minor = "3";
patch = "11";
};
2022-10-17 07:41:43 +00:00
hash = "sha256-ERevtmgx2k6m852NIIR4enRon9AineC+MB+e2bJVCTw=";
pythonVersion = "2.7";
2019-10-26 09:20:00 +00:00
db = db.override { dbmSupport = !stdenv.isDarwin; };
python = __splicedPackages.pythonInterpreters.pypy27_prebuilt;
inherit passthruFun;
2019-10-26 09:20:00 +00:00
inherit (darwin) libunwind;
inherit (darwin.apple_sdk.frameworks) Security;
};
2022-10-17 07:41:43 +00:00
pypy39 = callPackage ./pypy {
self = __splicedPackages.pypy39;
sourceVersion = {
major = "7";
minor = "3";
patch = "11";
};
2022-10-17 07:41:43 +00:00
hash = "sha256-sPMWb7Klqt/VzrnbXN1feSmg7MygK0omwNrgSS98qOo=";
2022-10-17 07:41:43 +00:00
pythonVersion = "3.9";
2019-10-26 09:20:00 +00:00
db = db.override { dbmSupport = !stdenv.isDarwin; };
python = __splicedPackages.pypy27;
inherit passthruFun;
2019-10-26 09:20:00 +00:00
inherit (darwin) libunwind;
inherit (darwin.apple_sdk.frameworks) Security;
};
2022-10-17 07:41:43 +00:00
pypy38 = __splicedPackages.pypy39.override {
self = __splicedPackages.pythonInterpreters.pypy38;
pythonVersion = "3.8";
hash = "sha256-TWdpv8pzc06GZv1wUDt86wam4lkRDmFzMbs4mcpOYFg=";
2021-12-21 23:45:39 +00:00
};
2023-01-04 21:50:09 +00:00
pypy37 = throw "pypy37 has been removed from nixpkgs since it is no longer supported upstream"; # Added 2023-01-04
pypy27_prebuilt = callPackage ./pypy/prebuilt_2_7.nix {
# Not included at top-level
pythonInterpreters: get self from __splicedPackages BEFORE: the python derivation did not contain .nativeDrv and .crossDrv because it was not from the __splicedPackages set the python used in mk-python-derivation.nix was for host ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/bhz39ds4v02hn6x4py4mzjyilw4a589h-python3-aarch64-unknown-linux-gnu-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «deri→ ``` AFTER: the python derivation does contain .nativeDrv and .crossDrv because it is from the __splicedPackages set those 2 are what makes nativeBuildInputs and buildInputs function properly the python used in mk-python-derivation.nix is for build ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/hvb9yxgv1133cfhxxd869sibldvv2vdx-python3-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «derivation /nix/store/7vyhynla→ ```
2022-10-15 01:47:23 +00:00
self = __splicedPackages.pythonInterpreters.pypy27_prebuilt;
sourceVersion = {
major = "7";
minor = "3";
patch = "11";
};
2022-10-17 07:41:43 +00:00
hash = {
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};
pythonVersion = "2.7";
inherit passthruFun;
};
2022-10-17 07:41:43 +00:00
pypy39_prebuilt = callPackage ./pypy/prebuilt.nix {
# Not included at top-level
pythonInterpreters: get self from __splicedPackages BEFORE: the python derivation did not contain .nativeDrv and .crossDrv because it was not from the __splicedPackages set the python used in mk-python-derivation.nix was for host ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/bhz39ds4v02hn6x4py4mzjyilw4a589h-python3-aarch64-unknown-linux-gnu-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «deri→ ``` AFTER: the python derivation does contain .nativeDrv and .crossDrv because it is from the __splicedPackages set those 2 are what makes nativeBuildInputs and buildInputs function properly the python used in mk-python-derivation.nix is for build ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs [ «derivation /nix/store/hvb9yxgv1133cfhxxd869sibldvv2vdx-python3-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «derivation /nix/store/7vyhynla→ ```
2022-10-15 01:47:23 +00:00
self = __splicedPackages.pythonInterpreters.pypy38_prebuilt;
sourceVersion = {
major = "7";
minor = "3";
patch = "11";
};
hash = {
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-17 07:41:43 +00:00
pythonVersion = "3.9";
inherit passthruFun;
};
2023-02-02 23:02:17 +00:00
rustpython = darwin.apple_sdk_11_0.callPackage ./rustpython/default.nix {
inherit (darwin.apple_sdk_11_0.frameworks) SystemConfiguration;
};
2019-03-04 07:56:15 +00:00
})