summary refs log tree commit diff
path: root/pkgs/applications/misc/openrgb
diff options
context:
space:
mode:
authorMartino Fontana <tinozzo123@tutanota.com>2022-12-06 13:17:07 +0100
committerMartino Fontana <tinozzo123@tutanota.com>2022-12-15 00:59:50 +0100
commit0ea5aa9de24f7745bc57de627c7a674bd6dfa155 (patch)
tree30b578d3ef72f26371f36a1cfc5e30085591dc3b /pkgs/applications/misc/openrgb
parent80160e530dcde46aee357fff1e6258bce9c6744e (diff)
openrgb: 0.7 -> 0.8
Diff: https://gitlab.com/CalcProgrammer1/OpenRGB/-/compare/release_0.7...release_0.8
Diffstat (limited to 'pkgs/applications/misc/openrgb')
-rw-r--r--pkgs/applications/misc/openrgb/default.nix30
1 files changed, 9 insertions, 21 deletions
diff --git a/pkgs/applications/misc/openrgb/default.nix b/pkgs/applications/misc/openrgb/default.nix
index ab8415a188230..ea81b58a2098c 100644
--- a/pkgs/applications/misc/openrgb/default.nix
+++ b/pkgs/applications/misc/openrgb/default.nix
@@ -1,35 +1,23 @@
-{ lib, mkDerivation, fetchFromGitLab, qmake, libusb1, hidapi, pkg-config, coreutils, mbedtls_2 }:
+{ lib, stdenv, fetchFromGitLab, qmake, wrapQtAppsHook, libusb1, hidapi, pkg-config, coreutils, mbedtls_2, qtbase, qttools }:
 
-mkDerivation rec {
+stdenv.mkDerivation rec {
   pname = "openrgb";
-  version = "0.7";
+  version = "0.8";
 
   src = fetchFromGitLab {
     owner = "CalcProgrammer1";
     repo = "OpenRGB";
     rev = "release_${version}";
-    sha256 = "0xhfaz0b74nfnh7il2cz5c0338xlzay00g6hc2h3lsncarj8d5n7";
+    sha256 = "sha256-46dL1D5oVlw6mNuFDCbbrUDmq42yFXV/qFJ1JnPT5/s=";
   };
 
-  nativeBuildInputs = [ qmake pkg-config ];
-  buildInputs = [ libusb1 hidapi mbedtls_2 ];
+  nativeBuildInputs = [ qmake pkg-config wrapQtAppsHook ];
+  buildInputs = [ libusb1 hidapi mbedtls_2 qtbase qttools ];
 
-  installPhase = ''
-    runHook preInstall
-
-    mkdir -p $out/bin
-    cp openrgb $out/bin
-
-    substituteInPlace 60-openrgb.rules \
+  postPatch = ''
+    patchShebangs scripts/build-udev-rules.sh
+    substituteInPlace scripts/build-udev-rules.sh \
       --replace /bin/chmod "${coreutils}/bin/chmod"
-
-    mkdir -p $out/etc/udev/rules.d
-    cp 60-openrgb.rules $out/etc/udev/rules.d
-
-    install -Dm444 -t "$out/share/applications" qt/OpenRGB.desktop
-    install -Dm444 -t "$out/share/icons/hicolor/128x128/apps" qt/OpenRGB.png
-
-    runHook postInstall
   '';
 
   doInstallCheck = true;