Unverified Commit e0c2ea58 authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

Merge pull request #214727 from OPNA2608/fix/haguichi_updatescript

haguichi: Add passthru.updateScript
parents fd58d110 a2093d3f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
#!/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"