2018-10-12 19:39:26 +02:00
|
|
|
{ stdenv, fetchurl, fetchpatch, autoreconfHook, pkgconfig, help2man, python3,
|
2020-04-28 05:29:39 +02:00
|
|
|
alsaLib, xlibsWrapper, libxslt, systemd, libusb-compat-0_1, libftdi1 }:
|
2012-01-09 11:25:49 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-01-29 21:15:34 +01:00
|
|
|
name = "lirc-0.10.1";
|
2012-01-09 11:25:49 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/lirc/${name}.tar.bz2";
|
2018-01-29 21:15:34 +01:00
|
|
|
sha256 = "1whlyifvvc7w04ahq07nnk1h18wc8j7c6wnvlb6mszravxh3qxcb";
|
2012-01-09 11:25:49 +01:00
|
|
|
};
|
|
|
|
|
2018-10-12 19:39:26 +02:00
|
|
|
# Fix installation of Python bindings
|
|
|
|
patches = [ (fetchpatch {
|
|
|
|
url = "https://sourceforge.net/p/lirc/tickets/339/attachment/0001-Fix-Python-bindings.patch";
|
|
|
|
sha256 = "088a39x8c1qd81qwvbiqd6crb2lk777wmrs8rdh1ga06lglyvbly";
|
|
|
|
}) ];
|
|
|
|
|
2017-11-25 22:23:57 +01:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
|
|
|
|
# fix overriding PYTHONPATH
|
2017-12-09 23:35:13 +01:00
|
|
|
sed -i 's,^PYTHONPATH *= *,PYTHONPATH := $(PYTHONPATH):,' \
|
|
|
|
Makefile.in
|
2017-11-25 22:23:57 +01:00
|
|
|
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
|
|
|
|
'';
|
2014-08-31 00:32:37 +02:00
|
|
|
|
2018-10-12 19:39:26 +02:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig help2man
|
|
|
|
(python3.withPackages (p: with p; [ pyyaml setuptools ])) ];
|
2017-01-09 21:28:32 +01:00
|
|
|
|
2020-04-28 05:29:39 +02:00
|
|
|
buildInputs = [ alsaLib xlibsWrapper libxslt systemd libusb-compat-0_1 libftdi1 ];
|
2012-01-09 11:25:49 +01:00
|
|
|
|
2013-01-21 19:06:22 +01:00
|
|
|
configureFlags = [
|
2015-04-26 00:07:34 +02:00
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
2017-11-25 22:23:57 +01:00
|
|
|
"--with-systemdsystemunitdir=$(out)/lib/systemd/system"
|
2018-10-12 19:39:26 +02:00
|
|
|
"--enable-uinput" # explicit activation because build env has no uinput
|
|
|
|
"--enable-devinput" # explicit activation because build env has no /dev/input
|
2013-01-21 19:06:22 +01:00
|
|
|
];
|
2014-08-31 00:32:37 +02:00
|
|
|
|
2015-04-26 05:20:59 +02:00
|
|
|
installFlags = [
|
2017-11-25 22:23:57 +01:00
|
|
|
"sysconfdir=$out/etc"
|
|
|
|
"localstatedir=$TMPDIR"
|
2015-04-26 05:20:59 +02:00
|
|
|
];
|
2015-04-26 00:07:34 +02:00
|
|
|
|
2014-08-31 00:32:37 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Allows to receive and send infrared signals";
|
2020-04-24 16:58:45 +02:00
|
|
|
homepage = "https://www.lirc.org/";
|
2014-08-31 00:32:37 +02:00
|
|
|
license = licenses.gpl2;
|
2014-08-31 02:17:19 +02:00
|
|
|
platforms = platforms.linux;
|
2014-08-31 00:32:37 +02:00
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
};
|
2012-01-09 11:25:49 +01:00
|
|
|
}
|