git-lfs: disable network tests on darwin

This commit is contained in:
Gaetan Lepage
2024-12-04 17:18:15 +01:00
parent 719b30aeb3
commit cc006aed5e
+33
View File
@@ -50,6 +50,37 @@ buildGoModule rec {
unset subPackages
'';
checkFlags = lib.optionals stdenv.hostPlatform.isDarwin (
let
# Fail in the sandbox with network-related errors.
# Enabling __darwinAllowLocalNetworking is not enough.
skippedTests = [
"TestAPIBatch"
"TestAPIBatchOnlyBasic"
"TestAuthErrWithBody"
"TestAuthErrWithoutBody"
"TestCertFromSSLCAInfoConfig"
"TestCertFromSSLCAInfoEnv"
"TestCertFromSSLCAInfoEnvWithSchannelBackend"
"TestCertFromSSLCAPathConfig"
"TestCertFromSSLCAPathEnv"
"TestClientRedirect"
"TestClientRedirectReauthenticate"
"TestDoAPIRequestWithAuth"
"TestDoWithAuthApprove"
"TestDoWithAuthNoRetry"
"TestDoWithAuthReject"
"TestFatalWithBody"
"TestFatalWithoutBody"
"TestHttp2"
"TestHttpVersion"
"TestWithNonFatal500WithBody"
"TestWithNonFatal500WithoutBody"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ]
);
postInstall =
''
installManPage man/man*/*
@@ -71,6 +102,8 @@ buildGoModule rec {
updateScript = nix-update-script { };
};
__darwinAllowLocalNetworking = true;
meta = {
description = "Git extension for versioning large files";
homepage = "https://git-lfs.github.com/";