wireguard-tools: add updateScript

This commit is contained in:
Florian Klink 2019-06-01 22:17:25 +02:00
parent b7d1bd8efb
commit f3ce2151db
2 changed files with 9 additions and 0 deletions

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"