Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, fetchurl, autoreconfHook, autoconf-archive, pkgconfig, kmod, enable-tools ? true }:
2
3stdenv.mkDerivation rec {
4 pname = "libgpiod";
5 version = "1.4.2";
6
7 src = fetchurl {
8 url = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-${version}.tar.gz";
9 sha256 = "0r0hdindy6pi1va3mhk2lg5dis0qbi535k790w76dxfx1hyavk70";
10 };
11
12 buildInputs = [ kmod ];
13 nativeBuildInputs = [
14 autoconf-archive
15 pkgconfig
16 autoreconfHook
17 ];
18
19 configureFlags = [
20 "--enable-tools=${if enable-tools then "yes" else "no"}"
21 "--enable-bindings-cxx"
22 "--prefix=${placeholder "out"}"
23 ];
24
25 meta = with stdenv.lib; {
26 description = "C library and tools for interacting with the linux GPIO character device";
27 longDescription = ''
28 Since linux 4.8 the GPIO sysfs interface is deprecated. User space should use
29 the character device instead. This library encapsulates the ioctl calls and
30 data structures behind a straightforward API.
31 '';
32 homepage = https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/;
33 license = licenses.lgpl2;
34 maintainers = [ maintainers.expipiplus1 ];
35 platforms = platforms.linux;
36 };
37}