2021-01-15 15:45:37 +01:00
|
|
|
{ lib, stdenv
|
2018-11-25 18:20:42 +01:00
|
|
|
, fetchFromGitHub
|
2016-12-18 20:48:41 +01:00
|
|
|
, pciutils
|
2018-11-25 18:20:42 +01:00
|
|
|
, libconfuse
|
2016-12-18 20:48:41 +01:00
|
|
|
, alsaLib
|
|
|
|
, audiofile
|
|
|
|
, pkgconfig
|
|
|
|
, zlib
|
|
|
|
, eject
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pkgname = "pommed-light";
|
2018-03-18 15:45:59 +01:00
|
|
|
version = "1.51lw";
|
2016-12-18 20:48:41 +01:00
|
|
|
name = "${pkgname}-${version}";
|
|
|
|
|
2018-11-25 18:20:42 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bytbox";
|
|
|
|
repo = pkgname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "18fvdwwhcl6s4bpf2f2i389s71c8k4g0yb81am9rdddqmzaw27iy";
|
2016-12-18 20:48:41 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pommed.conf.mactel --replace /usr $out
|
|
|
|
substituteInPlace pommed.conf.pmac --replace /usr $out
|
|
|
|
substituteInPlace pommed/beep.h --replace /usr $out
|
|
|
|
substituteInPlace pommed/cd_eject.c --replace /usr/bin/eject ${eject}/bin/eject
|
|
|
|
'';
|
|
|
|
|
2018-11-25 18:20:42 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2016-12-18 20:48:41 +01:00
|
|
|
buildInputs = [
|
|
|
|
pciutils
|
2018-11-25 18:20:42 +01:00
|
|
|
libconfuse
|
2016-12-18 20:48:41 +01:00
|
|
|
alsaLib
|
|
|
|
audiofile
|
|
|
|
zlib
|
|
|
|
eject
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 pommed/pommed $out/bin/pommed
|
|
|
|
install -Dm644 pommed.conf.mactel $out/etc/pommed.conf.mactel
|
|
|
|
install -Dm644 pommed.conf.pmac $out/etc/pommed.conf.pmac
|
|
|
|
|
|
|
|
# Man page
|
|
|
|
install -Dm644 pommed.1 $out/share/man/man1/pommed.1
|
|
|
|
|
|
|
|
# Sounds
|
|
|
|
install -Dm644 pommed/data/goutte.wav $out/share/pommed/goutte.wav
|
|
|
|
install -Dm644 pommed/data/click.wav $out/share/pommed/click.wav
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A trimmed version of the pommed hotkey handler for MacBooks";
|
|
|
|
longDescription = ''
|
|
|
|
This is a stripped-down version of pommed with client, dbus, and
|
|
|
|
ambient light sensor support removed, optimized for use with dwm
|
|
|
|
and the like.
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/bytbox/pommed-light";
|
2018-06-14 11:03:15 +02:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-01-15 15:45:37 +01:00
|
|
|
license = lib.licenses.gpl2;
|
2016-12-18 20:48:41 +01:00
|
|
|
};
|
|
|
|
}
|