2018-06-16 23:15:42 +01:00
|
|
|
{ stdenv, fetchFromGitHub, coreutils }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "brightnessctl-${version}";
|
2018-09-25 15:55:21 +01:00
|
|
|
version = "0.4";
|
2018-06-16 23:15:42 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Hummer12007";
|
|
|
|
repo = "brightnessctl";
|
|
|
|
rev = "${version}";
|
2018-09-25 15:55:21 +01:00
|
|
|
sha256 = "1n1gb8ldgqv3vs565yhk1w4jfvrviczp94r8wqlkv5q6ab43c8w9";
|
2018-06-16 23:15:42 +01:00
|
|
|
};
|
|
|
|
|
2018-08-10 18:43:07 +01:00
|
|
|
makeFlags = [ "MODE=0755" "PREFIX=" "DESTDIR=$(out)" ];
|
|
|
|
installTargets = [ "install" "install_udev_rules" ];
|
2018-06-16 23:15:42 +01:00
|
|
|
|
2018-08-10 18:43:07 +01:00
|
|
|
postPatch = ''
|
2018-06-16 23:15:42 +01:00
|
|
|
substituteInPlace 90-brightnessctl.rules --replace /bin/ ${coreutils}/bin/
|
|
|
|
substituteInPlace 90-brightnessctl.rules --replace %k '*'
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/Hummer12007/brightnessctl";
|
|
|
|
maintainers = [ stdenv.lib.maintainers.Dje4321 ];
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
description = "This program allows you read and control device brightness";
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|