mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
Add --with-sandbox-shell configure flag
And add a 116 KiB ash shell from busybox to the release build. This helps to make sandbox builds work out of the box on non-NixOS systems and with diverted stores.
This commit is contained in:
parent
b30f5784d0
commit
a2d92bb20e
7 changed files with 38 additions and 12 deletions
21
release-common.nix
Normal file
21
release-common.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ pkgs }:
|
||||
|
||||
rec {
|
||||
sh = pkgs.busybox.override {
|
||||
useMusl = true;
|
||||
enableStatic = true;
|
||||
enableMinimal = true;
|
||||
extraConfig = ''
|
||||
CONFIG_ASH y
|
||||
CONFIG_ASH_BUILTIN_ECHO y
|
||||
CONFIG_ASH_BUILTIN_TEST y
|
||||
CONFIG_ASH_OPTIMIZE_FOR_SIZE y
|
||||
'';
|
||||
};
|
||||
|
||||
configureFlags =
|
||||
[ "--disable-init-state"
|
||||
"--enable-gc"
|
||||
"--with-sandbox-shell=${sh}/bin/busybox"
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue