2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, buildGoPackage, fetchzip }:
|
2018-05-19 09:15:26 +01:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "wireguard-go";
|
2020-05-10 00:03:16 +01:00
|
|
|
version = "0.0.20200320";
|
2018-05-19 09:15:26 +01:00
|
|
|
|
2019-10-04 02:00:00 +01:00
|
|
|
goPackagePath = "golang.zx2c4.com/wireguard";
|
2018-05-19 09:15:26 +01:00
|
|
|
|
2018-05-19 11:01:59 +01:00
|
|
|
src = fetchzip {
|
2018-05-19 09:15:26 +01:00
|
|
|
url = "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-${version}.tar.xz";
|
2020-05-10 00:03:16 +01:00
|
|
|
sha256 = "0fy4qsss3i3pkq1rpgjds4aipbwlh1dr9hbbf7jn2a1c63kfks0r";
|
2018-05-19 09:15:26 +01:00
|
|
|
};
|
|
|
|
|
2020-01-05 15:38:24 +00:00
|
|
|
patches = [ ./0001-Fix-darwin-build.patch ];
|
|
|
|
|
2018-05-19 09:15:26 +01:00
|
|
|
goDeps = ./deps.nix;
|
|
|
|
|
2019-06-01 21:46:56 +01:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2020-05-22 10:37:54 +01:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/wireguard $out/bin/wireguard-go
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-05-19 09:15:26 +01:00
|
|
|
description = "Userspace Go implementation of WireGuard";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://git.zx2c4.com/wireguard-go/about/";
|
2018-05-19 09:15:26 +01:00
|
|
|
license = licenses.gpl2;
|
2019-02-22 15:02:51 +00:00
|
|
|
maintainers = with maintainers; [ elseym kirelagin yegortimoshenko zx2c4 ];
|
2018-05-19 09:15:26 +01:00
|
|
|
};
|
|
|
|
}
|