backrest: fix tests on Darwin

+10 -4
+10 -4
pkgs/by-name/ba/backrest/package.nix
··· 2 buildGoModule, 3 fetchFromGitHub, 4 gzip, 5 lib, 6 nodejs, 7 pnpm_9, 8 restic, ··· 76 go generate -skip="npm" ./... 77 ''; 78 79 - nativeCheckInputs = [ util-linux ]; 80 81 checkFlags = 82 let ··· 96 # Use restic from nixpkgs, otherwise download fails in sandbox 97 export BACKREST_RESTIC_COMMAND="${restic}/bin/restic" 98 export HOME=$(pwd) 99 ''; 100 101 - # skip tests on darwin due to /etc/protocols failure 102 - # `__darwinAllowLocalNetworking = true;` wasn't sufficient 103 - doCheck = !stdenv.isDarwin; 104 105 postInstall = '' 106 wrapProgram $out/bin/backrest \
··· 2 buildGoModule, 3 fetchFromGitHub, 4 gzip, 5 + iana-etc, 6 lib, 7 + libredirect, 8 nodejs, 9 pnpm_9, 10 restic, ··· 78 go generate -skip="npm" ./... 79 ''; 80 81 + nativeCheckInputs = [ 82 + util-linux 83 + ] 84 + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libredirect.hook ]; 85 86 checkFlags = 87 let ··· 101 # Use restic from nixpkgs, otherwise download fails in sandbox 102 export BACKREST_RESTIC_COMMAND="${restic}/bin/restic" 103 export HOME=$(pwd) 104 + '' 105 + + lib.optionalString (stdenv.hostPlatform.isDarwin) '' 106 + export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/services=${iana-etc}/etc/services 107 ''; 108 109 + doCheck = true; 110 111 postInstall = '' 112 wrapProgram $out/bin/backrest \