2020-09-25 04:45:31 +00:00
|
|
|
{ mkDerivation, lib, fetchFromGitHub, qmake, libusb1, hidapi, pkg-config, fetchpatch }:
|
2020-06-15 15:56:04 +00:00
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "openrgb";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "0.4";
|
2020-06-15 15:56:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CalcProgrammer1";
|
|
|
|
repo = "OpenRGB";
|
|
|
|
rev = "release_${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "sha256-tHrRG2Zx7NYqn+WPiRpAlWA/QmxuAYidENanTkC1XVw";
|
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 ];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
patches = [
|
|
|
|
# Make build SOURCE_DATE_EPOCH aware, merged in master
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.com/CalcProgrammer1/OpenRGB/-/commit/f1b7b8ba900db58a1119d8d3e21c1c79de5666aa.patch";
|
|
|
|
sha256 = "17m1hn1kjxfcmd4p3zjhmr5ar9ng0zfbllq78qxrfcq1a0xrkybx";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp OpenRGB $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$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;
|
|
|
|
};
|
|
|
|
}
|