From 0ca69b06507c8a66ba02774b218aa2e8ccd2b59e Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Mon, 30 Mar 2026 08:42:46 -0700 Subject: [PATCH] nix: fix nix-store-tests-run for static builds The test runner's buildInputs (writableTmpDirAsHomeHook, openssl) need to be nativeBuildInputs. In the static (cross-musl) build, strictDeps is enabled and only nativeBuildInputs are added to PATH. With buildInputs, openssl was not in PATH, causing HttpsBinaryCacheStoreTest.queryPathInfo to crash. --- .../nix/modular/src/libstore-tests/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/package-management/nix/modular/src/libstore-tests/package.nix b/pkgs/tools/package-management/nix/modular/src/libstore-tests/package.nix index e31044270a76..b7eebc6f53ca 100644 --- a/pkgs/tools/package-management/nix/modular/src/libstore-tests/package.nix +++ b/pkgs/tools/package-management/nix/modular/src/libstore-tests/package.nix @@ -62,10 +62,10 @@ mkMesonExecutable (finalAttrs: { runCommand "${finalAttrs.pname}-run" { meta.broken = !stdenv.hostPlatform.emulatorAvailable buildPackages; - buildInputs = [ + nativeBuildInputs = [ writableTmpDirAsHomeHook ] - ++ lib.optional (lib.versionAtLeast version "2.34pre") openssl; + ++ lib.optional (lib.versionAtLeast version "2.34pre") (lib.getBin openssl); } '' export _NIX_TEST_UNIT_DATA=${data + "/src/libstore-tests/data"}