diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index c8856ea2aa3..bab7a047b15 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -111,6 +111,38 @@ in { inherit passthruFun; }; + # Minimal versions of Python (built without optional dependencies) + python3Minimal = (callPackage ./cpython { + self = python3Minimal; + sourceVersion = { + major = "3"; + minor = "7"; + patch = "4"; + suffix = ""; + }; + sha256 = "0gxiv5617zd7dnqm5k9r4q2188lk327nf9jznwq9j6b8p0s92ygv"; + inherit (darwin) CF configd; + inherit passthruFun; + + # strip down that python version as much as possible + openssl = null; + readline = null; + ncurses = null; + gdbm = null; + sqlite = null; + stripConfig = true; + stripIdlelib = true; + stripTests = true; + stripTkinter = true; + rebuildBytecode = false; + stripBytecode = true; + }).overrideAttrs(old: { + pname = "python3-minimal"; + meta = old.meta // { + maintainers = []; + }; + }); + pypy27 = callPackage ./pypy { self = pypy27; sourceVersion = { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c2df042eae2..9142a33aeda 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8754,7 +8754,7 @@ in python3Packages = python3.pkgs; pythonInterpreters = callPackage ./../development/interpreters/python {}; - inherit (pythonInterpreters) python27 python35 python36 python37 python38 pypy27 pypy36; + inherit (pythonInterpreters) python27 python35 python36 python37 python38 python3Minimal pypy27 pypy36; # Python package sets. python27Packages = lib.hiPrioSet (recurseIntoAttrs python27.pkgs);