Skip to content

Commit c9e3ba4

Browse files
committed
release.nix: Use separate jobs for each platform
E.g. "build.x86_64-linux" instead of "build". Also, by not using a Hydra input "system" anymore, the set of platforms to build on becomes declarative. See NixOS/hydra#60
1 parent 21828ee commit c9e3ba4

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

release.nix

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
let
66

7-
pkgs = import <nixpkgs> {};
7+
pkgs = import <nixpkgs> { };
88

99

10-
jobs = {
10+
jobs = rec {
1111

1212

1313
tarball =
@@ -27,21 +27,20 @@ let
2727
coverage =
2828
pkgs.releaseTools.coverageAnalysis {
2929
name = "patchelf-coverage";
30-
src = jobs.tarball;
30+
src = tarball;
3131
lcovFilter = ["*/tests/*"];
3232
};
3333

3434

35-
build =
36-
{ system ? "i686-linux" }:
35+
build = pkgs.lib.genAttrs [ "x86_64-linux" "i686-linux" "x86_64-freebsd" "i686-freebsd" "x86_64-darwin" "i686-solaris" "i686-cygwin" ] (system:
3736

38-
with import <nixpkgs> {inherit system;};
37+
with import <nixpkgs> { inherit system; };
3938

4039
releaseTools.nixBuild {
4140
name = "patchelf";
42-
src = jobs.tarball;
43-
doCheck = system != "i686-darwin" && system != "i686-cygwin" && system != "i686-solaris";
44-
};
41+
src = tarball;
42+
doCheck = system != "i686-cygwin" && system != "i686-solaris";
43+
});
4544

4645

4746
rpm_fedora5i386 = makeRPM_i686 (diskImages: diskImages.fedora5i386) 10;
@@ -101,7 +100,7 @@ let
101100
makeRPM =
102101
system: diskImageFun: prio:
103102

104-
with import <nixpkgs> {inherit system;};
103+
with import <nixpkgs> { inherit system; };
105104

106105
releaseTools.rpmBuild rec {
107106
name = "patchelf-rpm";
@@ -117,7 +116,7 @@ let
117116
makeDeb =
118117
system: diskImageFun: prio:
119118

120-
with import <nixpkgs> {inherit system;};
119+
with import <nixpkgs> { inherit system; };
121120

122121
releaseTools.debBuild {
123122
name = "patchelf-deb";

0 commit comments

Comments
 (0)