Merge pull request 'fix: check package arguments before applying Nix 2.18 override' (#34) from devusb/nixos-module:remove-devenv-overlay into main
Reviewed-on: #34
This commit is contained in:
commit
daeb420858
12
overlay.nix
12
overlay.nix
|
@ -21,11 +21,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;
|
||||||
|
|
||||||
|
@ -65,7 +60,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_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;
|
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*
|
||||||
|
|
Loading…
Reference in a new issue