summaryrefslogtreecommitdiff
path: root/modules/documentation
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2023-07-09 12:34:19 +0200
committerGitHub <noreply@github.com>2023-07-09 12:34:19 +0200
commit66a3047fa88eb6aa5c5a2e675de91f0431fbe561 (patch)
treefe02b1b923540b82a7cc03488eaa4d5059863aa6 /modules/documentation
parent4e3fc1864712a534d30ef074d695e968f1fb1487 (diff)
parentf9724c4543035d6190c00168ebfa93f0b2e927d0 (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.nix14
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";