2018-05-19 12:01:59 +02:00
|
|
|
{ stdenv, buildGoPackage, fetchzip }:
|
2018-05-19 10:15:26 +02:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
name = "wireguard-go-${version}";
|
2018-06-09 05:02:56 +02:00
|
|
|
version = "0.0.20180531";
|
2018-05-19 10:15:26 +02:00
|
|
|
|
2018-06-09 05:02:56 +02:00
|
|
|
goPackagePath = "git.zx2c4.com/wireguard-go";
|
2018-05-19 10:15:26 +02:00
|
|
|
|
2018-05-19 12:01:59 +02:00
|
|
|
src = fetchzip {
|
2018-05-19 10:15:26 +02:00
|
|
|
url = "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-${version}.tar.xz";
|
2018-06-09 05:02:56 +02:00
|
|
|
sha256 = "1vs11kr5a2s99v0g7079nfrfvmjfh1p2lnkj2icjyn2cb0s1vqiy";
|
2018-05-19 10:15:26 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
goDeps = ./deps.nix;
|
|
|
|
|
2018-05-19 11:42:13 +02:00
|
|
|
postPatch = ''
|
2018-05-19 10:15:26 +02: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-22 02:52:47 +02:00
|
|
|
maintainers = with maintainers; [ kirelagin zx2c4 ];
|
|
|
|
platforms = platforms.darwin;
|
2018-05-19 10:15:26 +02:00
|
|
|
};
|
|
|
|
}
|