From 26ea64ffb22aab76bf84c92be64808caa400956f Mon Sep 17 00:00:00 2001 From: mikaeladev Date: Mon, 20 Apr 2026 14:38:30 +0100 Subject: [PATCH] openlinkhub: 0.7.5 -> 0.8.4 apply suggestions from code review Co-authored-by: Sandro (cherry picked from commit 580beb56477b7eeae0c1ed4809a3b11249b45e59) --- pkgs/by-name/op/openlinkhub/package.nix | 48 ++++++++++++++++++------- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/op/openlinkhub/package.nix b/pkgs/by-name/op/openlinkhub/package.nix index b377af8d1585..be17e1b1a847 100644 --- a/pkgs/by-name/op/openlinkhub/package.nix +++ b/pkgs/by-name/op/openlinkhub/package.nix @@ -1,40 +1,62 @@ { - buildGoModule, lib, + buildGoModule, fetchFromGitHub, - udev, nix-update-script, - versionCheckHook, + pkg-config, + pipewire, + udev, + usbutils, }: -buildGoModule rec { +buildGoModule (finalAttrs: { pname = "openlinkhub"; - version = "0.7.5"; + version = "0.8.4"; src = fetchFromGitHub { owner = "jurkovic-nikola"; repo = "OpenLinkHub"; - tag = version; - hash = "sha256-Jq31ZcJtl0ZmjNsMOiTTt2eZIIYn2DRVPE4Q5FTx6OM="; + tag = finalAttrs.version; + hash = "sha256-yxLRwYsBvwpPVeQWx8R9bfbtdkGu2qUsDiyoijcTD2g="; }; proxyVendor = true; + vendorHash = "sha256-/itomxsbTDT7ML52bpUfDZIBZ/Rh/zx4Blg+PP7m7gE="; - vendorHash = "sha256-xpIaQzl2jrWRIUe/1woODKLlwxQrdlCLkIk0qmWs7m0="; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ + pipewire udev + usbutils ]; + env.CGO_CFLAGS_ALLOW = "-fno-strict-overflow"; + + installPhase = '' + runHook preInstall + + install -Dm 644 -t $out/etc/udev/rules.d 99-openlinkhub.rules + install -Dm 755 -t $out/bin $GOPATH/bin/OpenLinkHub + + mkdir -p $out/opt/OpenLinkHub + cp -r {database,static,web} $out/opt/OpenLinkHub + + runHook postInstall + ''; + passthru.updateScript = nix-update-script { }; meta = { homepage = "https://github.com/jurkovic-nikola/OpenLinkHub"; - platforms = lib.platforms.linux; description = "Open source interface for iCUE LINK Hub and other Corsair AIOs, Hubs for Linux"; - maintainers = with lib.maintainers; [ bot-wxt1221 ]; - license = lib.licenses.gpl3Only; + changelog = "https://github.com/jurkovic-nikola/OpenLinkHub/releases/tag/${finalAttrs.version}"; mainProgram = "OpenLinkHub"; - changelog = "https://github.com/jurkovic-nikola/OpenLinkHub/releases/tag/${version}"; + license = lib.licenses.gpl3Only; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ + bot-wxt1221 + mikaeladev + ]; }; -} +})