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
buildGoModule,
3
fetchFromGitHub,
4
gzip,
0
5
lib,
0
6
nodejs,
7
pnpm_9,
8
restic,
···
76
go generate -skip="npm" ./...
77
'';
78
79
-
nativeCheckInputs = [ util-linux ];
0
0
0
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)
0
0
0
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;
0
0
110
111
postInstall = ''
112
wrapProgram $out/bin/backrest \