From a715d72582851723c11a8126f9c1c378dd252bb4 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 25 Jul 2024 21:47:59 +0200 Subject: [PATCH 1/2] haguichi: 1.4.6 -> 1.5.0 --- pkgs/tools/networking/haguichi/default.nix | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/networking/haguichi/default.nix b/pkgs/tools/networking/haguichi/default.nix index ad1ad4a9a6d1..76927c4985e1 100644 --- a/pkgs/tools/networking/haguichi/default.nix +++ b/pkgs/tools/networking/haguichi/default.nix @@ -1,26 +1,29 @@ { stdenv , lib , fetchFromGitHub +, libadwaita +, libgee +, libportal-gtk4 , meson , ninja , pkg-config , python3 , vala -, wrapGAppsHook3 +, wrapGAppsHook4 , desktop-file-utils , glib -, gtk3 +, gtk4 }: stdenv.mkDerivation rec { pname = "haguichi"; - version = "1.4.6"; + version = "1.5.0"; src = fetchFromGitHub { owner = "ztefn"; repo = "haguichi"; rev = version; - hash = "sha256-H/Aw8zJOioOLWxiM/pMb+QSIoEp3zIkLb26S6QN3hv0="; + hash = "sha256-Rhag2P4GAO9qhcajwDHIkgzKZqNii/SgvFwCI6Kc8XE="; }; nativeBuildInputs = [ @@ -29,15 +32,18 @@ stdenv.mkDerivation rec { pkg-config python3 vala - wrapGAppsHook3 + wrapGAppsHook4 desktop-file-utils # for update-desktop-database glib # for glib-compile-resources - gtk3 # for gtk-update-icon-cache + gtk4 # for gtk-update-icon-cache ]; buildInputs = [ + libadwaita + libgee + libportal-gtk4 glib - gtk3 + gtk4 ]; postPatch = '' From f30c8b032c58b7efcb76ec45f178504ec2123f96 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 25 Jul 2024 21:55:15 +0200 Subject: [PATCH 2/2] haguichi: Modernise - nixfmt-rfc-style formatting - finalAttrs pattern - no meta-wide with lib - refs/tags rev - meta.changelog - reorder some things --- pkgs/tools/networking/haguichi/default.nix | 60 ++++++++++++---------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/pkgs/tools/networking/haguichi/default.nix b/pkgs/tools/networking/haguichi/default.nix index 76927c4985e1..d6bb1a1a8769 100644 --- a/pkgs/tools/networking/haguichi/default.nix +++ b/pkgs/tools/networking/haguichi/default.nix @@ -1,31 +1,38 @@ -{ stdenv -, lib -, fetchFromGitHub -, libadwaita -, libgee -, libportal-gtk4 -, meson -, ninja -, pkg-config -, python3 -, vala -, wrapGAppsHook4 -, desktop-file-utils -, glib -, gtk4 +{ + stdenv, + lib, + fetchFromGitHub, + desktop-file-utils, + glib, + gtk4, + libadwaita, + libgee, + libportal-gtk4, + meson, + ninja, + pkg-config, + python3, + vala, + wrapGAppsHook4, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "haguichi"; version = "1.5.0"; src = fetchFromGitHub { owner = "ztefn"; repo = "haguichi"; - rev = version; + rev = "refs/tags/${finalAttrs.version}"; hash = "sha256-Rhag2P4GAO9qhcajwDHIkgzKZqNii/SgvFwCI6Kc8XE="; }; + postPatch = '' + patchShebangs meson_post_install.py + ''; + + strictDeps = true; + nativeBuildInputs = [ meson ninja @@ -39,25 +46,22 @@ stdenv.mkDerivation rec { ]; buildInputs = [ + glib + gtk4 libadwaita libgee libportal-gtk4 - glib - gtk4 ]; - postPatch = '' - patchShebangs meson_post_install.py - ''; - passthru.updateScript = ./update.sh; - meta = with lib; { + meta = { description = "Graphical frontend for Hamachi on Linux"; mainProgram = "haguichi"; homepage = "https://haguichi.net/"; - license = licenses.gpl3Plus; - platforms = platforms.linux; - maintainers = with maintainers; [ OPNA2608 ]; + changelog = "https://haguichi.net/news/release${lib.strings.replaceStrings ["."] [""] finalAttrs.version}"; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ OPNA2608 ]; }; -} +})