nixVersions: fix impurity trying to access the Nix daemon in libstore-tests

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.

(cherry picked from commit 778156072444fdd06812b89e86169bf45f2425df)
This commit is contained in:
Eelco Dolstra
2025-08-30 06:23:07 -07:00
committed by Philip Taron
parent 5e7b9010cf
commit e1ff94f092
@@ -67,6 +67,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} \
--gtest_filter=-${lib.concatStringsSep ":" finalAttrs.excludedTestPatterns}
touch $out