git.iko.soy/typeable/nixpkgs
on master help sign in
lirc: add support for Python bindings
commit3055a0c9755c89616257c5d8318a32dc42b01341 authorBen Wolsieffer <benwolsieffer@gmail.com> dateFri 12 Oct 2018, 13:39 (8 years ago) parent1ba50fe
2 files changed+17−7
pkgs/development/libraries/lirc/default.nix+13−7 pkgs/top-level/python-packages.nix+4
pkgs/development/libraries/lirc/default.nix+13−7
@@ -1,5 +1,5 @@
1−{ stdenv, fetchurl, alsaLib, help2man, pkgconfig, xlibsWrapper, python3
2−, libxslt, systemd, libusb, libftdi1 }:
1+{ stdenv, fetchurl, fetchpatch, autoreconfHook, pkgconfig, help2man, python3,
2+ alsaLib, xlibsWrapper, libxslt, systemd, libusb, libftdi1 }:
33
44stdenv.mkDerivation rec {
55 name = "lirc-0.10.1";
@@ -9,6 +9,12 @@ stdenv.mkDerivation rec {
99 sha256 = "1whlyifvvc7w04ahq07nnk1h18wc8j7c6wnvlb6mszravxh3qxcb";
1010 };
1111
12+ # Fix installation of Python bindings
13+ patches = [ (fetchpatch {
14+ url = "https://sourceforge.net/p/lirc/tickets/339/attachment/0001-Fix-Python-bindings.patch";
15+ sha256 = "088a39x8c1qd81qwvbiqd6crb2lk777wmrs8rdh1ga06lglyvbly";
16+ }) ];
17+
1218 postPatch = ''
1319 patchShebangs .
1420
@@ -24,17 +30,17 @@ stdenv.mkDerivation rec {
2430 touch lib/lirc/input_map.inc
2531 '';
2632
27− nativeBuildInputs = [ pkgconfig help2man ];
33+ nativeBuildInputs = [ autoreconfHook pkgconfig help2man
34+ (python3.withPackages (p: with p; [ pyyaml setuptools ])) ];
2835
29− buildInputs = [ alsaLib xlibsWrapper libxslt systemd libusb libftdi1 ]
30− ++ (with python3.pkgs; [ python pyyaml setuptools ]);
36+ buildInputs = [ alsaLib xlibsWrapper libxslt systemd libusb libftdi1 ];
3137
3238 configureFlags = [
3339 "--sysconfdir=/etc"
3440 "--localstatedir=/var"
3541 "--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
42+ "--enable-uinput" # explicit activation because build env has no uinput
43+ "--enable-devinput" # explicit activation because build env has no /dev/input
3844 ];
3945
4046 installFlags = [
pkgs/top-level/python-packages.nix+4
@@ -2929,6 +2929,10 @@ in {
29292929 };
29302930 };
29312931
2932+ lirc = disabledIf isPy27 (toPythonModule (pkgs.lirc.override {
2933+ python3 = python;
2934+ }));
2935+
29322936 jupyter = buildPythonPackage rec {
29332937 version = "1.0.0";
29342938 name = "jupyter-${version}";