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 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c812c7cd9f8b..22115c938e13 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4151,6 +4151,11 @@ in { inherit (pkgs.linuxPackages) nvidia_x11; }; + libgpiod = disabledIf (!isPy3k) (toPythonModule (pkgs.libgpiod.override { + enablePython = true; + python3 = python; + })); + libkeepass = callPackage ../development/python-modules/libkeepass { }; librepo = pipe pkgs.librepo [