about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libgpiod
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libgpiod')
-rw-r--r--nixpkgs/pkgs/development/libraries/libgpiod/default.nix16
1 files changed, 9 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libgpiod/default.nix b/nixpkgs/pkgs/development/libraries/libgpiod/default.nix
index 772027de0fb3..76887347a182 100644
--- a/nixpkgs/pkgs/development/libraries/libgpiod/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libgpiod/default.nix
@@ -1,15 +1,17 @@
-{ 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";
-  version = "1.4.2";
+  version = "1.5";
 
   src = fetchurl {
     url = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-${version}.tar.gz";
-    sha256 = "0r0hdindy6pi1va3mhk2lg5dis0qbi535k790w76dxfx1hyavk70";
+    sha256 = "1r337ici2nvi9v2h33nf3b7nisirc4s8p31cpv1cg8jbzn3wi15g";
   };
 
-  buildInputs = [ kmod ];
+  buildInputs = [ kmod ] ++ lib.optionals enablePython [ python3 ncurses ];
   nativeBuildInputs = [
     autoconf-archive
     pkgconfig
@@ -20,16 +22,16 @@ 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
       the character device instead. This library encapsulates the ioctl calls and
       data structures behind a straightforward API.
     '';
-    homepage = https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/;
+    homepage = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/";
     license = licenses.lgpl2;
     maintainers = [ maintainers.expipiplus1 ];
     platforms = platforms.linux;