biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / system / illum / default.nix
blob81d8bbee7b8d7d4202337b2d0c0b13a806823640
1 { lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, ninja, libevdev, libev, udev }:
3 stdenv.mkDerivation rec {
4   pname = "illum";
5   version = "0.5";
7   src = fetchFromGitHub {
8     owner = "jmesmon";
9     repo = "illum";
10     rev = "v${version}";
11     sha256 = "S4lUBeRnZlRUpIxFdN/bh979xvdS7roF6/6Dk0ZUrnM=";
12     fetchSubmodules = true;
13   };
15   patches = [
16     (fetchpatch {
17       name = "prevent-unplug-segfault"; # See https://github.com/jmesmon/illum/issues/19
18       url = "https://github.com/jmesmon/illum/commit/47b7cd60ee892379e5d854f79db343a54ae5a3cc.patch";
19       sha256 = "sha256-hIBBCIJXAt8wnZuyKye1RiEfOCelP3+4kcGrM43vFOE=";
20     })
21   ];
23   nativeBuildInputs = [ pkg-config ];
24   buildInputs = [ ninja libevdev libev udev ];
26   configurePhase = ''
27     bash ./configure
28   '';
30   installPhase = ''
31     mkdir -p $out/bin
32     mv illum-d $out/bin
33   '';
35   meta = {
36     homepage = "https://github.com/jmesmon/illum";
37     description = "Daemon that wires button presses to screen backlight level";
38     platforms = lib.platforms.linux;
39     maintainers = [ lib.maintainers.dancek ];
40     license = lib.licenses.agpl3Plus;
41     mainProgram = "illum-d";
42   };