From af75f317a4330b550b91e86b95e049e26329e8e5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 5 Jan 2008 23:27:15 +0000 Subject: [PATCH] * Compatibility hack for building the ISO on Nix <= 0.11. svn path=/nixos/trunk/; revision=10080 --- configuration/rescue-cd.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configuration/rescue-cd.nix b/configuration/rescue-cd.nix index 75da817481f..755cbf0da82 100644 --- a/configuration/rescue-cd.nix +++ b/configuration/rescue-cd.nix @@ -49,7 +49,7 @@ rec { job = " start on udev stop on shutdown - respawn ${pkgs.w3m}/bin/w3m ${import ../doc/manual}/manual.html < /dev/tty7 > /dev/tty7 2>&1 + respawn ${pkgs.w3m}/bin/w3m ${manual} < /dev/tty7 > /dev/tty7 2>&1 "; } @@ -126,6 +126,14 @@ rec { pkgs = system.pkgs; + # The NixOS manual, with a backward compatibility hack for Nix <= + # 0.11 (you won't get the manual). + manual = + if builtins ? unsafeDiscardStringContext + then "${import ../doc/manual}/manual.html" + else pkgs.writeText "dummy-manual" "Manual not included in this build!"; + + # Since the CD is read-only, the mount points must be on disk. cdMountPoints = pkgs.runCommand "mount-points" {} " ensureDir $out