about summary refs log tree commit diff
path: root/release.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-04-28 10:00:07 +0200
committeraszlig <aszlig@redmoonstudios.org>2015-04-28 10:03:06 +0200
commit86b11d5bb0661f8e210ae97be81458ef59c08679 (patch)
tree1e91821a532e5ba2d0ad066b996d7cb263a07ead /release.nix
parentd7fd27cf9878de997eaf6d75481d34b7bf7154f5 (diff)
release.nix: Use vuizvui/nixpkgs in nixos-rebuild.
We're now symlinking the nixpkgs store path into vuizvui/nixpkgs and
reference it from within nixos-rebuild. Unfortunately we can't simply
patch it with the hardcoded store path because we'll end up having the
*previous* version on every nixos-rebuild instead of the new version
delivered by the channel.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'release.nix')
-rw-r--r--release.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/release.nix b/release.nix
index 8ff1d073..320dc217 100644
--- a/release.nix
+++ b/release.nix
@@ -19,7 +19,10 @@ let
     src = nixpkgs;
     phases = [ "unpackPhase" "patchPhase" "installPhase" ];
     installPhase = "cp -r . \"$out\"";
-    patchPhase = patchNixpkgsReference "'\"$out\"'";
+    patchPhase = (patchNixpkgsReference "'\"$out\"'") + ''
+      sed -i -re 's!<nixpkgs([^>]*)>!<vuizvui/nixpkgs\1>!g' \
+        nixos/modules/installer/tools/nixos-rebuild.sh
+    '';
   };
 
 in with pkgsUpstream.lib; with builtins; {
@@ -44,7 +47,9 @@ in with pkgsUpstream.lib; with builtins; {
       name = "vuizvui-channel-${attrs.name or "generic"}-${version}";
       version = "${toString vuizvui.revCount}.${vuizvui.shortRev}";
       src = vuizvui;
-      patchPhase = patchNixpkgsReference patchedNixpkgs;
+      patchPhase = (patchNixpkgsReference patchedNixpkgs) + ''
+        ln -s "${patchedNixpkgs}" nixpkgs
+      '';
     } // removeAttrs attrs [ "name" ]);
 
   in {