fix: Darwin compat
(cherry picked from commit 711d95877a039bcd5b162604a22d1c051b59a49d)
This commit is contained in:
parent
c7278d429f
commit
122ee75ce3
2 changed files with 8 additions and 5 deletions
|
|
@ -47,10 +47,10 @@
|
|||
# NOTE: duplicated in flake.nix devShell
|
||||
env = {
|
||||
LIBCLANG_PATH =
|
||||
if pkgs.stdenv.cc.isClang then
|
||||
null # don't set the variable
|
||||
else
|
||||
lib.makeLibraryPath [ pkgs.buildPackages.llvmPackages.clang-unwrapped ];
|
||||
lib.makeLibraryPath [ pkgs.buildPackages.llvmPackages.clang-unwrapped ];
|
||||
BINDGEN_EXTRA_CLANG_ARGS =
|
||||
# Work around missing [[deprecated]] in clang
|
||||
"-x c++ -std=c++2a";
|
||||
} // lib.optionalAttrs pkgs.stdenv.cc.isGNU {
|
||||
# Avoid cc wrapper, because we only need to add the compiler/"system" dirs
|
||||
NIX_CC_UNWRAPPED = "${pkgs.stdenv.cc.cc}/bin/gcc";
|
||||
|
|
|
|||
|
|
@ -632,7 +632,10 @@ pub fn test_init() {
|
|||
|
||||
// When testing in the sandbox, the default build dir would be a parent of the storeDir,
|
||||
// which causes an error. So we set a custom build dir here.
|
||||
nix_util::settings::set("sandbox-build-dir", "/custom-build-dir-for-test").unwrap();
|
||||
// Only available on linux
|
||||
if cfg!(target_os = "linux") {
|
||||
nix_util::settings::set("sandbox-build-dir", "/custom-build-dir-for-test").unwrap();
|
||||
}
|
||||
std::env::set_var("_NIX_TEST_NO_SANDBOX", "1");
|
||||
|
||||
// The tests run offline
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue