wireguard-go: add updateScript
This commit is contained in:
parent
f3ce2151db
commit
24818b25b0
pkgs/tools/networking/wireguard-go
@ -13,6 +13,8 @@ buildGoPackage rec {
|
|||||||
|
|
||||||
goDeps = ./deps.nix;
|
goDeps = ./deps.nix;
|
||||||
|
|
||||||
|
passthru.updateScript = ./update.sh;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Userspace Go implementation of WireGuard";
|
description = "Userspace Go implementation of WireGuard";
|
||||||
homepage = https://git.zx2c4.com/wireguard-go/about/;
|
homepage = https://git.zx2c4.com/wireguard-go/about/;
|
||||||
|
14
pkgs/tools/networking/wireguard-go/update.sh
Executable file
14
pkgs/tools/networking/wireguard-go/update.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user