2020-12-09 12:39:15 +00:00
|
|
|
{ lib, mkDerivation, fetchFromGitLab, qmake, libusb1, hidapi, pkg-config }:
|
2020-06-15 15:56:04 +00:00
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "openrgb";
|
2020-12-09 12:39:15 +00:00
|
|
|
version = "0.5";
|
2020-06-15 15:56:04 +00:00
|
|
|
|
2020-12-09 12:39:15 +00:00
|
|
|
src = fetchFromGitLab {
|
2020-06-15 15:56:04 +00:00
|
|
|
owner = "CalcProgrammer1";
|
|
|
|
repo = "OpenRGB";
|
|
|
|
rev = "release_${version}";
|
2020-12-09 12:39:15 +00:00
|
|
|
sha256 = "001x2ycfmlb9s21sp91aw5gxizcn6kzm8x7bvkps4b1iq0ap5fzv";
|
2020-06-15 15:56:04 +00:00
|
|
|
};
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
nativeBuildInputs = [ qmake pkg-config ];
|
2020-06-15 15:56:04 +00:00
|
|
|
buildInputs = [ libusb1 hidapi ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2020-12-09 12:39:15 +00:00
|
|
|
cp openrgb $out/bin
|
|
|
|
|
|
|
|
mkdir -p $out/etc/udev/rules.d
|
|
|
|
cp 60-openrgb.rules $out/etc/udev/rules.d
|
2020-06-15 15:56:04 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
2020-12-09 12:39:15 +00:00
|
|
|
HOME=$TMPDIR $out/bin/openrgb --help > /dev/null
|
2020-06-15 15:56:04 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Open source RGB lighting control";
|
|
|
|
homepage = "https://gitlab.com/CalcProgrammer1/OpenRGB";
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|