Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-18.03 52 lines 1.5 kB view raw
1{ stdenv, fetchurl, alsaLib, bash, help2man, pkgconfig, xlibsWrapper, python3 2, libxslt, systemd, libusb, libftdi1 }: 3 4stdenv.mkDerivation rec { 5 name = "lirc-0.10.1"; 6 7 src = fetchurl { 8 url = "mirror://sourceforge/lirc/${name}.tar.bz2"; 9 sha256 = "1whlyifvvc7w04ahq07nnk1h18wc8j7c6wnvlb6mszravxh3qxcb"; 10 }; 11 12 postPatch = '' 13 patchShebangs . 14 15 # fix overriding PYTHONPATH 16 sed -i 's,^PYTHONPATH *= *,PYTHONPATH := $(PYTHONPATH):,' \ 17 Makefile.in 18 sed -i 's,PYTHONPATH=,PYTHONPATH=$(PYTHONPATH):,' \ 19 doc/Makefile.in 20 ''; 21 22 preConfigure = '' 23 # use empty inc file instead of a from linux kernel generated one 24 touch lib/lirc/input_map.inc 25 ''; 26 27 nativeBuildInputs = [ pkgconfig help2man ]; 28 29 buildInputs = [ alsaLib xlibsWrapper libxslt systemd libusb libftdi1 ] 30 ++ (with python3.pkgs; [ python pyyaml setuptools ]); 31 32 configureFlags = [ 33 "--sysconfdir=/etc" 34 "--localstatedir=/var" 35 "--with-systemdsystemunitdir=$(out)/lib/systemd/system" 36 "--enable-uinput" # explicite activation because build env has no uinput 37 "--enable-devinput" # explicite activation because build env has not /dev/input 38 ]; 39 40 installFlags = [ 41 "sysconfdir=$out/etc" 42 "localstatedir=$TMPDIR" 43 ]; 44 45 meta = with stdenv.lib; { 46 description = "Allows to receive and send infrared signals"; 47 homepage = http://www.lirc.org/; 48 license = licenses.gpl2; 49 platforms = platforms.linux; 50 maintainers = with maintainers; [ pSub ]; 51 }; 52}