1{ lib, stdenv, fetchgit, python3, coreutils }:
2
3stdenv.mkDerivation rec {
4 pname = "acpilight";
5 version = "1.2";
6
7 src = fetchgit {
8 url = "https://gitlab.com/wavexx/acpilight.git";
9 rev = "v${version}";
10 sha256 = "1r0r3nx6x6vkpal6vci0zaa1n9dfacypldf6k8fxg7919vzxdn1w";
11 };
12
13 pyenv = python3.withPackages (pythonPackages: with pythonPackages; [
14 configargparse
15 ]);
16
17 postConfigure = ''
18 substituteInPlace 90-backlight.rules --replace /bin ${coreutils}/bin
19 substituteInPlace Makefile --replace udevadm true
20 '';
21
22 buildInputs = [ pyenv ];
23
24 makeFlags = [ "DESTDIR=$(out) prefix=" ];
25
26 meta = with lib; {
27 homepage = "https://gitlab.com/wavexx/acpilight";
28 description = "ACPI backlight control";
29 license = licenses.gpl3;
30 maintainers = with maintainers; [ smakarov ];
31 platforms = platforms.linux;
32 mainProgram = "xbacklight";
33 };
34}