1{ lib, stdenv, fetchFromGitLab , go-md2man, coreutils, substituteAll }:
2
3stdenv.mkDerivation rec {
4 pname = "brillo";
5 version = "1.4.9";
6
7 src = fetchFromGitLab {
8 owner= "cameronnemo";
9 repo= "brillo";
10 rev= "v${version}";
11 sha256 = "0ab7s60zcgl6hvm0a9rlwq35p25n3jnw6r9256pwl4cdwyjyybsb";
12 };
13
14 patches = [
15 (substituteAll {
16 src = ./udev-rule.patch;
17 inherit coreutils;
18 })
19 ];
20
21 nativeBuildInputs = [ go-md2man ];
22
23 makeFlags = [ "PREFIX=$(out)" "AADIR=$(out)/etc/apparmor.d" ];
24
25 installTargets = [ "install-dist" ];
26
27 meta = with lib; {
28 description = "Backlight and Keyboard LED control tool";
29 homepage = "https://gitlab.com/cameronnemo/brillo";
30 license = [ licenses.gpl3 licenses.bsd0 ];
31 platforms = platforms.linux;
32 maintainers = [ maintainers.alexarice ];
33 };
34}