From 7c76ae1814838154a6c99fe481af3191f7258a1a Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Wed, 28 Aug 2019 20:36:11 +0200 Subject: [PATCH] manual: add nmd as a generation dependency This is to allow network-less rebuilding of a generation after a garbage collection. Fixes #819 --- doc/default.nix | 3 ++- modules/manual.nix | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/default.nix b/doc/default.nix index 4482475c1..acfa1f1e4 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -5,6 +5,7 @@ let lib = pkgs.lib; nmdSrc = pkgs.fetchFromGitLab { + name = "nmd"; owner = "rycee"; repo = "nmd"; rev = "9751ca5ef6eb2ef27470010208d4c0a20e89443d"; @@ -55,6 +56,7 @@ let in { + inherit nmdSrc; options = { json = hmModulesDocs.json.override { @@ -67,5 +69,4 @@ in manual = { inherit (docs) html htmlOpenTool; }; - } diff --git a/modules/manual.nix b/modules/manual.nix index 1ee48b20b..e4c127c0d 100644 --- a/modules/manual.nix +++ b/modules/manual.nix @@ -56,6 +56,13 @@ in (mkIf cfg.manpages.enable [ docs.manPages ]) (mkIf cfg.json.enable [ docs.options.json ]) ]; + + # Whether a dependency on nmd should be introduced. + home.extraBuilderCommands = + mkIf (cfg.html.enable || cfg.manpages.enable || cfg.json.enable) '' + mkdir $out/lib + ln -s ${docs.nmdSrc} $out/lib/nmd + ''; }; }