-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathflake.nix
54 lines (53 loc) · 1.24 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
stacklock2nix.url = "github:cdepillabout/stacklock2nix";
};
outputs =
{
self,
nixpkgs,
stacklock2nix,
...
}:
let
supportedSystems = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
unstestedSystems = [
"aarch64-linux"
"x86_64-darwin"
];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
nixpkgsFor = forAllSystems (
system:
import nixpkgs {
inherit system;
overlays = [
stacklock2nix.overlay
(import ./nix/overlay.nix)
];
}
);
in
{
packages = forAllSystems (
system:
let
pkgs = nixpkgsFor.${system};
in
{
default =
pkgs.lib.warnIf (builtins.any (x: x == system) unstestedSystems)
"'${system}' is not tested as part of the CI workflow; please report any issues you encounter while dealing with it."
pkgs.hapistrano;
}
);
overlays.default = final: prev: {
hapistrano = self.packages.${prev.system}.default;
};
};
}