fix: check package arguments before applying Nix 2.18 override #34

Merged
jade merged 1 commit from devusb/nixos-module:remove-devenv-overlay into main 2024-09-18 03:40:03 +00:00

View file

@ -21,11 +21,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;
@ -65,7 +60,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_2_18 (
name: if (lib.functionArgs prev.${name}.override ? "nix") then prev.${name}.override {
nix = final.nixVersions.nix_2_18_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*