From 75775507721e12796782900eff29ab71f01cb37b Mon Sep 17 00:00:00 2001 From: AveryanAlex Date: Thu, 1 Aug 2024 20:59:20 +0300 Subject: [PATCH] amneziawg-go: init at 0.2.12 --- pkgs/by-name/am/amneziawg-go/package.nix | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pkgs/by-name/am/amneziawg-go/package.nix diff --git a/pkgs/by-name/am/amneziawg-go/package.nix b/pkgs/by-name/am/amneziawg-go/package.nix new file mode 100644 index 0000000000000..fa5f47cffa81d --- /dev/null +++ b/pkgs/by-name/am/amneziawg-go/package.nix @@ -0,0 +1,44 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + nix-update-script, +}: + +buildGoModule rec { + pname = "amneziawg-go"; + version = "0.2.12"; + + src = fetchFromGitHub { + owner = "amnezia-vpn"; + repo = "amneziawg-go"; + rev = "v${version}"; + hash = "sha256-Xw2maGmNnx0+GO3OWS1Gu77oB9wh2dv+WobypQotUMA="; + }; + + postPatch = '' + # Skip formatting tests + rm -f format_test.go + ''; + + vendorHash = "sha256-zXd9PK3fpOx/YjCNs2auZWhbLUk2fO6tyLV5FxAH0us="; + + subPackages = [ "." ]; + + ldflags = [ + "-s" + "-w" + ]; + + strictDeps = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Userspace Go implementation of AmneziaWG"; + homepage = "https://github.com/amnezia-vpn/amneziawg-go"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ averyanalex ]; + mainProgram = "amneziawg-go"; + }; +}