Skip to content

Commit

Permalink
eval-config: remove compatibility shims
Browse files Browse the repository at this point in the history
20.03 and 22.03 are both deprecated and no longer work with nix-darwin.
  • Loading branch information
emilazy committed Jun 23, 2023
1 parent 0fcb1cd commit b20e597
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions eval-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,14 @@ let
};
};

libExtended = lib.extend (self: super: {
# Added in nixpkgs #136909, adds forward compatibility until 22.03 is deprecated.
literalExpression = super.literalExpression or super.literalExample;
literalDocBook = super.literalDocBook or super.literalExample;
});

eval = libExtended.evalModules (builtins.removeAttrs args [ "lib" "inputs" "pkgs" "system" ] // {
eval = lib.evalModules (builtins.removeAttrs args [ "lib" "inputs" "pkgs" "system" ] // {
modules = modules ++ [ argsModule pkgsModule ] ++ baseModules;
specialArgs = { modulesPath = builtins.toString ./modules; } // specialArgs;
});

# Was moved in nixpkgs #82751, so both need to be handled here until 20.03 is deprecated.
# https://github.com/NixOS/nixpkgs/commits/dcdd232939232d04c1132b4cc242dd3dac44be8c
_module = eval._module or eval.config._module;
in

{
inherit (_module.args) pkgs;
inherit (eval._module.args) pkgs;
inherit (eval) options config;

system = eval.config.system.build.toplevel;
Expand Down

0 comments on commit b20e597

Please sign in to comment.