1 { lib, stdenv, fetchurl, fetchpatch, autoreconfHook, pkg-config, help2man, python3,
2 alsaLib, xlibsWrapper, libxslt, systemd, libusb-compat-0_1, libftdi1 }:
4 stdenv.mkDerivation rec {
8 url = "mirror://sourceforge/lirc/${name}.tar.bz2";
9 sha256 = "1whlyifvvc7w04ahq07nnk1h18wc8j7c6wnvlb6mszravxh3qxcb";
12 # Fix installation of Python bindings
13 patches = [ (fetchpatch {
14 url = "https://sourceforge.net/p/lirc/tickets/339/attachment/0001-Fix-Python-bindings.patch";
15 sha256 = "088a39x8c1qd81qwvbiqd6crb2lk777wmrs8rdh1ga06lglyvbly";
21 # fix overriding PYTHONPATH
22 sed -i 's,^PYTHONPATH *= *,PYTHONPATH := $(PYTHONPATH):,' \
24 sed -i 's,PYTHONPATH=,PYTHONPATH=$(PYTHONPATH):,' \
29 # use empty inc file instead of a from linux kernel generated one
30 touch lib/lirc/input_map.inc
33 nativeBuildInputs = [ autoreconfHook pkg-config help2man
34 (python3.withPackages (p: with p; [ pyyaml setuptools ])) ];
36 buildInputs = [ alsaLib xlibsWrapper libxslt systemd libusb-compat-0_1 libftdi1 ];
40 "--localstatedir=/var"
41 "--with-systemdsystemunitdir=$(out)/lib/systemd/system"
42 "--enable-uinput" # explicit activation because build env has no uinput
43 "--enable-devinput" # explicit activation because build env has no /dev/input
48 "localstatedir=$TMPDIR"
52 description = "Allows to receive and send infrared signals";
53 homepage = "https://www.lirc.org/";
54 license = licenses.gpl2;
55 platforms = platforms.linux;
56 maintainers = with maintainers; [ pSub ];