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