-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
33 lines (32 loc) · 915 Bytes
/
default.nix
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
29
30
31
32
33
{
sources ? import ./nix/sources,
system ? builtins.currentSystem,
pkgs ? import sources.nixpkgs { inherit system; config = { }; overlays = [ ]; },
nixdoc-to-github ? pkgs.callPackage sources.nixdoc-to-github { },
git-hooks ? pkgs.callPackage sources.git-hooks { },
}:
let
lib = {
inherit (git-hooks.lib) git-hooks;
inherit (nixdoc-to-github.lib) nixdoc-to-github;
};
update-readme = lib.nixdoc-to-github.run {
category = "lazy-drv";
description = "\\`lazy-drv\\`";
file = "${toString ./lib.nix}";
output = "${toString ./README.md}";
};
# wrapper to account for the custom lockfile location
npins = pkgs.callPackage ./nix/npins.nix { };
in
{
lib.lazy-drv = pkgs.callPackage ./lib.nix { };
shell = pkgs.mkShellNoCC {
packages = [
npins
];
shellHook = ''
${with lib.git-hooks; pre-commit (wrap.abort-on-change update-readme)}
'';
};
}