diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 9fa89838d16..6fd5c335ad1 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1997,6 +1997,11 @@ github = "kini"; name = "Keshav Kini"; }; + kirelagin = { + email = "kirelagin@gmail.com"; + github = "kirelagin"; + name = "Kirill Elagin"; + }; kkallio = { email = "tierpluspluslists@gmail.com"; name = "Karn Kallio"; diff --git a/pkgs/tools/networking/wireguard-go/default.nix b/pkgs/tools/networking/wireguard-go/default.nix new file mode 100644 index 00000000000..e27b241e755 --- /dev/null +++ b/pkgs/tools/networking/wireguard-go/default.nix @@ -0,0 +1,28 @@ +{ stdenv, buildGoPackage, fetchzip }: + +buildGoPackage rec { + name = "wireguard-go-${version}"; + version = "0.0.20180514"; + + goPackagePath = "wireguard-go"; + + src = fetchzip { + url = "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-${version}.tar.xz"; + sha256 = "1i1w4vj8w353b92nfhs92k0f7fifrwi067qfmgckdk0kk76nv2id"; + }; + + 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; linux ++ darwin ++ windows; + }; +} diff --git a/pkgs/tools/networking/wireguard-go/deps.nix b/pkgs/tools/networking/wireguard-go/deps.nix new file mode 100644 index 00000000000..88381d5f207 --- /dev/null +++ b/pkgs/tools/networking/wireguard-go/deps.nix @@ -0,0 +1,30 @@ +# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix) +[ + { + goPackagePath = "golang.org/x/crypto"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/crypto"; + rev = "1a580b3eff7814fc9b40602fd35256c63b50f491"; + sha256 = "11adgxc6fzcb3dxr5v2g4nk6ggrz04qnx633hzgmzfh2wv3blgv7"; + }; + } + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "2491c5de3490fced2f6cff376127c667efeed857"; + sha256 = "1wmijnrxi9p2rv8g6clqkzdihn5ncv29j0s4s1bz9ksncdr36ll3"; + }; + } + { + goPackagePath = "golang.org/x/sys"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sys"; + rev = "7c87d13f8e835d2fb3a70a2912c811ed0c1d241b"; + sha256 = "03fhkng37rczqwfgah5hd7d373jps3hcfx79dmky2fh62yvpcyn3"; + }; + } +] \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 63e9be24226..2129477e4b6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5718,6 +5718,8 @@ with pkgs; wipe = callPackage ../tools/security/wipe { }; + wireguard-go = callPackage ../tools/networking/wireguard-go { }; + wkhtmltopdf = callPackage ../tools/graphics/wkhtmltopdf { overrideDerivation = lib.overrideDerivation; };