-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
release.nix
45 lines (38 loc) · 1.03 KB
/
release.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
{ repo ? builtins.fetchGit ./.
, versionFile ? ./.version
, officialRelease ? false
, nixpkgs ? null
, config ? {}
, system ? builtins.currentSystem
}:
let
bootstrap = import ./nix/bootstrap.nix {
inherit nixpkgs config system;
inherit repo officialRelease versionFile;
};
in
let
pkgs = bootstrap.pkgs;
jobs = rec {
eris = import ./. { nixpkgs = pkgs.path; inherit repo officialRelease; };
test = import ./test.nix { nixpkgs = pkgs; };
docker = with pkgs;
let
# needed for container/host resolution
nsswitch-conf = writeTextFile {
name = "nsswitch.conf";
text = "hosts: dns files";
destination = "/etc/nsswitch.conf";
};
in dockerTools.buildLayeredImage {
name = "eris";
tag = eris.version;
contents = [ eris nsswitch-conf iana-etc cacert tzdata busybox ];
config = {
Entrypoint = [ "/bin/eris" ];
Cmd = [ "--help" ];
Env = [ "ERIS_CONFIG=/etc/eris.conf" ];
};
};
};
in jobs