haguichi: Add passthru.updateScript
The upstream repo has regular releases and elementaryOS-specific releases. We only want the regular releases, so filter out the elementaryOS ones in a custom updateScript.
This commit is contained in:
parent
42b3a6354f
commit
a2093d3ff9
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
owner = "ztefn";
|
||||
repo = "haguichi";
|
||||
rev = version;
|
||||
sha256 = "1kgjl9g9lyg00cfx4x28s4xyqsqk5057xv6k2cj6ckg9lkxaixvc";
|
||||
hash = "sha256-bPeo+qTpTWYkE9PsfgooE2vsO9FIdNIdA+B5ml6i8s0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -44,6 +44,8 @@ stdenv.mkDerivation rec {
|
||||
patchShebangs meson_post_install.py
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Graphical frontend for Hamachi on Linux";
|
||||
homepage = "https://haguichi.net/";
|
||||
|
13
pkgs/tools/networking/haguichi/update.sh
Executable file
13
pkgs/tools/networking/haguichi/update.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
version="$(
|
||||
curl -s https://api.github.com/repos/ztefn/haguichi/releases |
|
||||
jq '.[] | select(.target_commitish!="elementary") | .tag_name' --raw-output |
|
||||
sort --version-sort --reverse |
|
||||
head -n1
|
||||
)"
|
||||
|
||||
update-source-version haguichi "$version"
|
Loading…
Reference in New Issue
Block a user