From 84ec47e5b89923c5a2f9156a862e451213ae8a72 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 13 Apr 2015 16:43:04 +0200 Subject: release.nix: Put channel exprs into a tarball. With my previous implementation (NixOS/hydra#203) the tarball was created by Hydra itself on the fly. Our new implementation actually generates the tarball via Nix and Hydra only picks up the build product. And exactly that's what we're doing here. Signed-off-by: aszlig --- release.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'release.nix') diff --git a/release.nix b/release.nix index 9d8ad528..05fbd4e9 100644 --- a/release.nix +++ b/release.nix @@ -25,10 +25,19 @@ in with pkgs.lib; with builtins; { }; in with releaseLib; mapTestOn (packagePlatforms releaseLib.pkgs); - channel = pkgs.srcOnly rec { + channel = pkgs.stdenv.mkDerivation rec { name = "vuizvui-channel-${version}"; version = "${toString vuizvui.revCount}.${vuizvui.shortRev}"; src = vuizvui; + phases = [ "unpackPhase" "installPhase" ]; + installPhase = '' + mkdir -p "$out/tarballs" "$out/nix-support" + tar cJf "$out/tarballs/nixexprs.tar.xz" \ + --owner=0 --group=0 --mtime="1970-01-01 00:00:00 UTC" \ + --transform='s!^\.!${name}/!' . + echo "file channel $out/tarballs/nixexprs.tar.bz2" \ + > "$out/nix-support/hydra-build-products" + ''; }; manual = let -- cgit 1.4.1