2018-09-30 13:11:56 +02:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, coreutils }:
|
2014-11-10 03:32:11 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-11-19 21:18:16 +01:00
|
|
|
version = "1.2.1";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "light";
|
2018-08-08 00:56:39 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "haikarainen";
|
|
|
|
repo = "light";
|
2018-09-30 13:11:56 +02:00
|
|
|
rev = "v${version}";
|
2019-11-19 21:18:16 +01:00
|
|
|
sha256 = "0zrjipd392bzjvxx0rjrb0cgi0ix1d83fwgw1mcy8kc4d16cgyjg";
|
2014-11-10 03:32:11 +01:00
|
|
|
};
|
2018-08-08 00:56:39 +02:00
|
|
|
|
2018-09-30 13:11:56 +02:00
|
|
|
configureFlags = [ "--with-udev" ];
|
2014-11-10 03:32:11 +01:00
|
|
|
|
2018-09-30 13:11:56 +02:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2014-11-10 03:32:11 +01:00
|
|
|
|
2018-09-30 13:11:56 +02:00
|
|
|
# ensure udev rules can find the commands used
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace 90-backlight.rules \
|
|
|
|
--replace '/bin/chgrp' '${coreutils}/bin/chgrp' \
|
|
|
|
--replace '/bin/chmod' '${coreutils}/bin/chmod'
|
|
|
|
'';
|
2016-11-06 03:47:22 +01:00
|
|
|
|
2014-11-10 03:32:11 +01:00
|
|
|
meta = {
|
|
|
|
description = "GNU/Linux application to control backlights";
|
|
|
|
homepage = https://haikarainen.github.io/light/;
|
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2018-09-30 13:11:56 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ puffnfresh dtzWill ];
|
2014-11-10 03:32:11 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|