nixpkgs/pkgs/development/libraries/lirc/default.nix

53 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, alsaLib, bash, help2man, pkgconfig, xlibsWrapper, python3
, libxslt, systemd, libusb, libftdi1 }:
stdenv.mkDerivation rec {
2018-01-29 21:15:34 +01:00
name = "lirc-0.10.1";
src = fetchurl {
url = "mirror://sourceforge/lirc/${name}.tar.bz2";
2018-01-29 21:15:34 +01:00
sha256 = "1whlyifvvc7w04ahq07nnk1h18wc8j7c6wnvlb6mszravxh3qxcb";
};
postPatch = ''
patchShebangs .
# fix overriding PYTHONPATH
2017-12-09 23:35:13 +01:00
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
'';
2017-01-09 21:28:32 +01:00
nativeBuildInputs = [ pkgconfig help2man ];
buildInputs = [ alsaLib xlibsWrapper libxslt systemd libusb libftdi1 ]
2017-12-09 23:35:13 +01:00
++ (with python3.pkgs; [ python pyyaml setuptools ]);
configureFlags = [
2015-04-26 00:07:34 +02:00
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-systemdsystemunitdir=$(out)/lib/systemd/system"
2017-12-09 23:35:13 +01:00
"--enable-uinput" # explicite activation because build env has no uinput
"--enable-devinput" # explicite activation because build env has not /dev/input
];
2015-04-26 05:20:59 +02:00
installFlags = [
"sysconfdir=$out/etc"
"localstatedir=$TMPDIR"
2015-04-26 05:20:59 +02:00
];
2015-04-26 00:07:34 +02:00
meta = with stdenv.lib; {
description = "Allows to receive and send infrared signals";
homepage = http://www.lirc.org/;
license = licenses.gpl2;
2014-08-31 02:17:19 +02:00
platforms = platforms.linux;
maintainers = with maintainers; [ pSub ];
};
}