nixpkgs/pkgs/applications/misc/openrgb/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.2 KiB
Nix
Raw Normal View History

2021-12-30 14:25:13 +00:00
{ lib, mkDerivation, fetchFromGitLab, qmake, libusb1, hidapi, pkg-config, coreutils, mbedtls }:
2020-06-17 21:38:28 +00:00
mkDerivation rec {
pname = "openrgb";
2021-12-30 14:25:13 +00:00
version = "0.7";
2020-06-17 21:38:28 +00:00
2020-12-07 17:11:07 +00:00
src = fetchFromGitLab {
2020-06-17 21:38:28 +00:00
owner = "CalcProgrammer1";
repo = "OpenRGB";
rev = "release_${version}";
2021-12-30 14:25:13 +00:00
sha256 = "0xhfaz0b74nfnh7il2cz5c0338xlzay00g6hc2h3lsncarj8d5n7";
2020-06-17 21:38:28 +00:00
};
2020-08-09 00:57:13 +00:00
nativeBuildInputs = [ qmake pkg-config ];
2021-12-30 14:25:13 +00:00
buildInputs = [ libusb1 hidapi mbedtls ];
2020-06-17 21:38:28 +00:00
installPhase = ''
runHook preInstall
2020-06-17 21:38:28 +00:00
mkdir -p $out/bin
2020-12-07 17:11:07 +00:00
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
2022-01-23 09:41:48 +00:00
install -Dm444 -t "$out/share/applications" qt/OpenRGB.desktop
install -Dm444 -t "$out/share/icons/hicolor/128x128/apps" qt/OpenRGB.png
runHook postInstall
2020-12-07 17:11:07 +00:00
'';
2020-06-17 21:38:28 +00:00
doInstallCheck = true;
installCheckPhase = ''
2020-12-07 17:11:07 +00:00
HOME=$TMPDIR $out/bin/openrgb --help > /dev/null
2020-06-17 21:38:28 +00:00
'';
meta = with lib; {
description = "Open source RGB lighting control";
homepage = "https://gitlab.com/CalcProgrammer1/OpenRGB";
maintainers = with maintainers; [ jonringer ];
license = licenses.gpl2Plus;
2020-06-17 21:38:28 +00:00
platforms = platforms.linux;
};
}