nixpkgs/pkgs/os-specific/linux/light/default.nix

32 lines
895 B
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, autoreconfHook, coreutils }:
2014-11-10 02:32:11 +00:00
stdenv.mkDerivation rec {
version = "1.2.1";
pname = "light";
2018-08-07 22:56:39 +00:00
src = fetchFromGitHub {
owner = "haikarainen";
repo = "light";
rev = "v${version}";
sha256 = "0zrjipd392bzjvxx0rjrb0cgi0ix1d83fwgw1mcy8kc4d16cgyjg";
2014-11-10 02:32:11 +00:00
};
2018-08-07 22:56:39 +00:00
configureFlags = [ "--with-udev" ];
2014-11-10 02:32:11 +00:00
nativeBuildInputs = [ autoreconfHook ];
2014-11-10 02:32:11 +00: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'
'';
2014-11-10 02:32:11 +00:00
meta = {
description = "GNU/Linux application to control backlights";
homepage = https://haikarainen.github.io/light/;
license = stdenv.lib.licenses.gpl3;
maintainers = with stdenv.lib.maintainers; [ puffnfresh dtzWill ];
2014-11-10 02:32:11 +00:00
platforms = stdenv.lib.platforms.linux;
};
}