base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / li / light / package.nix
blobaa16262a8d93b6ce2748d14dacf275909769b947
2   lib,
3   stdenv,
4   fetchFromGitLab,
5   fetchpatch,
6   autoreconfHook,
7   coreutils,
8 }:
10 stdenv.mkDerivation {
11   version = "1.2.2";
12   pname = "light";
14   src = fetchFromGitLab {
15     owner = "dpeukert";
16     repo = "light";
17     rev = "2a54078cbe3814105ee4f565f451b1b5947fbde0";
18     hash = "sha256-OmHdVJvBcBjJiPs45JqOHxFoJYvKIEIpt9pFhBz74Kg=";
19   };
21   configureFlags = [ "--with-udev" ];
23   nativeBuildInputs = [ autoreconfHook ];
25   patches = [
26     ./0001-define-light-loglevel-as-extern.patch
27   ];
29   # ensure udev rules can find the commands used
30   postPatch = ''
31     substituteInPlace 90-backlight.rules \
32       --replace-fail '/bin/chgrp' '${coreutils}/bin/chgrp' \
33       --replace-fail '/bin/chmod' '${coreutils}/bin/chmod'
34   '';
36   meta = {
37     description = "GNU/Linux application to control backlights";
38     homepage = "https://gitlab.com/dpeukert/light";
39     license = lib.licenses.gpl3Only;
40     mainProgram = "light";
41     maintainers = with lib.maintainers; [
42       puffnfresh
43       dtzWill
44     ];
45     platforms = lib.platforms.linux;
46   };