Commit a2093d3f authored by OPNA2608's avatar OPNA2608
Browse files

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.
parent 42b3a635
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"