nixpkgs/pkgs/tools/system/illum/default.nix

44 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, ninja, libevdev, libev, udev }:
2017-01-25 16:25:36 +00:00
2021-09-22 18:14:54 +00:00
stdenv.mkDerivation rec {
pname = "illum";
2021-09-22 18:14:54 +00:00
version = "0.5";
2017-01-25 16:25:36 +00:00
2021-09-22 18:14:54 +00:00
src = fetchFromGitHub {
owner = "jmesmon";
repo = "illum";
rev = "v${version}";
sha256 = "S4lUBeRnZlRUpIxFdN/bh979xvdS7roF6/6Dk0ZUrnM=";
2017-01-25 16:25:36 +00:00
fetchSubmodules = true;
};
patches = [
(fetchpatch {
name = "prevent-unplug-segfault"; # See https://github.com/jmesmon/illum/issues/19
url = "https://github.com/jmesmon/illum/commit/47b7cd60ee892379e5d854f79db343a54ae5a3cc.patch";
sha256 = "sha256-hIBBCIJXAt8wnZuyKye1RiEfOCelP3+4kcGrM43vFOE=";
})
];
nativeBuildInputs = [ pkg-config ];
2021-09-22 18:14:54 +00:00
buildInputs = [ ninja libevdev libev udev ];
2017-01-25 16:25:36 +00:00
configurePhase = ''
bash ./configure
'';
installPhase = ''
mkdir -p $out/bin
mv illum-d $out/bin
'';
meta = {
homepage = "https://github.com/jmesmon/illum";
2017-01-25 16:25:36 +00:00
description = "Daemon that wires button presses to screen backlight level";
2021-01-15 09:19:50 +00:00
platforms = lib.platforms.linux;
maintainers = [ lib.maintainers.dancek ];
license = lib.licenses.agpl3;
2023-11-27 01:17:53 +00:00
mainProgram = "illum-d";
2017-01-25 16:25:36 +00:00
};
}