Skip to content

Commit

Permalink
Reapply "eval-config: set class"
Browse files Browse the repository at this point in the history
All supported Nixpkgs versions now support this.

This reverts commit a5b0958.
  • Loading branch information
emilazy authored and kamushadenes committed Jul 8, 2024
1 parent c853920 commit 626509a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions eval-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ let
};

eval = lib.evalModules (builtins.removeAttrs args [ "lib" ] // {
class = "darwin";
modules = modules ++ [ argsModule ] ++ baseModules;
specialArgs = { modulesPath = builtins.toString ./modules; } // specialArgs;
});
Expand Down
9 changes: 5 additions & 4 deletions modules/documentation/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 626509a

Please sign in to comment.