From 3055a0c9755c89616257c5d8318a32dc42b01341 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Fri, 12 Oct 2018 13:39:26 -0400 Subject: lirc: add support for Python bindings --- pkgs/development/libraries/lirc/default.nix | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/libraries/lirc/default.nix b/pkgs/development/libraries/lirc/default.nix index ad6d2df1d8b..13fbe2b55b6 100644 --- a/pkgs/development/libraries/lirc/default.nix +++ b/pkgs/development/libraries/lirc/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, alsaLib, help2man, pkgconfig, xlibsWrapper, python3 -, libxslt, systemd, libusb, libftdi1 }: +{ stdenv, fetchurl, fetchpatch, autoreconfHook, pkgconfig, help2man, python3, + alsaLib, xlibsWrapper, libxslt, systemd, libusb, libftdi1 }: stdenv.mkDerivation rec { name = "lirc-0.10.1"; @@ -9,6 +9,12 @@ stdenv.mkDerivation rec { 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 . @@ -24,17 +30,17 @@ stdenv.mkDerivation rec { touch lib/lirc/input_map.inc ''; - nativeBuildInputs = [ pkgconfig help2man ]; + nativeBuildInputs = [ autoreconfHook pkgconfig help2man + (python3.withPackages (p: with p; [ pyyaml setuptools ])) ]; - buildInputs = [ alsaLib xlibsWrapper libxslt systemd libusb libftdi1 ] - ++ (with python3.pkgs; [ python pyyaml setuptools ]); + buildInputs = [ alsaLib xlibsWrapper libxslt systemd libusb libftdi1 ]; configureFlags = [ "--sysconfdir=/etc" "--localstatedir=/var" "--with-systemdsystemunitdir=$(out)/lib/systemd/system" - "--enable-uinput" # explicite activation because build env has no uinput - "--enable-devinput" # explicite activation because build env has not /dev/input + "--enable-uinput" # explicit activation because build env has no uinput + "--enable-devinput" # explicit activation because build env has no /dev/input ]; installFlags = [ -- cgit 1.4.1