aboutsummaryrefslogtreecommitdiff
path: root/doc/default.nix
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2020-01-16 23:41:14 +0100
committerRobert Helgesson <robert@rycee.net>2020-01-21 20:47:04 +0100
commit6e4b9af0803ac00e94398768c5d19d2e423b0be9 (patch)
tree65f117f6a8b562348eaf12469dadb084af2be417 /doc/default.nix
parentc8323a0bf16acf2c9d89ce164568089017d19668 (diff)
Switch to extended Nixpkg's `lib`
This change makes use of the `extend` function inside `lib` to inject a new `hm` field containing the Home Manager library functions. This simplifies use of the Home Manager library in the modules and reduces the risk of accidental infinite recursion. PR #994
Diffstat (limited to '')
-rw-r--r--doc/default.nix19
1 files changed, 12 insertions, 7 deletions
diff --git a/doc/default.nix b/doc/default.nix
index acfa1f1e49c..97c1914a571 100644
--- a/doc/default.nix
+++ b/doc/default.nix
@@ -1,18 +1,20 @@
-{ pkgs }:
+{
+ # Note, this should be "the standard library" + HM extensions.
+ lib
+, pkgs
+}:
let
- lib = pkgs.lib;
-
nmdSrc = pkgs.fetchFromGitLab {
name = "nmd";
owner = "rycee";
repo = "nmd";
- rev = "9751ca5ef6eb2ef27470010208d4c0a20e89443d";
- sha256 = "0rbx10n8kk0bvp1nl5c8q79lz1w0p1b8103asbvwps3gmqd070hi";
+ rev = "b437898c2b137c39d9c5f9a1cf62ec630f14d9fc";
+ sha256 = "18j1nh53cfpjpdiwn99x9kqpvr0s7hwngyc0a93xf4sg88ww93lq";
};
- nmd = import nmdSrc { inherit pkgs; };
+ nmd = import nmdSrc { inherit lib pkgs; };
# Make sure the used package is scrubbed to avoid actually
# instantiating derivations.
@@ -29,7 +31,10 @@ let
hmModulesDocs = nmd.buildModulesDocs {
modules =
- import ../modules/modules.nix { inherit lib pkgs; }
+ import ../modules/modules.nix {
+ inherit lib pkgs;
+ check = false;
+ }
++ [ scrubbedPkgsModule ];
moduleRootPaths = [ ./.. ];
mkModuleUrl = path: