From 9460594d8d9493c001ad63f39089eb53b5a7b4f7 Mon Sep 17 00:00:00 2001 From: wrvsrx Date: Mon, 1 Jun 2026 19:04:12 +0800 Subject: [PATCH] dufs: fix build by adding cacert to preCheck After the 0.46.0 bump introduced in #524651, `nix build .#dufs` fails because the new test suite uses reqwest's blocking client, which requires trusted CA certificates that are not available in the build sandbox. Set `SSL_CERT_FILE` in `preCheck` to point at the `cacert` bundle so the tests can construct TLS clients. --- pkgs/by-name/du/dufs/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/du/dufs/package.nix b/pkgs/by-name/du/dufs/package.nix index 3feeb18d54e3..bec0a0a62b08 100644 --- a/pkgs/by-name/du/dufs/package.nix +++ b/pkgs/by-name/du/dufs/package.nix @@ -4,6 +4,7 @@ fetchFromGitHub, installShellFiles, stdenv, + cacert, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -23,6 +24,10 @@ rustPlatform.buildRustPackage (finalAttrs: { __darwinAllowLocalNetworking = true; + preCheck = '' + export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt + ''; + checkFlags = [ # tests depend on network interface, may fail with virtual IPs. "--skip=validate_printed_urls"