-
Notifications
You must be signed in to change notification settings - Fork 6
/
gitlab-artifact.nix
38 lines (33 loc) · 1.05 KB
/
gitlab-artifact.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
{ stdenv }:
{ branch, fork }:
let
mkUrl = config: "https://gitlab.haskell.org/${fork}/ghc/-/jobs/artifacts/${branch}/raw/${config.tarball}?job=${config.job}";
# job: the GitLab CI job we should pull the bindist from
# ncursesVersion: the ncurses version which the bindist expects
configs = {
"i386-linux" = {
job = "i386-linux-deb9-validate";
tarball = "ghc-i386-linux-deb9-validate.tar.gz";
ncursesVersion = "6";
};
"x86_64-linux" = {
job = "x86_64-linux-fedora33-perf";
tarball = "ghc-x86_64-linux-fedora33-perf.tar.xz";
ncursesVersion = "6";
};
"aarch64-linux" = {
job = "aarch64-linux-deb10-validate";
ncursesVersion = "5";
};
"x86_64-darwin" = {
job = "x86_64-darwin-validate";
tarball = "ghc-x86_64-darwin-validate.tar.xz";
ncursesVersion = "6";
};
};
config = configs.${stdenv.hostPlatform.system}
or (throw "cannot bootstrap GHC on this platform");
in {
bindistTarball = builtins.fetchurl (mkUrl config);
inherit (config) ncursesVersion;
}