From 09cb41b7ac6ff436fc7554cfc59745276c4515ed Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Mon, 3 Aug 2020 20:20:30 -0400 Subject: fix(3p/nix): Properly configure SANDBOX_SHELL point the SANDBOX_SHELL macro at the actual path to busybox on the build machine, or allow it to be configured at build-time with a cmake option. Change-Id: I044a1315ba9baa3bc9ceddf29f36d14f9f9ccd96 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1632 Tested-by: BuildkiteCI Reviewed-by: tazjin --- third_party/nix/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'third_party/nix/CMakeLists.txt') 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) -- cgit 1.4.1