wireguard-tools, wireguard-go: add update scripts, wireguard-go: 0.0.20181222 -> 0.0.20190517 (#62432)

wireguard-tools, wireguard-go: add update scripts, wireguard-go: 0.0.20181222 -> 0.0.20190517
This commit is contained in:
Florian Klink 2019-06-02 19:48:35 +02:00 committed by GitHub
commit f71206190f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 60 additions and 8 deletions

View file

@ -2,17 +2,19 @@
buildGoPackage rec {
name = "wireguard-go-${version}";
version = "0.0.20181222";
version = "0.0.20190517";
goPackagePath = "git.zx2c4.com/wireguard-go";
src = fetchzip {
url = "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-${version}.tar.xz";
sha256 = "00m1r97qrr4l21s5jk5m3xfpiybqbzgxp9failsy1nmx27wrdiky";
sha256 = "0ir3dp13vkkqr76q0jvw610qw40053ngk51psqhqxfaw3jicdqgr";
};
goDeps = ./deps.nix;
passthru.updateScript = ./update.sh;
meta = with stdenv.lib; {
description = "Userspace Go implementation of WireGuard";
homepage = https://git.zx2c4.com/wireguard-go/about/;

View file

@ -1,12 +1,30 @@
# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
[
{
goPackagePath = "github.com/Microsoft/go-winio";
fetch = {
type = "git";
url = "https://github.com/Microsoft/go-winio";
rev = "v0.4.12";
sha256 = "10v2f1xaw2cc97mjqnxzgs9ydpqv71f0ynp1spcywqw97la56zqw";
};
}
{
goPackagePath = "github.com/pkg/errors";
fetch = {
type = "git";
url = "https://github.com/pkg/errors";
rev = "v0.8.1";
sha256 = "0g5qcb4d4fd96midz0zdk8b9kz8xkzwfa8kr1cliqbg8sxsy5vd1";
};
}
{
goPackagePath = "golang.org/x/crypto";
fetch = {
type = "git";
url = "https://go.googlesource.com/crypto";
rev = "505ab145d0a9";
sha256 = "1vbsvcvmjz6c00p5vf8ls533p52fx2y3gy6v4k5qrdlzl4wf0i5s";
rev = "a29dc8fdc734";
sha256 = "07f0jj4haqs0ywc1akk1qjwn5msl2j0pry1rxjkkbfcq4r6ihc1p";
};
}
{
@ -14,8 +32,8 @@
fetch = {
type = "git";
url = "https://go.googlesource.com/net";
rev = "610586996380";
sha256 = "1sqwmvf70rq1j65lv5jzyiy7gd53l37dxlnjf2xj6p2i4fcwkk4z";
rev = "7f726cade0ab";
sha256 = "0zv5var5agbhd2mcn7lciwip0j49gxka73f0csvh3hvb1di068gn";
};
}
{
@ -23,8 +41,17 @@
fetch = {
type = "git";
url = "https://go.googlesource.com/sys";
rev = "2a47403f2ae5";
sha256 = "0ww1iz1zcw995957h32289yascl37pkvfj3qcvyghvnzf7xg9v6z";
rev = "a43fa875dd82";
sha256 = "0xvwwaqcj02a9n8izs4zrlg8vvz7wffli955i93nc34m1f0w8vyg";
};
}
{
goPackagePath = "golang.org/x/text";
fetch = {
type = "git";
url = "https://go.googlesource.com/text";
rev = "v0.3.0";
sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19";
};
}
]

View file

@ -0,0 +1,14 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused common-updater-scripts vgo2nix
set -eu -o pipefail
basedir="$(git rev-parse --show-toplevel)"
version="$(curl -sL https://build.wireguard.com/distros.txt | sed -n 's/^upstream\tgo\t\([^\t]\+\)\t.*/\1/p')"
update-source-version wireguard-go "$version"
vgo2nix -dir $(nix-build -A wireguard-go.src) -outfile "$basedir/pkgs/tools/networking/wireguard-go/deps.nix"
if [[ -f "$basedir/wireguard-go.log" ]];then
rm "$basedir/wireguard-go.log"
fi

View file

@ -37,6 +37,8 @@ stdenv.mkDerivation rec {
done
'';
passthru.updateScript = ./update.sh;
meta = with stdenv.lib; {
description = "Tools for the WireGuard secure network tunnel";
downloadPage = https://git.zx2c4.com/WireGuard/refs/;

View file

@ -0,0 +1,7 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused common-updater-scripts
set -eu -o pipefail
version="$(curl -sL https://build.wireguard.com/distros.txt | sed -n 's/^upstream\tkmodtools\t\([^\t]\+\)\t.*/\1/p')"
update-source-version wireguard-tools "$version"