From 09a6be7bd1789f122e3e9f1a20bc4306b12267bc Mon Sep 17 00:00:00 2001 From: Haylin Moore Date: Mon, 9 Nov 2026 13:54:53 -0800 Subject: [PATCH 1/2] dufs: fix tests with system aws-lc The tests build reqwest, which pulls in aws-lc-sys. Since 44cddf92c432 ("rustPlatform.cargoSetupHook: Force system libs") that needs the system aws-lc, so add it and pkg-config to the check inputs. --- 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 a241bbe6c87e..2e9399e94d89 100644 --- a/pkgs/by-name/du/dufs/package.nix +++ b/pkgs/by-name/du/dufs/package.nix @@ -1,8 +1,10 @@ { lib, + aws-lc, rustPlatform, fetchFromGitHub, installShellFiles, + pkg-config, nixosTests, stdenv, cacert, @@ -23,6 +25,9 @@ rustPlatform.buildRustPackage (finalAttrs: { nativeBuildInputs = [ installShellFiles ]; + nativeCheckInputs = [ pkg-config ]; + checkInputs = [ aws-lc ]; + __darwinAllowLocalNetworking = true; preCheck = '' From a90fd2d4511f5661065dd4fe8d79e9cb1781428a Mon Sep 17 00:00:00 2001 From: Haylin Moore Date: Mon, 9 Nov 2026 13:54:53 -0800 Subject: [PATCH 2/2] dufs: run tests serially The test fixtures pick a port by briefly listening on it, and a dufs server spawned by a parallel test at that moment inherits the listener until exec, so tests randomly connected to it instead of dufs and failed with "connection refused". --- pkgs/by-name/du/dufs/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/du/dufs/package.nix b/pkgs/by-name/du/dufs/package.nix index 2e9399e94d89..8c7b03b54d8d 100644 --- a/pkgs/by-name/du/dufs/package.nix +++ b/pkgs/by-name/du/dufs/package.nix @@ -30,6 +30,9 @@ rustPlatform.buildRustPackage (finalAttrs: { __darwinAllowLocalNetworking = true; + # The tests pick free ports in a racy way when run in parallel. + dontUseCargoParallelTests = true; + preCheck = '' export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt '';