mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
Make chroot builds easier to set up
By default, we now include /bin/sh as a bind-mount of bash.
This commit is contained in:
parent
7a60ff9a62
commit
bb45092f72
2 changed files with 11 additions and 0 deletions
|
@ -93,6 +93,14 @@ let
|
||||||
--sysconfdir=/etc
|
--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;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
makeFlags = "profiledir=$(out)/etc/profile.d";
|
makeFlags = "profiledir=$(out)/etc/profile.d";
|
||||||
|
|
|
@ -48,6 +48,9 @@ Settings::Settings()
|
||||||
useSubstitutes = true;
|
useSubstitutes = true;
|
||||||
buildUsersGroup = getuid() == 0 ? "nixbld" : "";
|
buildUsersGroup = getuid() == 0 ? "nixbld" : "";
|
||||||
useChroot = false;
|
useChroot = false;
|
||||||
|
#ifdef DEFAULT_CHROOT_DIRS
|
||||||
|
dirsInChroot = tokenizeString<StringSet>(DEFAULT_CHROOT_DIRS, ":");
|
||||||
|
#endif
|
||||||
useSshSubstituter = true;
|
useSshSubstituter = true;
|
||||||
impersonateLinux26 = false;
|
impersonateLinux26 = false;
|
||||||
keepLog = true;
|
keepLog = true;
|
||||||
|
|
Loading…
Reference in a new issue