diff options
author | Ben Wolsieffer <benwolsieffer@gmail.com> | 2020-03-19 21:11:45 -0400 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2020-03-19 21:44:10 -0700 |
commit | 569566d98b191d4463c18b343b8bcf79c35d930f (patch) | |
tree | bd15db9593220da34611e5c4591350456c05f679 /pkgs/development | |
parent | 080d77443e45cc00722dc9a9894c7389dd89c2d4 (diff) | |
download | nixlib-569566d98b191d4463c18b343b8bcf79c35d930f.tar nixlib-569566d98b191d4463c18b343b8bcf79c35d930f.tar.gz nixlib-569566d98b191d4463c18b343b8bcf79c35d930f.tar.bz2 nixlib-569566d98b191d4463c18b343b8bcf79c35d930f.tar.lz nixlib-569566d98b191d4463c18b343b8bcf79c35d930f.tar.xz nixlib-569566d98b191d4463c18b343b8bcf79c35d930f.tar.zst nixlib-569566d98b191d4463c18b343b8bcf79c35d930f.zip |
libgpiod: add support for Python bindings
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/libgpiod/default.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/development/libraries/libgpiod/default.nix b/pkgs/development/libraries/libgpiod/default.nix index 7bb2785dbcf2..76887347a182 100644 --- a/pkgs/development/libraries/libgpiod/default.nix +++ b/pkgs/development/libraries/libgpiod/default.nix @@ -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 { pname = "libgpiod"; @@ -9,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "1r337ici2nvi9v2h33nf3b7nisirc4s8p31cpv1cg8jbzn3wi15g"; }; - buildInputs = [ kmod ]; + buildInputs = [ kmod ] ++ lib.optionals enablePython [ python3 ncurses ]; nativeBuildInputs = [ autoconf-archive pkgconfig @@ -20,9 +22,9 @@ stdenv.mkDerivation rec { "--enable-tools=${if enable-tools then "yes" else "no"}" "--enable-bindings-cxx" "--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"; longDescription = '' Since linux 4.8 the GPIO sysfs interface is deprecated. User space should use |