summary refs log tree commit diff
path: root/pkgs/tools/networking/wireguard-go/default.nix
blob: 6f7bc6caa7f0511955936c3d1d205e0c09ad6954 (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
29
30
{ lib, buildGoPackage, fetchzip }:

buildGoPackage rec {
  pname = "wireguard-go";
  version = "0.0.20210424";

  goPackagePath = "golang.zx2c4.com/wireguard";

  src = fetchzip {
    url = "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-${version}.tar.xz";
    sha256 = "RUUueSsfEi1H+ckrnPKqbVlWONhCplMMftlyAmwK+ss=";
  };

  goDeps = ./deps.nix;

  passthru.updateScript = ./update.sh;

  postInstall = ''
    mv $out/bin/wireguard $out/bin/wireguard-go
  '';

  doCheck = true;

  meta = with lib; {
    description = "Userspace Go implementation of WireGuard";
    homepage = "https://git.zx2c4.com/wireguard-go/about/";
    license = licenses.mit;
    maintainers = with maintainers; [ elseym kirelagin yana zx2c4 ];
  };
}