diff --git a/pkgs/by-name/ma/matrix-tuwunel/package.nix b/pkgs/by-name/ma/matrix-tuwunel/package.nix index a7e994ee4dd7..da864bca6838 100644 --- a/pkgs/by-name/ma/matrix-tuwunel/package.nix +++ b/pkgs/by-name/ma/matrix-tuwunel/package.nix @@ -150,6 +150,8 @@ rustPlatform.buildRustPackage (finalAttrs: { libredirect.hook ]; + # Make sure tuwunel doesn't try to write to arbitrary + # directories or have DNS timeouts during `cargo test`. preCheck = let fakeResolvConf = writeTextFile { @@ -163,8 +165,17 @@ rustPlatform.buildRustPackage (finalAttrs: { export NIX_REDIRECTS="/etc/resolv.conf=${fakeResolvConf}" export TUWUNEL_DATABASE_PATH="$(mktemp -d)/smoketest.db" ''; + doCheck = true; + # 2026-06-24: Tuwunel has 16 integration tests. Cargo turns each of these + # into a separate binary that links in all 110 MB worth of tuwunel. Linking + # 16 big binaries like this takes a really long time and was causing Hydra + # to time out the build during `checkPhase`. So, we run the checks in the + # "debug" profile. This reduces the build+test time on my machine from + # 44min to 12min. + checkType = "debug"; + passthru = { rocksdb = rocksdb'; # make used rocksdb version available (e.g., for backup scripts) updateScript = nix-update-script { };