about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libgpiod/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libgpiod/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/libgpiod/default.nix24
1 files changed, 9 insertions, 15 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libgpiod/default.nix b/nixpkgs/pkgs/development/libraries/libgpiod/default.nix
index ce5a4ac2833d..6a6e21662ecc 100644
--- a/nixpkgs/pkgs/development/libraries/libgpiod/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libgpiod/default.nix
@@ -1,23 +1,15 @@
-{ lib, stdenv, fetchurl, autoreconfHook, autoconf-archive, pkg-config, kmod
-, enable-tools ? true
-, enablePython ? false, python3, ncurses }:
+{ lib, stdenv, fetchurl, autoreconfHook, autoconf-archive, pkg-config
+, enable-tools ? true }:
 
 stdenv.mkDerivation rec {
   pname = "libgpiod";
-  version = "1.6.4";
+  version = "2.0.1";
 
   src = fetchurl {
     url = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-${version}.tar.gz";
-    sha256 = "sha256-gp1KwmjfB4U2CdZ8/H9HbpqnNssqaKYwvpno+tGXvgo=";
+    hash = "sha256-tu2lU1YWCo5zkG49SOlZ74EpZ4fXZJdbEPJX6WYGaOk=";
   };
 
-  patches = [
-    # cross compiling fix
-    # https://github.com/brgl/libgpiod/pull/45
-    ./0001-Drop-AC_FUNC_MALLOC-and-_REALLOC-and-check-for-them-.patch
-  ];
-
-  buildInputs = [ kmod ] ++ lib.optionals enablePython [ python3 ncurses ];
   nativeBuildInputs = [
     autoconf-archive
     pkg-config
@@ -27,8 +19,7 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--enable-tools=${if enable-tools then "yes" else "no"}"
     "--enable-bindings-cxx"
-    "--prefix=${placeholder "out"}"
-  ] ++ lib.optional enablePython "--enable-bindings-python";
+  ];
 
   meta = with lib; {
     description = "C library and tools for interacting with the linux GPIO character device";
@@ -38,7 +29,10 @@ stdenv.mkDerivation rec {
       data structures behind a straightforward API.
     '';
     homepage = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/";
-    license = licenses.lgpl2;
+    license = with licenses; [
+      lgpl21Plus # libgpiod
+      lgpl3Plus # C++ bindings
+    ] ++ lib.optional enable-tools gpl2Plus;
     maintainers = [ maintainers.expipiplus1 ];
     platforms = platforms.linux;
   };