summary refs log tree commit diff
path: root/pkgs/tools/system/illum/default.nix
blob: 767fccbd38828b2bd07114b01ddc52a9b631a0b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, fetchgit, pkgconfig, ninja, libevdev, libev }:

stdenv.mkDerivation {
  version = "0.4";
  pname = "illum";

  src = fetchgit {
    url = "https://github.com/jmesmon/illum.git";
    fetchSubmodules = true;
    rev = "48ce8631346b1c88a901a8e4fa5fa7e8ffe8e418";
    sha256 = "05v3hz7n6b1mlhc6zqijblh1vpl0ja1y8y0lafw7mjdz03wxhfdb";
  };

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ ninja libevdev libev ];

  configurePhase = ''
    bash ./configure
  '';

  installPhase = ''
    mkdir -p $out/bin
    mv illum-d $out/bin
  '';

  meta = {
    homepage = https://github.com/jmesmon/illum;
    description = "Daemon that wires button presses to screen backlight level";
    platforms = stdenv.lib.platforms.linux;
    maintainers = [ stdenv.lib.maintainers.dancek ];
    license = stdenv.lib.licenses.agpl3;
  };
}