-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
65 lines (57 loc) · 1.78 KB
/
flake.nix
File metadata and controls
65 lines (57 loc) · 1.78 KB
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
55
56
57
58
59
60
61
62
63
64
65
{
description = "Cerbo: A minimalist personal knowledge base";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
bun2nix.url = "github:nix-community/bun2nix";
bun2nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
{
self,
nixpkgs,
flake-utils,
bun2nix,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ bun2nix.overlays.default ];
};
deps = import ./nix/deps.nix { inherit pkgs; };
inherit (deps) tauri-deps dev-deps;
cerbo-pkgs = import ./nix/pkgs.nix { inherit pkgs tauri-deps; };
inherit (cerbo-pkgs) cerbo cerbo-frontend cerbo-desktop;
src = builtins.path { path = ./.; name = "cerbo-src"; };
releaseWorkflowCheck = pkgs.writeShellApplication {
name = "release-workflow-check";
runtimeInputs = [ pkgs.actionlint ];
text = ''
actionlint ${src}/.github/workflows/release.yml
'';
};
in
{
packages = {
default = cerbo;
inherit cerbo cerbo-frontend cerbo-desktop;
release-workflow-check = releaseWorkflowCheck;
};
checks.release-workflow = pkgs.runCommand "release-workflow-check" {
nativeBuildInputs = [ pkgs.actionlint ];
} ''
${releaseWorkflowCheck}/bin/release-workflow-check
touch $out
'';
apps.release-workflow-check = {
type = "app";
program = "${releaseWorkflowCheck}/bin/release-workflow-check";
};
devShells.default = import ./nix/devshell.nix {
inherit pkgs tauri-deps dev-deps;
};
}
);
}