forked from cardano-scaling/hydra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
83 lines (79 loc) · 2.23 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
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
{
inputs = {
nixpkgs.follows = "haskellNix/nixpkgs";
haskellNix.url = "github:input-output-hk/haskell.nix";
iohk-nix.url = "github:input-output-hk/iohk-nix";
flake-utils.url = "github:numtide/flake-utils";
std.follows = "tullia/std";
tullia.url = github:input-output-hk/tullia;
CHaP = {
url = "github:input-output-hk/cardano-haskell-packages?ref=repo";
flake = false;
};
};
outputs =
{ self
, std
, tullia
, flake-utils
, nixpkgs
, ...
} @ inputs:
std.growOn
{
inherit inputs;
cellsFrom = ./nix;
cellBlocks = [
(std.functions "library")
(std.functions "hydraJobs")
(tullia.tasks "pipelines")
(std.functions "actions")
];
}
(
tullia.fromStd {
actions = std.harvest self [ "cloud" "actions" ];
tasks = std.harvest self [ "automation" "pipelines" ];
}
)
(flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" ]
(system:
let
pkgs = import inputs.nixpkgs { inherit system; };
hydraProject = import ./nix/hydra/project.nix {
inherit (inputs) haskellNix iohk-nix CHaP;
inherit system nixpkgs;
};
hydraPackages = import ./nix/hydra/packages.nix {
inherit hydraProject system;
};
hydraImages = import ./nix/hydra/docker.nix {
inherit hydraPackages system nixpkgs;
};
in
rec {
packages = hydraPackages // {
docker = hydraImages;
};
devShells = (import ./nix/hydra/shell.nix {
inherit hydraProject system;
}) // {
ci = (import ./nix/hydra/shell.nix {
inherit hydraProject system;
withoutDevTools = true;
}).default;
};
})
);
nixConfig = {
extra-substituters = [
"https://cache.iog.io"
"https://hydra-node.cachix.org"
];
extra-trusted-public-keys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
"hydra-node.cachix.org-1:vK4mOEQDQKl9FTbq76NjOuNaRD4pZLxi1yri31HHmIw="
];
allow-import-from-derivation = true;
};
}