* writeTextFile: don't use the build hook. NixOS uses this function a

lot, and it causes a lot of unnecessary overhead on machines with
  remote building enabled.

svn path=/nixpkgs/trunk/; revision=33934
This commit is contained in:
Eelco Dolstra 2012-04-26 15:01:41 +00:00
parent 48b2a26898
commit e5fc65ed40

View File

@ -18,7 +18,11 @@ rec {
, executable ? false # run chmod +x ? , executable ? false # run chmod +x ?
, destination ? "" # relative path appended to $out eg "/bin/foo" , destination ? "" # relative path appended to $out eg "/bin/foo"
}: }:
runCommand name {inherit text executable; } runCommand name
{ inherit text executable;
# Pointless to do this on a remote machine.
preferLocalBuild = true;
}
'' ''
n=$out${destination} n=$out${destination}
mkdir -p "$(dirname "$n")" mkdir -p "$(dirname "$n")"