Merge pull request #214727 from OPNA2608/fix/haguichi_updatescript

haguichi: Add passthru.updateScript
This commit is contained in:
Nick Cao 2023-02-08 08:48:04 +08:00 committed by GitHub
commit e0c2ea5846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View File

@ -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/";

View 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"