-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
54 lines (52 loc) · 1.37 KB
/
flake.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
description = "pog";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-compat = {
flake = false;
url = "github:edolstra/flake-compat";
};
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
pog = import ./. {
inherit pkgs system;
};
params = {
inherit pkgs;
inherit (pog) _ pog;
};
builtin = import ./builtin params;
in
rec {
overlays.default = final: prev: { inherit pog; };
packages = { inherit pog builtin; };
defaultPackage = packages.pog;
devShells = {
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
bun
deadnix
nixpkgs-fmt
statix
] ++ [
(pog.pog {
name = "docs";
script = ''
${pkgs.bun}/bin/bunx vitepress dev docs --host 0.0.0.0 "$@"
'';
})
(pog.pog {
name = "build_docs";
script = ''
${pkgs.bun}/bin/bunx vitepress build docs "$@"
'';
})
];
};
};
});
}