summary refs log tree commit diff
path: root/pkgs/applications/misc/openrgb
diff options
context:
space:
mode:
authorStefan Frijters <sfrijters@gmail.com>2021-06-05 13:04:26 +0200
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-06-05 08:19:58 -0700
commit25e46dda3d99050daab3208b00932744dab9a173 (patch)
tree2604f66b42be7d6894ac4cbb8dfa9f32dcc54384 /pkgs/applications/misc/openrgb
parente4a0b101904e3d24b60e7f79069a9fe967b54363 (diff)
downloadnixpkgs-25e46dda3d99050daab3208b00932744dab9a173.tar
nixpkgs-25e46dda3d99050daab3208b00932744dab9a173.tar.gz
nixpkgs-25e46dda3d99050daab3208b00932744dab9a173.tar.bz2
nixpkgs-25e46dda3d99050daab3208b00932744dab9a173.tar.lz
nixpkgs-25e46dda3d99050daab3208b00932744dab9a173.tar.xz
nixpkgs-25e46dda3d99050daab3208b00932744dab9a173.tar.zst
nixpkgs-25e46dda3d99050daab3208b00932744dab9a173.zip
openrgb: Fix udev rules with hardcoded /bin/chmod
New rules introduced in openrgb 0.6.

openrgb: Implement nixpkgs-review suggestions

* warning: missing-phase-hooks
* warning: unclear-gpl
* warning: unnecessary-parallel-building
Diffstat (limited to 'pkgs/applications/misc/openrgb')
-rw-r--r--pkgs/applications/misc/openrgb/default.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/applications/misc/openrgb/default.nix b/pkgs/applications/misc/openrgb/default.nix
index 728a2048bc3..eeff215679a 100644
--- a/pkgs/applications/misc/openrgb/default.nix
+++ b/pkgs/applications/misc/openrgb/default.nix
@@ -1,4 +1,4 @@
-{ lib, mkDerivation, fetchFromGitLab, qmake, libusb1, hidapi, pkg-config }:
+{ lib, mkDerivation, fetchFromGitLab, qmake, libusb1, hidapi, pkg-config, coreutils }:
 
 mkDerivation rec {
   pname = "openrgb";
@@ -15,11 +15,18 @@ mkDerivation rec {
   buildInputs = [ libusb1 hidapi ];
 
   installPhase = ''
+    runHook preInstall
+
     mkdir -p $out/bin
     cp openrgb $out/bin
 
+    substituteInPlace 60-openrgb.rules \
+      --replace /bin/chmod "${coreutils}/bin/chmod"
+
     mkdir -p $out/etc/udev/rules.d
     cp 60-openrgb.rules $out/etc/udev/rules.d
+
+    runHook postInstall
   '';
 
   doInstallCheck = true;
@@ -27,13 +34,11 @@ mkDerivation rec {
     HOME=$TMPDIR $out/bin/openrgb --help > /dev/null
   '';
 
-  enableParallelBuilding = true;
-
   meta = with lib; {
     description = "Open source RGB lighting control";
     homepage = "https://gitlab.com/CalcProgrammer1/OpenRGB";
     maintainers = with maintainers; [ jonringer ];
-    license = licenses.gpl2;
+    license = licenses.gpl2Plus;
     platforms = platforms.linux;
   };
 }