blob: 4dc6e52b2e94f7863b9430f074b63df308a9d5fd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
{ stdenv, buildGoPackage, fetchzip }:
buildGoPackage rec {
name = "wireguard-go-${version}";
version = "0.0.20180519";
goPackagePath = "wireguard-go";
src = fetchzip {
url = "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-${version}.tar.xz";
sha256 = "0b3wpc0ccf24567fjafv1sjs3yqq1xjam3gpfp37avxqy9789nb7";
};
goDeps = ./deps.nix;
postPatch = ''
# 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;
maintainers = with maintainers; [ kirelagin ];
platforms = with platforms; darwin;
};
}
|