libgpiod: add support for Python bindings
This commit is contained in:
parent
080d77443e
commit
569566d98b
2 changed files with 11 additions and 4 deletions
|
@ -1,4 +1,6 @@
|
||||||
{ stdenv, fetchurl, autoreconfHook, autoconf-archive, pkgconfig, kmod, enable-tools ? true }:
|
{ lib, stdenv, fetchurl, autoreconfHook, autoconf-archive, pkgconfig, kmod
|
||||||
|
, enable-tools ? true
|
||||||
|
, enablePython ? false, python3, ncurses }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "libgpiod";
|
pname = "libgpiod";
|
||||||
|
@ -9,7 +11,7 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "1r337ici2nvi9v2h33nf3b7nisirc4s8p31cpv1cg8jbzn3wi15g";
|
sha256 = "1r337ici2nvi9v2h33nf3b7nisirc4s8p31cpv1cg8jbzn3wi15g";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ kmod ];
|
buildInputs = [ kmod ] ++ lib.optionals enablePython [ python3 ncurses ];
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
autoconf-archive
|
autoconf-archive
|
||||||
pkgconfig
|
pkgconfig
|
||||||
|
@ -20,9 +22,9 @@ stdenv.mkDerivation rec {
|
||||||
"--enable-tools=${if enable-tools then "yes" else "no"}"
|
"--enable-tools=${if enable-tools then "yes" else "no"}"
|
||||||
"--enable-bindings-cxx"
|
"--enable-bindings-cxx"
|
||||||
"--prefix=${placeholder "out"}"
|
"--prefix=${placeholder "out"}"
|
||||||
];
|
] ++ lib.optional enablePython "--enable-bindings-python";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "C library and tools for interacting with the linux GPIO character device";
|
description = "C library and tools for interacting with the linux GPIO character device";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Since linux 4.8 the GPIO sysfs interface is deprecated. User space should use
|
Since linux 4.8 the GPIO sysfs interface is deprecated. User space should use
|
||||||
|
|
|
@ -4151,6 +4151,11 @@ in {
|
||||||
inherit (pkgs.linuxPackages) nvidia_x11;
|
inherit (pkgs.linuxPackages) nvidia_x11;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
libgpiod = disabledIf (!isPy3k) (toPythonModule (pkgs.libgpiod.override {
|
||||||
|
enablePython = true;
|
||||||
|
python3 = python;
|
||||||
|
}));
|
||||||
|
|
||||||
libkeepass = callPackage ../development/python-modules/libkeepass { };
|
libkeepass = callPackage ../development/python-modules/libkeepass { };
|
||||||
|
|
||||||
librepo = pipe pkgs.librepo [
|
librepo = pipe pkgs.librepo [
|
||||||
|
|
Loading…
Reference in a new issue