libstore-tests: Fix impurity trying to access the Nix daemon
This failed on macOS: nix-store-tests-run> C++ exception with description "../nix_api_store.cc:33: nix_err_code(ctx) != NIX_OK, message: error: getting status of '/nix/var/nix/daemon-socket/socket': Operation not permitted" thrown in the test body.
This commit is contained in:
@@ -101,6 +101,7 @@ test(
|
||||
env : {
|
||||
'_NIX_TEST_UNIT_DATA': meson.current_source_dir() / 'data',
|
||||
'HOME': meson.current_build_dir() / 'test-home',
|
||||
'NIX_REMOTE': meson.current_build_dir() / 'test-home' / 'store',
|
||||
},
|
||||
protocol : 'gtest',
|
||||
)
|
||||
|
||||
@@ -77,6 +77,7 @@ mkMesonExecutable (finalAttrs: {
|
||||
}
|
||||
(''
|
||||
export _NIX_TEST_UNIT_DATA=${data + "/src/libstore-tests/data"}
|
||||
export NIX_REMOTE=$HOME/store
|
||||
${stdenv.hostPlatform.emulator buildPackages} ${lib.getExe finalAttrs.finalPackage}
|
||||
touch $out
|
||||
'');
|
||||
|
||||
Reference in New Issue
Block a user