From 6839bddd1b6b754493a0a6fa9d1b09b5527387b5 Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Mon, 25 Apr 2011 17:48:59 +0000 Subject: [PATCH] modules/installer/tools: nixos-gui: Fix derivation. svn path=/nixos/trunk/; revision=26972 --- modules/installer/tools/tools.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/installer/tools/tools.nix b/modules/installer/tools/tools.nix index ece745096ce..cf2bdb788cf 100644 --- a/modules/installer/tools/tools.nix +++ b/modules/installer/tools/tools.nix @@ -104,14 +104,17 @@ let application = pkgs.stdenv.mkDerivation { name = "nixos-gui"; buildCommand = '' - ensureDir $out - cp -r $source $out - cp $jquery $out/chrome/content/jquery-1.5.2.js + cp -r "$gui" "$out" + + # Do not force the copy if the file exists in the sources (this + # happens for developpers) + test -e "$out/chrome/content/jquery-1.5.2.js" || + cp -f "$jquery" "$out/chrome/content/jquery-1.5.2.js" ''; - sources = pkgs.lib.cleanSource "${modulesPath}/../gui"; + gui = pkgs.lib.cleanSource "${modulesPath}/../gui"; jquery = pkgs.fetchurl { url = http://code.jquery.com/jquery-1.5.2.min.js; - sha256 = "e2107c8ecdb479c36d822d82bda2a8caf4429ab2d2cf9f20d5c931f75275403c"; + sha256 = "8f0a19ee8c606b35a10904951e0a27da1896eafe33c6e88cb7bcbe455f05a24a"; }; }; };