2022-05-18 14:49:53 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, ninja, libevdev, libev, udev }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "illum";
|
2021-09-23 15:35:13 +00:00
|
|
|
version = "0.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jmesmon";
|
|
|
|
repo = "illum";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "S4lUBeRnZlRUpIxFdN/bh979xvdS7roF6/6Dk0ZUrnM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +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-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-09-23 15:35:13 +00:00
|
|
|
buildInputs = [ ninja libevdev libev udev ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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";
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = [ lib.maintainers.dancek ];
|
|
|
|
license = lib.licenses.agpl3;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "illum-d";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|