Merge pull request #105452 from zimbatm/no-extend

tree-wide: do not use pkgs.extend in nixpkgs
This commit is contained in:
Graham Christensen 2020-11-30 13:55:33 -05:00 committed by GitHub
commit f18e57f3bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 39 deletions

View File

@ -28,6 +28,7 @@
</para>
<para>
NOTE: DO NOT USE THIS in nixpkgs.
Further overlays can be added by calling the <literal>pkgs.extend</literal> or <literal>pkgs.appendOverlays</literal>, although it is often preferable to avoid these functions, because they recompute the Nixpkgs fixpoint, which is somewhat expensive to do.
</para>
</section>

View File

@ -96,5 +96,7 @@ mkDerivation rec {
license = stdenv.lib.licenses.gpl2Plus;
maintainers = with stdenv.lib.maintainers; [ worldofpeace ];
platforms = [ "x86_64-linux" ];
# Needs QT 5.14
broken = true;
};
}

View File

@ -53,5 +53,8 @@ in mkDerivation rec {
license = lib.licenses.gpl2Plus;
platforms = with lib.platforms; linux;
maintainers = with lib.maintainers; [ lsix ];
# Our 3.10 LTS cannot use a newer Qt (5.15) version because it requires qtwebkit
# and our qtwebkit fails to build with 5.15. 01bcfd3579219d60e5d07df309a000f96b2b658b
broken = true;
};
}

View File

@ -55,5 +55,8 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
license = with licenses; gpl3Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = with platforms; unix;
# Cannot use a newer Qt (5.15) version because it requires qtwebkit
# and our qtwebkit fails to build with 5.15. 01bcfd3579219d60e5d07df309a000f96b2b658b
broken = true;
};
}

View File

@ -9581,15 +9581,7 @@ in
graalvm8-ee
graalvm11-ee;
# Cannot use a newer Qt (5.15) version because it requires qtwebkit
# and our qtwebkit fails to build with 5.15. 01bcfd3579219d60e5d07df309a000f96b2b658b
openshot-qt = (pkgs.extend (final: prev: rec {
qt5 = if stdenv.isDarwin then prev.qt5 else prev.qt514;
libsForQt5 = if stdenv.isDarwin then prev.libsForQt5 else prev.libsForQt514;
pythonInterpreters = prev.pythonInterpreters.override {
pkgs = final;
};
})).libsForQt5.callPackage ../applications/video/openshot-qt { };
openshot-qt = libsForQt5.callPackage ../applications/video/openshot-qt { };
openspin = callPackage ../development/compilers/openspin { };
@ -10579,12 +10571,7 @@ in
python2Packages = python2.pkgs;
python3Packages = python3.pkgs;
pythonInterpreters = callPackage ./../development/interpreters/python {
# Overrides that apply to all Python interpreters and their packages
# Generally, this should be avoided.
pkgs = pkgs.extend (final: _: {
});
};
pythonInterpreters = callPackage ./../development/interpreters/python { };
inherit (pythonInterpreters) python27 python36 python37 python38 python39 python310 python3Minimal pypy27 pypy36;
# Python package sets.
@ -20261,17 +20248,7 @@ in
bambootracker = libsForQt5.callPackage ../applications/audio/bambootracker { };
cadence = let
# Use Qt 5.14 consistently
pkgs_ = pkgs.extend(_: prev: {
pythonInterpreters = prev.pythonInterpreters.override(oldAttrs: {
pkgs = oldAttrs.pkgs.extend(_: _: {
qt5 = pkgs.qt514;
libsForQt5 = pkgs.libsForQt514;
});
});
});
in pkgs_.libsForQt514.callPackage ../applications/audio/cadence { };
cadence = libsForQt5.callPackage ../applications/audio/cadence { };
cheesecutter = callPackage ../applications/audio/cheesecutter { };
@ -23389,19 +23366,8 @@ in
qemu-utils = callPackage ../applications/virtualization/qemu/utils.nix {};
# Our 3.10 LTS cannot use a newer Qt (5.15) version because it requires qtwebkit
# and our qtwebkit fails to build with 5.15. 01bcfd3579219d60e5d07df309a000f96b2b658b
qgis-unwrapped = let
pkgs_ = pkgs.extend(_: prev: {
pythonInterpreters = prev.pythonInterpreters.override(oldAttrs: {
pkgs = oldAttrs.pkgs.extend(_: _: {
qt5 = pkgs.qt514;
libsForQt5 = pkgs.libsForQt514;
});
});
});
in pkgs_.libsForQt514.callPackage ../applications/gis/qgis/unwrapped.nix {
withGrass = false;
qgis-unwrapped = libsForQt5.callPackage ../applications/gis/qgis/unwrapped.nix {
withGrass = false;
};
qgis = callPackage ../applications/gis/qgis { };

View File

@ -200,6 +200,9 @@ let
then self
else import ./stage.nix (args // { overlays = args.overlays ++ extraOverlays; });
# NOTE: each call to extend causes a full nixpkgs rebuild, adding ~130MB
# of allocations. DO NOT USE THIS IN NIXPKGS.
#
# Extend the package set with a single overlay. This preserves
# preexisting overlays. Prefer to initialize with the right overlays
# in one go when calling Nixpkgs, for performance and simplicity.