From 683fac20bbac50df768a9b6060ba743d1e93a07a Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:11:58 +0530 Subject: [PATCH 1/3] openrgb: switch to finalAttrs Recursively importing openrgb package again is just bad and breaks overrides. ie, even if we override the openrgb.src, passthru.withPlugins may still be using the previous version Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com> --- pkgs/by-name/op/openrgb/package.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/op/openrgb/package.nix b/pkgs/by-name/op/openrgb/package.nix index fa544e48cd93..86545e2d62f0 100644 --- a/pkgs/by-name/op/openrgb/package.nix +++ b/pkgs/by-name/op/openrgb/package.nix @@ -9,17 +9,16 @@ coreutils, mbedtls_2, symlinkJoin, - openrgb, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "openrgb"; version = "0.9"; src = fetchFromGitLab { owner = "CalcProgrammer1"; repo = "OpenRGB"; - rev = "release_${version}"; + rev = "release_${finalAttrs.version}"; hash = "sha256-XBLj4EfupyeVHRc0pVI7hrXFoCNJ7ak2yO0QSfhBsGU="; }; @@ -40,7 +39,7 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs scripts/build-udev-rules.sh substituteInPlace scripts/build-udev-rules.sh \ - --replace /bin/chmod "${coreutils}/bin/chmod" + --replace-fail /bin/chmod "${coreutils}/bin/chmod" ''; doInstallCheck = true; @@ -67,7 +66,7 @@ stdenv.mkDerivation rec { ''; }; in - openrgb.overrideAttrs (old: { + finalAttrs.finalPackage.overrideAttrs (old: { qmakeFlags = old.qmakeFlags or [ ] ++ [ # Welcome to Escape Hell, we have backslashes ''DEFINES+=OPENRGB_EXTRA_PLUGIN_DIRECTORY=\\\""${ @@ -84,4 +83,4 @@ stdenv.mkDerivation rec { platforms = platforms.linux; mainProgram = "openrgb"; }; -} +}) From a324c70f6148a50d2a875cc9a471bafbcd1f1ce5 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:50:35 +0530 Subject: [PATCH 2/3] openrgb: cleanup Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com> --- pkgs/by-name/op/openrgb/package.nix | 38 +++++++++++++++++------------ 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/pkgs/by-name/op/openrgb/package.nix b/pkgs/by-name/op/openrgb/package.nix index 86545e2d62f0..e76fe97ac9a3 100644 --- a/pkgs/by-name/op/openrgb/package.nix +++ b/pkgs/by-name/op/openrgb/package.nix @@ -22,19 +22,27 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-XBLj4EfupyeVHRc0pVI7hrXFoCNJ7ak2yO0QSfhBsGU="; }; - nativeBuildInputs = with libsForQt5; [ - qmake - pkg-config - wrapQtAppsHook - ]; + nativeBuildInputs = + [ + pkg-config + ] + ++ (with libsForQt5; [ + qmake + wrapQtAppsHook + ]); - buildInputs = with libsForQt5; [ - libusb1 - hidapi - mbedtls_2 - qtbase - qttools - ]; + buildInputs = + [ + + libusb1 + hidapi + mbedtls_2 + ] + ++ (with libsForQt5; [ + qtbase + qttools + qtwayland + ]); postPatch = '' patchShebangs scripts/build-udev-rules.sh @@ -75,12 +83,12 @@ stdenv.mkDerivation (finalAttrs: { ]; }); - meta = with lib; { + meta = { description = "Open source RGB lighting control"; homepage = "https://gitlab.com/CalcProgrammer1/OpenRGB"; maintainers = [ ]; - license = licenses.gpl2Plus; - platforms = platforms.linux; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.linux; mainProgram = "openrgb"; }; }) From cc51eb9b00d02eb14b09f4ab7599f81b619125f8 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:54:36 +0530 Subject: [PATCH 3/3] openrgb: add johnrtitor as maintainer Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com> --- pkgs/by-name/op/openrgb/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/op/openrgb/package.nix b/pkgs/by-name/op/openrgb/package.nix index e76fe97ac9a3..1974573c5a33 100644 --- a/pkgs/by-name/op/openrgb/package.nix +++ b/pkgs/by-name/op/openrgb/package.nix @@ -86,7 +86,7 @@ stdenv.mkDerivation (finalAttrs: { meta = { description = "Open source RGB lighting control"; homepage = "https://gitlab.com/CalcProgrammer1/OpenRGB"; - maintainers = [ ]; + maintainers = with lib.maintainers; [ johnrtitor ]; license = lib.licenses.gpl2Plus; platforms = lib.platforms.linux; mainProgram = "openrgb";