-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathrelease.nix
49 lines (44 loc) · 1.22 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
{ nixpkgs ? <nixpkgs>
, systems ? [ "x86_64-linux" ]
}:
let
pkgs = import nixpkgs {};
in
rec {
package = pkgs.lib.genAttrs systems (system: (import ./default.nix {
inherit pkgs system;
noDev = true;
}).override {
executable = true;
});
dev = pkgs.lib.genAttrs systems (system: (import ./default.nix {
inherit pkgs system;
}).override (oldAttrs: {
buildInputs = [ pkgs.doxygen ];
executable = true;
postInstall = ''
doxygen
mkdir -p $out/nix-support
echo "doc api $out/share/php/composer-svanderburg-composer2nix/doc/html" >> $out/nix-support/hydra-build-products
'';
}));
tests = {
dependencies = pkgs.lib.genAttrs systems (system:
import ./tests/dependencies {
inherit pkgs;
}
);
enduser = pkgs.lib.genAttrs systems (system:
import ./tests/enduser {
inherit pkgs;
}
);
};
release = pkgs.releaseTools.aggregate {
name = "composer2nix";
constituents = map (system: builtins.getAttr system package) systems
++ map (system: builtins.getAttr system dev) systems
++ map (system: builtins.getAttr system tests.dependencies) systems
++ map (system: builtins.getAttr system tests.enduser) systems;
};
}