-
Notifications
You must be signed in to change notification settings - Fork 3
/
release.nix
100 lines (84 loc) · 2.8 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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{ nixpkgs ? <nixpkgs>
, systems ? [ "i686-linux" "x86_64-linux" ]
, dydisnix ? { outPath = ./.; rev = 1234; }
, dysnomia ? { outPath = ../dysnomia; rev = 1234; }
, disnix ? { outPath = ../disnix; rev = 1234; }
, officialRelease ? false
}:
let
pkgs = import nixpkgs {};
dysnomiaJobset = import "${dysnomia}/release.nix" {
inherit nixpkgs systems officialRelease dysnomia;
};
disnixJobset = import "${disnix}/release.nix" {
inherit nixpkgs systems officialRelease dysnomia disnix;
};
jobs = rec {
tarball =
let
disnix = builtins.getAttr (builtins.currentSystem) (disnixJobset.build);
in
pkgs.releaseTools.sourceTarball {
name = "dydisnix-tarball";
version = builtins.readFile ./version;
src = dydisnix;
inherit officialRelease;
CFLAGS = "-Wall";
buildInputs = [ pkgs.pkgconfig pkgs.getopt pkgs.libxml2 pkgs.glib disnix ]
++ pkgs.lib.optional (!pkgs.stdenv.isLinux) pkgs.libiconv
++ pkgs.lib.optional (!pkgs.stdenv.isLinux) pkgs.gettext;
};
build = pkgs.lib.genAttrs systems (system:
let
pkgs = import nixpkgs { inherit system; };
disnix = builtins.getAttr system (disnixJobset.build);
in
pkgs.releaseTools.nixBuild {
name = "dydisnix";
src = tarball;
CFLAGS = "-Wall";
buildInputs = [ pkgs.pkgconfig pkgs.getopt pkgs.libxml2 pkgs.glib disnix ]
++ pkgs.lib.optional (!pkgs.stdenv.isLinux) pkgs.libiconv
++ pkgs.lib.optional (!pkgs.stdenv.isLinux) pkgs.gettext;
});
tests =
let
dysnomia = builtins.getAttr (builtins.currentSystem) (dysnomiaJobset.build);
disnix = builtins.getAttr (builtins.currentSystem) (disnixJobset.build);
dydisnix = builtins.getAttr (builtins.currentSystem) build;
in
{
augmentInfra = import ./tests/augment-infra.nix {
inherit nixpkgs pkgs dysnomia disnix dydisnix;
};
gendist = import ./tests/gendist.nix {
inherit nixpkgs pkgs dysnomia disnix dydisnix;
};
idassign = import ./tests/idassign.nix {
inherit nixpkgs pkgs dysnomia disnix dydisnix;
};
docs = import ./tests/docs.nix {
inherit nixpkgs pkgs dysnomia disnix dydisnix;
};
deployment = import ./tests/deployment.nix {
inherit nixpkgs pkgs dysnomia disnix dydisnix;
};
};
release = pkgs.releaseTools.aggregate {
name = "dydisnix-${tarball.version}";
constituents = [
tarball
]
++ map (system: builtins.getAttr system build) systems
++ [
tests.augmentInfra
tests.gendist
tests.idassign
tests.docs
tests.deployment
];
meta.description = "Release-critical builds";
};
};
in
jobs