nixpkgs/pkgs/tools/networking/wireguard-go/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
944 B
Nix
Raw Normal View History

{ lib, buildGoModule, fetchzip, testers, wireguard-go }:
2018-05-19 08:15:26 +00:00
buildGoModule rec {
pname = "wireguard-go";
version = "0.0.20220316";
2018-05-19 08:15:26 +00:00
src = fetchzip {
2018-05-19 08:15:26 +00:00
url = "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-${version}.tar.xz";
sha256 = "sha256-OQiG92idGwOXWX4H4HNmk2dmRM2+GtssJFzavhj1HxM=";
2018-05-19 08:15:26 +00:00
};
postPatch = ''
# Skip formatting tests
rm -f format_test.go
'';
vendorSha256 = "sha256-MrHkOj0YfvAm8zOowXzl23F1NPTCO0F8vMMGT/Y+nQ0=";
2018-05-19 08:15:26 +00:00
subPackages = [ "." ];
ldflags = [ "-s" "-w" ];
2019-06-01 20:46:56 +00:00
postInstall = ''
mv $out/bin/wireguard $out/bin/wireguard-go
'';
passthru.tests.version = testers.testVersion {
package = wireguard-go;
version = "v${version}";
};
2021-08-13 10:58:37 +00:00
meta = with lib; {
2018-05-19 08:15:26 +00:00
description = "Userspace Go implementation of WireGuard";
homepage = "https://git.zx2c4.com/wireguard-go/about/";
license = licenses.mit;
maintainers = with maintainers; [ kirelagin yana zx2c4 ];
2018-05-19 08:15:26 +00:00
};
}