1{
2 lib,
3 stdenv,
4 zig,
5 libyuv,
6 fetchFromGitHub,
7}:
8stdenv.mkDerivation (finalAttrs: {
9 pname = "backlight-auto";
10 version = "0.0.1";
11
12 src = fetchFromGitHub {
13 owner = "lf94";
14 repo = "backlight-auto";
15 rev = finalAttrs.version;
16 hash = "sha256-QPymwlDrgKM/SXDzJdmfzWLSLU2D7egif1OIUE+SHoI=";
17 };
18
19 nativeBuildInputs = [
20 zig.hook
21 ];
22
23 buildInputs = [
24 libyuv
25 ];
26
27 meta = with lib; {
28 # Does not support zig 0.12 or newer, hasn't been updated in 2 years.
29 broken = lib.versionAtLeast zig.version "0.12";
30 description = "Automatically set screen brightness with a webcam";
31 mainProgram = "backlight-auto";
32 homepage = "https://len.falken.directory/backlight-auto.html";
33 license = licenses.mit;
34 maintainers = [ ];
35 platforms = platforms.linux;
36 };
37})