From b73bf4ba93e1040411c33fb83a3b959444a4103b Mon Sep 17 00:00:00 2001 From: K900 Date: Wed, 3 Jun 2026 17:38:14 +0300 Subject: [PATCH] trusttunnel-endpoint: init at 1.0.33 --- .../tr/trusttunnel-endpoint/package.nix | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 pkgs/by-name/tr/trusttunnel-endpoint/package.nix diff --git a/pkgs/by-name/tr/trusttunnel-endpoint/package.nix b/pkgs/by-name/tr/trusttunnel-endpoint/package.nix new file mode 100644 index 000000000000..e1266df50626 --- /dev/null +++ b/pkgs/by-name/tr/trusttunnel-endpoint/package.nix @@ -0,0 +1,59 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + nix-update-script, + boringssl, + cacert, + python3, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "trusttunnel-endpoint"; + version = "1.0.33"; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "TrustTunnel"; + repo = "TrustTunnel"; + tag = "v${finalAttrs.version}"; + hash = "sha256-uTAjZbPBCVucjjrl3cYCT6+6cSxiIe/Q3jm+Oa+Fl7E="; + }; + + cargoHash = "sha256-njQL6YtnRtfpyvsxoTmsSILvyKwYqg42DXsZ8zkhBWo="; + + postPatch = '' + substituteInPlace $cargoDepsCopy/*/boring-sys-*/build/main.rs $cargoDepsCopy/*/quiche-*/src/build.rs \ + --replace-fail "cargo:rustc-link-lib=static=crypto" "cargo:rustc-link-lib=dylib=crypto" \ + --replace-fail "cargo:rustc-link-lib=static=ssl" "cargo:rustc-link-lib=dylib=ssl" + ''; + + env = { + BORING_BSSL_PATH = boringssl; + BORING_BSSL_INCLUDE_PATH = "${boringssl.dev}/include"; + }; + + nativeBuildInputs = [ + rustPlatform.bindgenHook + ]; + + buildInputs = [ + boringssl + ]; + + nativeCheckInputs = [ + cacert + python3 + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Modern, fast and obfuscated VPN protocol - endpoint component"; + homepage = "https://github.com/TrustTunnel/TrustTunnel"; + changelog = "https://github.com/TrustTunnel/TrustTunnel/blob/${finalAttrs.src.rev}/CHANGELOG.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ k900 ]; + mainProgram = "trusttunnel_endpoint"; + }; +})