1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

Merge pull request #744 from emilazy/set-module-class

eval-config: set `class`
This commit is contained in:
Emily 2023-07-24 23:10:33 +01:00 committed by GitHub
commit 8f0e02cfc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -16,6 +16,7 @@ let
};
eval = lib.evalModules (builtins.removeAttrs args [ "lib" ] // {
class = "darwin";
modules = modules ++ [ argsModule ] ++ baseModules;
specialArgs = { modulesPath = builtins.toString ./modules; } // specialArgs;
});

View file

@ -11,9 +11,9 @@ let
regularConfig = config;
argsModule = {
config._module.args = regularConfig._module.args // {
config._module.args = lib.mkForce (regularConfig._module.args // {
modules = [ ];
};
});
};
/* For the purpose of generating docs, evaluate options with each derivation
@ -28,8 +28,9 @@ let
inherit (config.system) nixpkgsRevision;
options =
let
scrubbedEval = evalModules {
modules = baseModules ++ [ argsModule ];
scrubbedEval = import ../../eval-config.nix {
inherit lib;
modules = [ argsModule ];
specialArgs = { pkgs = scrubDerivations "pkgs" pkgs; };
};
scrubDerivations = namePrefix: pkgSet: mapAttrs