13 stdenv.mkDerivation rec {
14 pname = "pommed-light";
17 src = fetchFromGitHub {
19 repo = "pommed-light";
21 sha256 = "18fvdwwhcl6s4bpf2f2i389s71c8k4g0yb81am9rdddqmzaw27iy";
25 # Pull fix pending upstream inclusion for -fno-common toolchain support:
26 # https://github.com/bytbox/pommed-light/pull/38
28 name = "fno-common.patch";
29 url = "https://github.com/bytbox/pommed-light/commit/5848b49b45a9c3ab047ebd17deb2162daab1e0b8.patch";
30 sha256 = "15rsq2i4rqp4ssab20486a1wgxi2cp87b7nxyk9h23gdwld713vf";
35 substituteInPlace pommed.conf.mactel --replace /usr $out
36 substituteInPlace pommed.conf.pmac --replace /usr $out
37 substituteInPlace pommed/beep.h --replace /usr $out
38 substituteInPlace pommed/cd_eject.c --replace /usr/bin/eject ${eject}/bin/eject
41 nativeBuildInputs = [ pkg-config ];
52 install -Dm755 pommed/pommed $out/bin/pommed
53 install -Dm644 pommed.conf.mactel $out/etc/pommed.conf.mactel
54 install -Dm644 pommed.conf.pmac $out/etc/pommed.conf.pmac
57 install -Dm644 pommed.1 $out/share/man/man1/pommed.1
60 install -Dm644 pommed/data/goutte.wav $out/share/pommed/goutte.wav
61 install -Dm644 pommed/data/click.wav $out/share/pommed/click.wav
65 description = "Trimmed version of the pommed hotkey handler for MacBooks";
66 mainProgram = "pommed";
68 This is a stripped-down version of pommed with client, dbus, and
69 ambient light sensor support removed, optimized for use with dwm
72 homepage = "https://github.com/bytbox/pommed-light";
73 platforms = [ "x86_64-linux" ];
74 license = lib.licenses.gpl2Only;