From 14048df284cfd680e1e347eb3c2df311232f963e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliv=C3=A9r=20Falvai?= Date: Mon, 30 Sep 2024 18:58:16 +0200 Subject: [PATCH] backrest: fix darwin build --- pkgs/by-name/ba/backrest/package.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ba/backrest/package.nix b/pkgs/by-name/ba/backrest/package.nix index af057af6b5cf..a989c6cb1fc4 100644 --- a/pkgs/by-name/ba/backrest/package.nix +++ b/pkgs/by-name/ba/backrest/package.nix @@ -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