Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
54 lines (47 loc) · 1.46 KB
/
Copy pathflake.nix
File metadata and controls
54 lines (47 loc) · 1.46 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
{
description = "Bridge Jujutsu bookmarks to GitHub or Forgejo stacked pull requests";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs }:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
# `f` receives one system's package set; the result is keyed by system.
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
in
{
packages = forAllSystems (pkgs: rec {
stakk = pkgs.callPackage ./nix/package.nix { };
default = stakk;
});
# For consumers who assemble their own package set:
# nixpkgs.overlays = [ inputs.stakk.overlays.default ];
overlays.default = final: _prev: {
stakk = final.callPackage ./nix/package.nix { };
};
# `nix flake check` builds the package, and the package build runs the
# unit tests — so the flake check is the whole verification.
checks = forAllSystems (pkgs: {
stakk = self.packages.${pkgs.system}.stakk;
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = [
pkgs.cargo
pkgs.cargo-nextest
pkgs.clippy
pkgs.jujutsu
pkgs.rustc
pkgs.rustfmt
];
};
});
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
};
}