-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpkgs.nix
More file actions
28 lines (25 loc) · 617 Bytes
/
Copy pathpkgs.nix
File metadata and controls
28 lines (25 loc) · 617 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{pkgs}: {
docs = let
inherit (pkgs) lib;
root = ./.;
rootPrefix = builtins.toString root;
src = lib.sources.cleanSourceWith {
src = root;
filter = path: _: let
relativePath = lib.strings.removePrefix rootPrefix path;
in
builtins.any ((lib.flip lib.strings.hasPrefix) relativePath) [
"/docs"
"/README.md"
];
};
in
pkgs.stdenvNoCC.mkDerivation {
name = "typix-mdbook";
inherit src;
nativeBuildInputs = with pkgs; [mdbook];
buildPhase = ''
mdbook build docs --dest-dir "$out"
'';
};
}