about summary refs log tree commit diff
path: root/release.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-04-13 16:43:04 +0200
committeraszlig <aszlig@redmoonstudios.org>2015-04-13 16:43:04 +0200
commit84ec47e5b89923c5a2f9156a862e451213ae8a72 (patch)
treeb23f2749a4b0ce375532338e1bacece7a309b5f2 /release.nix
parent667735efe0b2ea4f6ac87f46ca25a46eacf54548 (diff)
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 <aszlig@redmoonstudios.org>
Diffstat (limited to 'release.nix')
-rw-r--r--release.nix11
1 files changed, 10 insertions, 1 deletions
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