about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/networking/haguichi
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/networking/haguichi')
-rw-r--r--nixpkgs/pkgs/tools/networking/haguichi/default.nix57
-rwxr-xr-xnixpkgs/pkgs/tools/networking/haguichi/update.sh13
2 files changed, 70 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/networking/haguichi/default.nix b/nixpkgs/pkgs/tools/networking/haguichi/default.nix
new file mode 100644
index 000000000000..a921884dda06
--- /dev/null
+++ b/nixpkgs/pkgs/tools/networking/haguichi/default.nix
@@ -0,0 +1,57 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, python3
+, vala
+, wrapGAppsHook
+, desktop-file-utils
+, glib
+, gtk3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "haguichi";
+  version = "1.4.6";
+
+  src = fetchFromGitHub {
+    owner = "ztefn";
+    repo = "haguichi";
+    rev = version;
+    hash = "sha256-H/Aw8zJOioOLWxiM/pMb+QSIoEp3zIkLb26S6QN3hv0=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    python3
+    vala
+    wrapGAppsHook
+    desktop-file-utils # for update-desktop-database
+    glib # for glib-compile-resources
+    gtk3 # for gtk-update-icon-cache
+  ];
+
+  buildInputs = [
+    glib
+    gtk3
+  ];
+
+  postPatch = ''
+    patchShebangs meson_post_install.py
+  '';
+
+  passthru.updateScript = ./update.sh;
+
+  meta = with lib; {
+    description = "Graphical frontend for Hamachi on Linux";
+    mainProgram = "haguichi";
+    homepage = "https://haguichi.net/";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ OPNA2608 ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/networking/haguichi/update.sh b/nixpkgs/pkgs/tools/networking/haguichi/update.sh
new file mode 100755
index 000000000000..49a76a79d7ae
--- /dev/null
+++ b/nixpkgs/pkgs/tools/networking/haguichi/update.sh
@@ -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"