aboutsummaryrefslogtreecommitdiff
path: root/release.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-04 17:07:28 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-04 17:09:26 +0200
commitbb45092f72d173a7754f7e4a6457d44c748a893b (patch)
tree747b4a365033dc1da3f2ebe6844a5cd0b7058b0c /release.nix
parent7a60ff9a629f6d7c36ec710738a15e713acd6a34 (diff)
Make chroot builds easier to set up
By default, we now include /bin/sh as a bind-mount of bash.
Diffstat (limited to 'release.nix')
-rw-r--r--release.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/release.nix b/release.nix
index 1f91e23b5..c43925792 100644
--- a/release.nix
+++ b/release.nix
@@ -93,6 +93,14 @@ let
--sysconfdir=/etc
'';
+ # Provide a default value for the ‘build-chroot-dirs’ setting
+ # that includes /bin/sh pointing to bash.
+ preHook = lib.optionalString stdenv.isLinux (
+ let sh = stdenv.shell; in
+ ''
+ NIX_CFLAGS_COMPILE+=" -DDEFAULT_CHROOT_DIRS=\"/bin/sh=${sh}:$(tr '\n' ':' < ${writeReferencesToFile sh})\""
+ '');
+
enableParallelBuilding = true;
makeFlags = "profiledir=$(out)/etc/profile.d";