Skip to content

Commit a3a1c2d

Browse files
committed
prevent electrsd network call during build for nix flake
1 parent f7ad4a4 commit a3a1c2d

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

flake.nix

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@
128128
}
129129
) craneLibVersions;
130130

131+
# nixpkgs' blockstream-electrs build runs a flaky `test_electrum`
132+
# integration test that fails on some sandboxes. Skip its checks.
133+
blockstreamElectrs = pkgs.blockstream-electrs.overrideAttrs (_: {
134+
doCheck = false;
135+
});
136+
131137
commonArgs = {
132138
inherit src;
133139
strictDeps = true;
@@ -140,6 +146,8 @@
140146

141147
# tell bitcoind crate not to try to download during build
142148
BITCOIND_SKIP_DOWNLOAD = 1;
149+
# same for electrsd (used in payjoin-cli esplora e2e tests)
150+
ELECTRSD_SKIP_DOWNLOAD = 1;
143151
};
144152

145153
# Per-toolchain common args that include pre-vendored deps
@@ -276,6 +284,8 @@
276284
];
277285
BITCOIND_EXE = pkgs.lib.getExe' pkgs.bitcoind "bitcoind";
278286
BITCOIND_SKIP_DOWNLOAD = 1;
287+
ELECTRS_EXE = pkgs.lib.getExe' blockstreamElectrs "electrs";
288+
ELECTRSD_SKIP_DOWNLOAD = 1;
279289
}
280290
) craneLibVersions;
281291

@@ -375,8 +385,12 @@
375385
partitionType = "count";
376386
cargoExtraArgs = "--locked --workspace --all-features --exclude payjoin-fuzz";
377387
BITCOIND_EXE = nixpkgs.lib.getExe' pkgs.bitcoind "bitcoind";
388+
ELECTRS_EXE = nixpkgs.lib.getExe' blockstreamElectrs "electrs";
378389
NGINX_EXE = nixpkgs.lib.getExe' nginxWithStream "nginx";
379-
nativeBuildInputs = [ nginxWithStream ];
390+
nativeBuildInputs = [
391+
nginxWithStream
392+
blockstreamElectrs
393+
];
380394
doInstallCargoArtifacts = false;
381395
}
382396
)

0 commit comments

Comments
 (0)