forked from fulsomenko/kanban
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
94 lines (82 loc) · 3.42 KB
/
Copy pathflake.nix
File metadata and controls
94 lines (82 loc) · 3.42 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
rust-overlay,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system: let
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
};
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
extensions = ["rust-src" "rust-analyzer" "clippy" "rustfmt"];
};
changeset = pkgs.writeShellApplication {
name = "changeset";
runtimeInputs = with pkgs; [coreutils];
text = builtins.readFile ./scripts/create-changeset.sh;
};
bumpVersion = pkgs.writeShellApplication {
name = "bump-version";
runtimeInputs = with pkgs; [rustToolchain cargo coreutils gnugrep gnused git findutils];
text = builtins.readFile ./scripts/bump-version.sh;
};
publishCrates = pkgs.writeShellApplication {
name = "publish-crates";
runtimeInputs = [rustToolchain pkgs.cargo pkgs.coreutils pkgs.curl pkgs.gnugrep validateRelease listCrates];
text = builtins.readFile ./scripts/publish-crates.sh;
};
aggregateChangelog = pkgs.writeShellApplication {
name = "aggregate-changelog";
runtimeInputs = with pkgs; [coreutils gnugrep gnused git findutils];
text = builtins.readFile ./scripts/aggregate-changelog.sh;
};
listCrates = pkgs.writeShellApplication {
name = "list-crates";
runtimeInputs = with pkgs; [rustToolchain cargo coreutils jq gnused];
text = builtins.readFile ./scripts/list-crates.sh;
};
validateRelease = pkgs.writeShellApplication {
name = "validate-release";
runtimeInputs = with pkgs; [rustToolchain cargo coreutils gnugrep gnused listCrates];
text = builtins.readFile ./scripts/validate-release.sh;
};
checkCrateListSync = pkgs.writeShellApplication {
name = "check-crate-list-sync";
runtimeInputs = with pkgs; [coreutils gnugrep findutils diffutils listCrates];
text = builtins.readFile ./scripts/check-crate-list-sync.sh;
};
kanban = pkgs.callPackage ./default.nix { src = self; gitRev = self.rev or null; };
in {
devShells.default = import ./shell.nix {
inherit pkgs rustToolchain;
inherit changeset aggregateChangelog bumpVersion publishCrates validateRelease listCrates checkCrateListSync;
};
devShells.demo = import ./demo/shell.nix { inherit pkgs kanban; };
packages = let
kanban-cli = pkgs.callPackage ./default.nix { src = self; gitRev = self.rev or null; withTui = false; };
in {
default = kanban;
kanban-cli = kanban-cli;
kanban-mcp = pkgs.callPackage ./crates/kanban-mcp/default.nix { src = self; gitRev = self.rev or null; };
kanban-web = pkgs.callPackage ./web/default.nix {};
aggregate-changelog = aggregateChangelog;
bump-version = bumpVersion;
publish-crates = publishCrates;
validate-release = validateRelease;
list-crates = listCrates;
check-crate-list-sync = checkCrateListSync;
changeset = changeset;
};
}
);
}