From a0d29376431a5c04e0a4ea90cc43b1d81a311781 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 6 Aug 2022 14:43:08 -0700 Subject: [PATCH] nix: if isStatic && atLeast210 then --enable-embedded-sandbox-shell This commit enables the embedded sandbox shell for static builds of nix>=2.10. --- pkgs/tools/package-management/nix/common.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix index 72978db577a6..d85e40bdc28a 100644 --- a/pkgs/tools/package-management/nix/common.nix +++ b/pkgs/tools/package-management/nix/common.nix @@ -169,6 +169,8 @@ self = stdenv.mkDerivation { "--disable-init-state" ] ++ lib.optionals stdenv.isLinux [ "--with-sandbox-shell=${busybox-sandbox-shell}/bin/busybox" + ] ++ lib.optionals (atLeast210 && stdenv.isLinux && stdenv.hostPlatform.isStatic) [ + "--enable-embedded-sandbox-shell" ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform ? nix && stdenv.hostPlatform.nix ? system) [ "--with-system=${stdenv.hostPlatform.nix.system}" ] ++ lib.optionals (!withLibseccomp) [