2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildGoPackage, fetchzip }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "wireguard-go";
|
2020-05-15 21:57:56 +00:00
|
|
|
version = "0.0.20200320";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
goPackagePath = "golang.zx2c4.com/wireguard";
|
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-${version}.tar.xz";
|
2020-05-15 21:57:56 +00:00
|
|
|
sha256 = "0fy4qsss3i3pkq1rpgjds4aipbwlh1dr9hbbf7jn2a1c63kfks0r";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./0001-Fix-darwin-build.patch ];
|
|
|
|
|
|
|
|
goDeps = ./deps.nix;
|
|
|
|
|
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/wireguard $out/bin/wireguard-go
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Userspace Go implementation of WireGuard";
|
|
|
|
homepage = "https://git.zx2c4.com/wireguard-go/about/";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ elseym kirelagin yegortimoshenko zx2c4 ];
|
|
|
|
};
|
|
|
|
}
|