1 { lib, stdenv, fetchurl, autoreconfHook, autoconf-archive, pkg-config
2 , enable-tools ? true }:
4 stdenv.mkDerivation rec {
9 url = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-${version}.tar.gz";
10 hash = "sha256-/W7UssZ0/mzDtIGID2zeHup54pbpWhObhUAequpt4/w=";
20 "--enable-tools=${if enable-tools then "yes" else "no"}"
21 "--enable-bindings-cxx"
25 description = "C library and tools for interacting with the linux GPIO character device";
27 Since linux 4.8 the GPIO sysfs interface is deprecated. User space should use
28 the character device instead. This library encapsulates the ioctl calls and
29 data structures behind a straightforward API.
31 homepage = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/";
32 license = with licenses; [
34 lgpl3Plus # C++ bindings
35 ] ++ lib.optional enable-tools gpl2Plus;
36 maintainers = [ maintainers.expipiplus1 ];
37 platforms = platforms.linux;