tree-wide: do not use pkgs.extend in nixpkgs
Each invocation of pkgs.extends adds 130MB of allocation to the hydra evaluator. We are already struggling with the amount of memory nixpkgs requires. `pkgs.extend` is a useful escape-hatch, but should be not be used inside of nixpkgs directly.
This commit is contained in:
parent
c5d33689da
commit
bbc9af1f0a
|
@ -28,6 +28,7 @@
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<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.
|
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>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -96,5 +96,7 @@ mkDerivation rec {
|
||||||
license = stdenv.lib.licenses.gpl2Plus;
|
license = stdenv.lib.licenses.gpl2Plus;
|
||||||
maintainers = with stdenv.lib.maintainers; [ worldofpeace ];
|
maintainers = with stdenv.lib.maintainers; [ worldofpeace ];
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
|
# Needs QT 5.14
|
||||||
|
broken = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,5 +53,8 @@ in mkDerivation rec {
|
||||||
license = lib.licenses.gpl2Plus;
|
license = lib.licenses.gpl2Plus;
|
||||||
platforms = with lib.platforms; linux;
|
platforms = with lib.platforms; linux;
|
||||||
maintainers = with lib.maintainers; [ lsix ];
|
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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,5 +55,8 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
|
||||||
license = with licenses; gpl3Plus;
|
license = with licenses; gpl3Plus;
|
||||||
maintainers = with maintainers; [ AndersonTorres ];
|
maintainers = with maintainers; [ AndersonTorres ];
|
||||||
platforms = with platforms; unix;
|
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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9543,15 +9543,7 @@ in
|
||||||
graalvm8-ee
|
graalvm8-ee
|
||||||
graalvm11-ee;
|
graalvm11-ee;
|
||||||
|
|
||||||
# Cannot use a newer Qt (5.15) version because it requires qtwebkit
|
openshot-qt = libsForQt5.callPackage ../applications/video/openshot-qt { };
|
||||||
# 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 { };
|
|
||||||
|
|
||||||
openspin = callPackage ../development/compilers/openspin { };
|
openspin = callPackage ../development/compilers/openspin { };
|
||||||
|
|
||||||
|
@ -10541,12 +10533,7 @@ in
|
||||||
python2Packages = python2.pkgs;
|
python2Packages = python2.pkgs;
|
||||||
python3Packages = python3.pkgs;
|
python3Packages = python3.pkgs;
|
||||||
|
|
||||||
pythonInterpreters = callPackage ./../development/interpreters/python {
|
pythonInterpreters = callPackage ./../development/interpreters/python { };
|
||||||
# Overrides that apply to all Python interpreters and their packages
|
|
||||||
# Generally, this should be avoided.
|
|
||||||
pkgs = pkgs.extend (final: _: {
|
|
||||||
});
|
|
||||||
};
|
|
||||||
inherit (pythonInterpreters) python27 python36 python37 python38 python39 python310 python3Minimal pypy27 pypy36;
|
inherit (pythonInterpreters) python27 python36 python37 python38 python39 python310 python3Minimal pypy27 pypy36;
|
||||||
|
|
||||||
# Python package sets.
|
# Python package sets.
|
||||||
|
@ -20227,17 +20214,7 @@ in
|
||||||
|
|
||||||
bambootracker = libsForQt5.callPackage ../applications/audio/bambootracker { };
|
bambootracker = libsForQt5.callPackage ../applications/audio/bambootracker { };
|
||||||
|
|
||||||
cadence = let
|
cadence = libsForQt5.callPackage ../applications/audio/cadence { };
|
||||||
# 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 { };
|
|
||||||
|
|
||||||
cheesecutter = callPackage ../applications/audio/cheesecutter { };
|
cheesecutter = callPackage ../applications/audio/cheesecutter { };
|
||||||
|
|
||||||
|
@ -23355,19 +23332,8 @@ in
|
||||||
|
|
||||||
qemu-utils = callPackage ../applications/virtualization/qemu/utils.nix {};
|
qemu-utils = callPackage ../applications/virtualization/qemu/utils.nix {};
|
||||||
|
|
||||||
# Our 3.10 LTS cannot use a newer Qt (5.15) version because it requires qtwebkit
|
qgis-unwrapped = libsForQt5.callPackage ../applications/gis/qgis/unwrapped.nix {
|
||||||
# and our qtwebkit fails to build with 5.15. 01bcfd3579219d60e5d07df309a000f96b2b658b
|
withGrass = false;
|
||||||
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 = callPackage ../applications/gis/qgis { };
|
qgis = callPackage ../applications/gis/qgis { };
|
||||||
|
|
|
@ -200,6 +200,9 @@ let
|
||||||
then self
|
then self
|
||||||
else import ./stage.nix (args // { overlays = args.overlays ++ extraOverlays; });
|
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
|
# Extend the package set with a single overlay. This preserves
|
||||||
# preexisting overlays. Prefer to initialize with the right overlays
|
# preexisting overlays. Prefer to initialize with the right overlays
|
||||||
# in one go when calling Nixpkgs, for performance and simplicity.
|
# in one go when calling Nixpkgs, for performance and simplicity.
|
||||||
|
|
Loading…
Reference in New Issue