summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/writers.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-07-25 12:32:37 +0200
committertv <tv@krebsco.de>2017-07-25 12:36:00 +0200
commitc5fef87af8cba674198cd55ab1153d586db18080 (patch)
treee215a561e578ee4374b4cd8e63add5aed93d432a /krebs/5pkgs/writers.nix
parenta1cdec85d6fd4c296d98673473623a1c847a1ec2 (diff)
writeOut: don't modify stdenv's shell
This fixes following (and maybe more) issues: - /nix/store/*-stdenv/setup: line 125: showBuildStats: unbound variable - /nix/store/*-stdenv/setup: line 69: !hookName: unbound variable
Diffstat (limited to 'krebs/5pkgs/writers.nix')
-rw-r--r--krebs/5pkgs/writers.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/krebs/5pkgs/writers.nix b/krebs/5pkgs/writers.nix
index 49ca3557e..f1626078e 100644
--- a/krebs/5pkgs/writers.nix
+++ b/krebs/5pkgs/writers.nix
@@ -144,9 +144,14 @@ with import <stockholm/lib>;
env = filevars // { passAsFile = attrNames filevars; };
in
+ # Use a subshell because <nixpkgs/stdenv/generic/setup.sh>'s genericBuild
+ # sources (or evaluates) the buildCommand and we don't want to modify its
+ # shell. In particular, exitHandler breaks in multiple ways with set -u.
pkgs.runCommand name env /* sh */ ''
- set -efu
- ${concatMapStringsSep "\n" (getAttr "install") files}
+ (
+ set -efu
+ ${concatMapStringsSep "\n" (getAttr "install") files}
+ )
'';
writeHaskell =