From 2406909d7a2aa50f907a82e553d6e923814e978a Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 13 Jun 2024 13:52:29 +0100 Subject: [PATCH] Reapply "eval-config: set `class`" All supported Nixpkgs versions now support this. This reverts commit a5b09580e2d0bbc52b338afe4f1f1d46178e6bbf. --- eval-config.nix | 1 + modules/documentation/default.nix | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/eval-config.nix b/eval-config.nix index d2567a41..cd14493d 100644 --- a/eval-config.nix +++ b/eval-config.nix @@ -16,6 +16,7 @@ let }; eval = lib.evalModules (builtins.removeAttrs args [ "lib" ] // { + class = "darwin"; modules = modules ++ [ argsModule ] ++ baseModules; specialArgs = { modulesPath = builtins.toString ./modules; } // specialArgs; }); diff --git a/modules/documentation/default.nix b/modules/documentation/default.nix index 3259cfd9..395e6e6e 100644 --- a/modules/documentation/default.nix +++ b/modules/documentation/default.nix @@ -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