From e5fc65ed40fa984d87c40399f51f3e96fc78d619 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 26 Apr 2012 15:01:41 +0000 Subject: * 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 --- pkgs/build-support/trivial-builders.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index c8f0272daf81..474d43c30fff 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -18,7 +18,11 @@ rec { , executable ? false # run chmod +x ? , 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} mkdir -p "$(dirname "$n")" -- cgit 1.4.1