overlay: clean up 2.18 stuff

Since Nix 2.24 is now the default in nixpkgs, we should remove the stuff
that assumes it's 2.18. Nothing breaks with this change, unless someone
is specifically depending on nixVersions.nix_2_18 being Lix.

(cherry-picked from commit b0e6f35950)
This commit is contained in:
jade 2024-09-17 20:47:29 -07:00
parent a0427505de
commit 30e488a7d5

View file

@ -10,7 +10,7 @@ let
});
# These packages depend on Nix features that Lix does not support
overridelist_2_18 = [
overridelist_upstream = [
"attic-client"
"devenv"
"nix-du"
@ -20,11 +20,6 @@ let
"nurl"
"prefetch-yarn-deps" # force these onto upstream so we are not regularly rebuilding electron
];
override_2_18 = prev.lib.genAttrs overridelist_2_18 (
name: prev.${name}.override {
nix = final.nixVersions.nix_2_18_upstream;
}
);
inherit (prev) lib;
@ -64,7 +59,12 @@ let
# errors. This is a simple safeguard to put in at least something that might be seen.
maybeWarnWrongMajor = x: if !(lib.hasPrefix supportedLixMajor lixPackageToUse.version) then builtins.trace wrongMajorWarning x else x;
overlay = override_2_18 // {
overlay =
lib.genAttrs overridelist_upstream (
name: if (lib.functionArgs prev.${name}.override ? "nix") then prev.${name}.override {
nix = final.nixVersions.stable_upstream;
} else prev.${name}
) // {
lix-overlay-present = 1;
# used for things that one wouldn't necessarily want to update, but we
# nevertheless shove it in the overlay and fixed-point it in case one *does*
@ -73,15 +73,14 @@ let
lix = maybeWarnWrongMajor (maybeWarnDuplicate lixPackageToUse);
nixVersions = prev.nixVersions // rec {
nix_2_18 = final.lix;
stable = nix_2_18;
nix_2_18_upstream = prev.nixVersions.nix_2_18;
nixVersions = prev.nixVersions // {
stable = final.lix;
stable_upstream = prev.nixVersions.stable;
};
nix-eval-jobs = (prev.nix-eval-jobs.override {
# lix
nix = final.nixVersions.nix_2_18;
nix = final.lix;
}).overrideAttrs (old:
let src = final.lix-sources.nix-eval-jobs;
in {