backrest: fix darwin build (#345546)

This commit is contained in:
Sandro 2024-10-04 15:03:32 +02:00 committed by GitHub
commit 2a80ade2ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,6 +5,7 @@
lib,
restic,
util-linux,
stdenv,
}:
let
pname = "backrest";
@ -44,8 +45,17 @@ buildGoModule {
nativeCheckInputs = [ util-linux ];
# Fails with handler returned wrong content encoding
checkFlags = [ "-skip=TestServeIndex" ];
checkFlags =
let
skippedTests =
[
"TestServeIndex" # Fails with handler returned wrong content encoding
]
++ lib.optionals stdenv.isDarwin [
"TestBackup" # relies on ionice
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
preCheck = ''
# Use restic from nixpkgs, otherwise download fails in sandbox