571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, ninja, libevdev, libev, udev }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "illum";
|
|
version = "0.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jmesmon";
|
|
repo = "illum";
|
|
rev = "v${version}";
|
|
sha256 = "S4lUBeRnZlRUpIxFdN/bh979xvdS7roF6/6Dk0ZUrnM=";
|
|
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 ];
|
|
buildInputs = [ ninja libevdev libev udev ];
|
|
|
|
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 = lib.platforms.linux;
|
|
maintainers = [ lib.maintainers.dancek ];
|
|
license = lib.licenses.agpl3Plus;
|
|
mainProgram = "illum-d";
|
|
};
|
|
}
|