lirc: add support for Python bindings
This commit is contained in:
parent
1ba50fe163
commit
3055a0c975
@ -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 = [
|
||||
|
@ -2929,6 +2929,10 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
lirc = disabledIf isPy27 (toPythonModule (pkgs.lirc.override {
|
||||
python3 = python;
|
||||
}));
|
||||
|
||||
jupyter = buildPythonPackage rec {
|
||||
version = "1.0.0";
|
||||
name = "jupyter-${version}";
|
||||
|
Loading…
Reference in New Issue
Block a user