tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
backrest: fix tests on Darwin
Michael Daniels
4 months ago
fcde7803
d1231866
+10
-4
1 changed file
expand all
collapse all
unified
split
pkgs
by-name
ba
backrest
package.nix
+10
-4
pkgs/by-name/ba/backrest/package.nix
···
2
2
buildGoModule,
3
3
fetchFromGitHub,
4
4
gzip,
5
5
+
iana-etc,
5
6
lib,
7
7
+
libredirect,
6
8
nodejs,
7
9
pnpm_9,
8
10
restic,
···
76
78
go generate -skip="npm" ./...
77
79
'';
78
80
79
79
-
nativeCheckInputs = [ util-linux ];
81
81
+
nativeCheckInputs = [
82
82
+
util-linux
83
83
+
]
84
84
+
++ lib.optionals stdenv.hostPlatform.isDarwin [ libredirect.hook ];
80
85
81
86
checkFlags =
82
87
let
···
96
101
# Use restic from nixpkgs, otherwise download fails in sandbox
97
102
export BACKREST_RESTIC_COMMAND="${restic}/bin/restic"
98
103
export HOME=$(pwd)
104
104
+
''
105
105
+
+ lib.optionalString (stdenv.hostPlatform.isDarwin) ''
106
106
+
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/services=${iana-etc}/etc/services
99
107
'';
100
108
101
101
-
# skip tests on darwin due to /etc/protocols failure
102
102
-
# `__darwinAllowLocalNetworking = true;` wasn't sufficient
103
103
-
doCheck = !stdenv.isDarwin;
109
109
+
doCheck = true;
104
110
105
111
postInstall = ''
106
112
wrapProgram $out/bin/backrest \