From b7fb205edeabae7c8e9be21cfbb53233b2ab7c39 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Wed, 26 Feb 2025 21:46:11 +0800 Subject: [PATCH] udpspeeder: init at 20230206.0 --- pkgs/by-name/ud/udpspeeder/package.nix | 56 ++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 pkgs/by-name/ud/udpspeeder/package.nix diff --git a/pkgs/by-name/ud/udpspeeder/package.nix b/pkgs/by-name/ud/udpspeeder/package.nix new file mode 100644 index 000000000000..c1be213d7195 --- /dev/null +++ b/pkgs/by-name/ud/udpspeeder/package.nix @@ -0,0 +1,56 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + versionCheckHook, + nix-update-script, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "udpspeeder"; + version = "20230206.0"; + + src = fetchFromGitHub { + owner = "wangyu-"; + repo = "UDPspeeder"; + tag = finalAttrs.version; + hash = "sha256-hrwkPSxY1DTEXt9vxDECDEJaoTDzBUS7rVI609uZwdU="; + }; + + preBuild = '' + echo "const char *gitversion = \"${finalAttrs.version}\";" > git_version.h # From Makefile + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$PWD" + ''; + + nativeBuildInputs = [ + cmake + ]; + + installPhase = '' + runHook preInstall + + install -Dm755 ./speederv2 $out/bin/speederv2 + + runHook postInstall + ''; + + nativeCheckInputs = [ + versionCheckHook + ]; + doInstallCheck = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + homepage = "https://github.com/wangyu-/UDPspeeder"; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ bot-wxt1221 ]; + license = lib.licenses.mit; + changelog = "https://github.com/wangyu-/UDPspeeder/releases/tag/${finalAttrs.version}"; + description = "Tunnel which Improves your Network Quality on a High-latency Lossy Link by using Forward Error Correction, possible for All Traffics(TCP/UDP/ICMP)"; + mainProgram = "speederv2"; + }; +})