summary refs log tree commit diff
path: root/pkgs/misc/brightnessctl/default.nix
blob: 6292b8183b28efec2bf1ec3b4e829eb1814c35b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ stdenv, fetchFromGitHub, coreutils }:

stdenv.mkDerivation rec {
  name = "brightnessctl-${version}";
  version = "0.4";

  src = fetchFromGitHub {
    owner = "Hummer12007";
    repo = "brightnessctl";
    rev = "${version}";
    sha256 = "1n1gb8ldgqv3vs565yhk1w4jfvrviczp94r8wqlkv5q6ab43c8w9";
  };

  makeFlags = [ "PREFIX=" "DESTDIR=$(out)" ];

  postPatch = ''
    substituteInPlace 90-brightnessctl.rules --replace /bin/ ${coreutils}/bin/
  '';

  meta = with stdenv.lib; {
    homepage = "https://github.com/Hummer12007/brightnessctl";
    description = "This program allows you read and control device brightness";
    license = licenses.mit;
    maintainers = with maintainers; [ megheaiulian ];
    platforms = platforms.linux;
  };

}