diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2023-07-09 12:34:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-09 12:34:19 +0200 |
| commit | 66a3047fa88eb6aa5c5a2e675de91f0431fbe561 (patch) | |
| tree | fe02b1b923540b82a7cc03488eaa4d5059863aa6 /modules/documentation | |
| parent | 4e3fc1864712a534d30ef074d695e968f1fb1487 (diff) | |
| parent | f9724c4543035d6190c00168ebfa93f0b2e927d0 (diff) | |
Merge pull request #723 from emilazy/rationalize-nixpkgs-handling
Rationalize handling of Nixpkgs
Diffstat (limited to 'modules/documentation')
| -rw-r--r-- | modules/documentation/default.nix | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/modules/documentation/default.nix b/modules/documentation/default.nix index 4a4bcdc..2f3bb9a 100644 --- a/modules/documentation/default.nix +++ b/modules/documentation/default.nix @@ -1,4 +1,4 @@ -toplevel@{ config, lib, pkgs, baseModules, modules, ... }: +{ config, lib, pkgs, baseModules, modules, ... }: with lib; @@ -25,15 +25,7 @@ let inherit pkgs config; version = config.system.darwinVersion; revision = config.system.darwinRevision; - nixpkgsRevision = - if toplevel.options.system.nixpkgsRevision.isDefined - then config.system.nixpkgsRevision - - # If user does not use flakes and does not add rev to nixpkgs, we don't - # know which revision or even branch they're on. In this case we still want - # to link somewhere, so we hope that master hasn't changed too much. - else "master"; - + inherit (config.system) nixpkgsRevision; options = let scrubbedEval = evalModules { @@ -54,7 +46,7 @@ let # TODO: Remove this when dropping 22.11 support. manual = realManual // - lib.optionalAttrs (lib.versionOlder lib.version "23.05-pre") rec { + lib.optionalAttrs (!pkgs.buildPackages ? nixos-render-docs) rec { optionsJSON = pkgs.writeTextFile { name = "options.json-stub"; destination = "/share/doc/darwin/options.json"; |
