1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/tools/networking/wireguard-go/default.nix

29 lines
835 B
Nix
Raw Normal View History

{ stdenv, buildGoPackage, fetchzip }:
2018-05-19 09:15:26 +01:00
buildGoPackage rec {
name = "wireguard-go-${version}";
version = "0.0.20180514";
goPackagePath = "wireguard-go";
src = fetchzip {
2018-05-19 09:15:26 +01:00
url = "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-${version}.tar.xz";
sha256 = "1i1w4vj8w353b92nfhs92k0f7fifrwi067qfmgckdk0kk76nv2id";
2018-05-19 09:15:26 +01:00
};
goDeps = ./deps.nix;
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;
maintainers = with maintainers; [ kirelagin ];
2018-05-19 09:15:26 +01:00
platforms = with platforms; linux ++ darwin ++ windows;
};
}