mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 08:33:54 +00:00
68d1006cab
Use $TMPDIR for the home directory to prevent openrgb from aborting.
40 lines
959 B
Nix
40 lines
959 B
Nix
{ lib, mkDerivation, fetchFromGitLab, qmake, libusb1, hidapi, pkg-config }:
|
|
|
|
mkDerivation rec {
|
|
pname = "openrgb";
|
|
version = "0.5";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "CalcProgrammer1";
|
|
repo = "OpenRGB";
|
|
rev = "release_${version}";
|
|
sha256 = "001x2ycfmlb9s21sp91aw5gxizcn6kzm8x7bvkps4b1iq0ap5fzv";
|
|
};
|
|
|
|
nativeBuildInputs = [ qmake pkg-config ];
|
|
buildInputs = [ libusb1 hidapi ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp openrgb $out/bin
|
|
|
|
mkdir -p $out/etc/udev/rules.d
|
|
cp 60-openrgb.rules $out/etc/udev/rules.d
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
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;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|