2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, pkg-config, help2man, python3,
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib, xlibsWrapper, libxslt, systemd, libusb-compat-0_1, libftdi1 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "lirc";
|
|
|
|
version = "0.10.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "mirror://sourceforge/lirc/${pname}-${version}.tar.bz2";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1whlyifvvc7w04ahq07nnk1h18wc8j7c6wnvlb6mszravxh3qxcb";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Fix installation of Python bindings
|
|
|
|
patches = [ (fetchpatch {
|
|
|
|
url = "https://sourceforge.net/p/lirc/tickets/339/attachment/0001-Fix-Python-bindings.patch";
|
|
|
|
sha256 = "088a39x8c1qd81qwvbiqd6crb2lk777wmrs8rdh1ga06lglyvbly";
|
|
|
|
}) ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
|
|
|
|
# fix overriding PYTHONPATH
|
|
|
|
sed -i 's,^PYTHONPATH *= *,PYTHONPATH := $(PYTHONPATH):,' \
|
|
|
|
Makefile.in
|
|
|
|
sed -i 's,PYTHONPATH=,PYTHONPATH=$(PYTHONPATH):,' \
|
|
|
|
doc/Makefile.in
|
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
# use empty inc file instead of a from linux kernel generated one
|
|
|
|
touch lib/lirc/input_map.inc
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config help2man
|
2020-04-24 23:36:52 +00:00
|
|
|
(python3.withPackages (p: with p; [ pyyaml setuptools ])) ];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
buildInputs = [ alsa-lib xlibsWrapper libxslt systemd libusb-compat-0_1 libftdi1 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--with-systemdsystemunitdir=$(out)/lib/systemd/system"
|
|
|
|
"--enable-uinput" # explicit activation because build env has no uinput
|
|
|
|
"--enable-devinput" # explicit activation because build env has no /dev/input
|
2021-10-01 09:20:50 +00:00
|
|
|
"--with-lockdir=/run/lirc/lock" # /run/lock is not writable for 'lirc' user
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=$out/etc"
|
|
|
|
"localstatedir=$TMPDIR"
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Allows to receive and send infrared signals";
|
2020-05-03 17:38:23 +00:00
|
|
|
homepage = "https://www.lirc.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
};
|
|
|
|
}
|