lol
1{ lib, stdenv, fetchFromGitHub, autoreconfHook, coreutils }:
2
3stdenv.mkDerivation rec {
4 version = "1.2.2";
5 pname = "light";
6 src = fetchFromGitHub {
7 owner = "haikarainen";
8 repo = "light";
9 rev = "v${version}";
10 sha256 = "1a70zcf88ifsnwll486aicjnh48zisdf8f7vi34ihw61kdadsq9s";
11 };
12
13 configureFlags = [ "--with-udev" ];
14
15 nativeBuildInputs = [ autoreconfHook ];
16
17 # ensure udev rules can find the commands used
18 postPatch = ''
19 substituteInPlace 90-backlight.rules \
20 --replace '/bin/chgrp' '${coreutils}/bin/chgrp' \
21 --replace '/bin/chmod' '${coreutils}/bin/chmod'
22 '';
23
24 meta = {
25 description = "GNU/Linux application to control backlights";
26 homepage = "https://haikarainen.github.io/light/";
27 license = lib.licenses.gpl3;
28 maintainers = with lib.maintainers; [ puffnfresh dtzWill ];
29 platforms = lib.platforms.linux;
30 };
31}