From 5efa5790dc6e1cc2ec684c61ca1fffd6a3f0ca71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandru=20Scvor=C8=9Bov?= Date: Tue, 28 Oct 2025 09:55:09 +0000 Subject: [PATCH] matrix-tuwunel: 1.4.2->1.4.5 --- pkgs/by-name/ma/matrix-tuwunel/package.nix | 27 +++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ma/matrix-tuwunel/package.nix b/pkgs/by-name/ma/matrix-tuwunel/package.nix index b7fe6422f9c8..e1f6f403077f 100644 --- a/pkgs/by-name/ma/matrix-tuwunel/package.nix +++ b/pkgs/by-name/ma/matrix-tuwunel/package.nix @@ -3,6 +3,7 @@ rustPlatform, fetchFromGitHub, pkg-config, + libredirect, bzip2, zstd, stdenv, @@ -17,6 +18,7 @@ enableLiburing ? stdenv.hostPlatform.isLinux, liburing, nixosTests, + writeTextFile, }: let rust-jemalloc-sys' = rust-jemalloc-sys.override { @@ -85,16 +87,16 @@ let in rustPlatform.buildRustPackage (finalAttrs: { pname = "matrix-tuwunel"; - version = "1.4.2"; + version = "1.4.5"; src = fetchFromGitHub { owner = "matrix-construct"; repo = "tuwunel"; tag = "v${finalAttrs.version}"; - hash = "sha256-h7a8nbKZ6cK6SoAGwORc6+D+jJxQOut7y5KzHfBbqDE="; + hash = "sha256-tZKq8ypDU1MkWORHFQhieDSUOqOzBcfqIQ40amyc1ls="; }; - cargoHash = "sha256-RjoO5eiAXYhC8Tg5UNqCpBsFVN1I+0UhchslAmhm0Qo="; + cargoHash = "sha256-x+LhpwDytwH/NzKWqAuRRbX77OZ2JGaYSaQxqinf81Q="; nativeBuildInputs = [ pkg-config @@ -137,6 +139,25 @@ rustPlatform.buildRustPackage (finalAttrs: { ] ++ lib.optional enableLiburing "io_uring"; + nativeCheckInputs = [ + libredirect.hook + ]; + + preCheck = + let + fakeResolvConf = writeTextFile { + name = "resolv.conf"; + text = '' + nameserver 0.0.0.0 + ''; + }; + in + '' + export NIX_REDIRECTS="/etc/resolv.conf=${fakeResolvConf}" + export TUWUNEL_DATABASE_PATH="$(mktemp -d)/smoketest.db" + ''; + doCheck = true; + passthru = { rocksdb = rocksdb'; # make used rocksdb version available (e.g., for backup scripts) updateScript = nix-update-script { };