2018-05-19 11:01:59 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchzip }:
|
2018-05-19 09:15:26 +01:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
name = "wireguard-go-${version}";
|
2018-05-22 01:16:33 +01:00
|
|
|
version = "0.0.20180519";
|
2018-05-19 09:15:26 +01:00
|
|
|
|
|
|
|
goPackagePath = "wireguard-go";
|
|
|
|
|
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";
|
2018-05-22 01:40:14 +01:00
|
|
|
sha256 = "0b3wpc0ccf24567fjafv1sjs3yqq1xjam3gpfp37avxqy9789nb7";
|
2018-05-19 09:15:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
goDeps = ./deps.nix;
|
|
|
|
|
2018-05-19 10:42:13 +01:00
|
|
|
postPatch = ''
|
2018-05-19 09:15:26 +01:00
|
|
|
# Replace local imports so that go tools do not trip on them
|
|
|
|
find . -name '*.go' -exec sed -i '/import (/,/)/s@"./@"${goPackagePath}/@' {} \;
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Userspace Go implementation of WireGuard";
|
|
|
|
homepage = https://git.zx2c4.com/wireguard-go/about/;
|
|
|
|
license = licenses.gpl2;
|
2018-05-19 12:25:57 +01:00
|
|
|
maintainers = with maintainers; [ kirelagin ];
|
2018-05-22 01:16:33 +01:00
|
|
|
platforms = with platforms; darwin;
|
2018-05-19 09:15:26 +01:00
|
|
|
};
|
|
|
|
}
|