2022-05-05 20:28:32 +00:00
|
|
|
{ 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 {
|
2019-08-15 12:41:18 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2022-05-05 20:28:32 +00:00
|
|
|
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=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-01-17 09:17:16 +00:00
|
|
|
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 = {
|
2020-04-01 01:11:51 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|