snapcraft: make SSL certs available during tests (#407991)

This commit is contained in:
Ramses
2025-05-17 22:52:08 +02:00
committed by GitHub
+6
View File
@@ -7,6 +7,7 @@
nix-update-script,
python3Packages,
squashfsTools,
cacert,
stdenv,
writableTmpDirAsHomeHook,
}:
@@ -118,6 +119,11 @@ python3Packages.buildPythonApplication rec {
wrapProgram $out/bin/snapcraft --prefix PATH : ${squashfsTools}/bin
'';
preCheck = ''
# _pygit2.GitError: OpenSSL error: failed to load certificates: error:00000000:lib(0)::reason(0)
export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
'';
nativeCheckInputs =
with python3Packages;
[