about summary refs log tree commit diff
path: root/third_party/nix/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/CMakeLists.txt')
-rw-r--r--third_party/nix/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/third_party/nix/CMakeLists.txt b/third_party/nix/CMakeLists.txt
index 6a9ab6bf8a8f..e37bef9383b3 100644
--- a/third_party/nix/CMakeLists.txt
+++ b/third_party/nix/CMakeLists.txt
@@ -40,6 +40,15 @@ if (CLANG_TIDY_PATH)
   endif()
 endif()
 
+if (NOT SANDBOX_SHELL)
+  find_program(BUSYBOX busybox)
+  if (BUSYBOX)
+    set(SANDBOX_SHELL "${BUSYBOX}")
+  else()
+    message(FATAL_ERROR "Could not find busybox and SANDBOX_SHELL is not set")
+  endif()
+endif()
+
 # generate a configuration file (autoheader-style) to configure
 # certain symbols that Nix depends on.
 configure_file(config.h.in nix_config.h @ONLY)