1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

manual: add nmd as a generation dependency

This is to allow network-less rebuilding of a generation after a
garbage collection.

Fixes #819
This commit is contained in:
Robert Helgesson 2019-08-28 20:36:11 +02:00
parent c142e5264d
commit 7c76ae1814
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
2 changed files with 9 additions and 1 deletions

View file

@ -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;
};
}

View file

@ -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
'';
};
}