about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2019-10-09T03·12-0400
committerEelco Dolstra <edolstra@gmail.com>2019-10-09T14·23+0200
commit9f698c4530f893141850fad4f99d7e377a372bb0 (patch)
treee77f4413afd7425ca52c2ce8cffcce206f53dd38 /src
parent1b78bbb4144c6ad4ef15f7a10fd9d479e06df5da (diff)
Handle empty sandbox_shell
Previously, SANDBOX_SHELL was set to empty when unavailable. This
caused issues when actually generating the sandbox. Instead, just set
SANDBOX_SHELL when --with-sandbox-shell= is non-empty. Alternative
implementation to https://github.com/NixOS/nix/pull/3038.

(cherry picked from commit 199e888785bd23073e44e56f6c74b95dc7c10ffa)
Diffstat (limited to 'src')
-rw-r--r--src/libstore/local.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/local.mk b/src/libstore/local.mk
index 89fc918c30fd..d690fea28c23 100644
--- a/src/libstore/local.mk
+++ b/src/libstore/local.mk
@@ -39,9 +39,12 @@ libstore_CXXFLAGS = \
  -DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
  -DNIX_BIN_DIR=\"$(bindir)\" \
  -DNIX_MAN_DIR=\"$(mandir)\" \
- -DSANDBOX_SHELL="\"$(sandbox_shell)\"" \
  -DLSOF=\"$(lsof)\"
 
+ifneq ($(sandbox_shell),)
+libstore_CXXFLAGS += -DSANDBOX_SHELL="\"$(sandbox_shell)\""
+endif
+
 $(d)/local-store.cc: $(d)/schema.sql.gen.hh
 
 $(d)/build.cc: