treewide: don't use python3Minimal where it is not required

Building a python environment with python3Minimal requires hydra
to bootstrap pip and build all packages used in the environment
which would otherwise not be built. This reduces cache re-use and duplicates things.

Also common dependencies normally included in python itself
are not properly checked and can cause hard to debug errors
because everyone just assumes those modules are there.
This commit is contained in:
Sandro Jäckel 2023-09-12 17:07:58 +02:00
parent f36fabca0f
commit e2702f5aee
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
4 changed files with 4 additions and 17 deletions

View File

@ -120,7 +120,7 @@ in rec {
{ meta.description = "List of NixOS options in JSON format"; { meta.description = "List of NixOS options in JSON format";
nativeBuildInputs = [ nativeBuildInputs = [
pkgs.brotli pkgs.brotli
pkgs.python3Minimal pkgs.python3
]; ];
options = builtins.toFile "options.json" options = builtins.toFile "options.json"
(builtins.unsafeDiscardStringContext (builtins.toJSON optionsNix)); (builtins.unsafeDiscardStringContext (builtins.toJSON optionsNix));

View File

@ -510,14 +510,8 @@ let
ntp ntp
perlPackages.ListCompare perlPackages.ListCompare
perlPackages.XMLLibXML perlPackages.XMLLibXML
python3Minimal
# make-options-doc/default.nix # make-options-doc/default.nix
(let python3.withPackages (p: [ p.mistune ])
self = (pkgs.python3Minimal.override {
inherit self;
includeSiteCustomize = true;
});
in self.withPackages (p: [ p.mistune ]))
shared-mime-info shared-mime-info
sudo sudo
texinfo texinfo

View File

@ -95,7 +95,7 @@ in {
ntp ntp
perlPackages.ListCompare perlPackages.ListCompare
perlPackages.XMLLibXML perlPackages.XMLLibXML
python3Minimal python3
shared-mime-info shared-mime-info
stdenv stdenv
sudo sudo

View File

@ -1,18 +1,11 @@
{ lib { lib
, stdenv , stdenv
, python3 , python3
, python3Minimal
, runCommand , runCommand
}: }:
let let
# python3Minimal can't be overridden with packages on Darwin, due to a missing framework. python = python3.override {
# Instead of modifying stdenv, we take the easy way out, since most people on Darwin will
# just be hacking on the Nixpkgs manual (which also uses make-options-doc).
python = ((if stdenv.isDarwin then python3 else python3Minimal).override {
self = python;
includeSiteCustomize = true;
}).override {
packageOverrides = final: prev: { packageOverrides = final: prev: {
markdown-it-py = prev.markdown-it-py.overridePythonAttrs (_: { markdown-it-py = prev.markdown-it-py.overridePythonAttrs (_: {
doCheck = false; doCheck = false;