2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, coreutils }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-11-30 08:33:03 +00:00
|
|
|
version = "1.2.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "light";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "haikarainen";
|
|
|
|
repo = "light";
|
|
|
|
rev = "v${version}";
|
2020-11-30 08:33:03 +00:00
|
|
|
sha256 = "1a70zcf88ifsnwll486aicjnh48zisdf8f7vi34ihw61kdadsq9s";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags = [ "--with-udev" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
|
|
|
# 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'
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "GNU/Linux application to control backlights";
|
|
|
|
homepage = "https://haikarainen.github.io/light/";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
maintainers = with lib.maintainers; [ puffnfresh dtzWill ];
|
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|