1 { lib, stdenv, fetchurl, pkg-config, udev, darwin }:
3 stdenv.mkDerivation rec {
4 pname = "libserialport";
8 url = "https://sigrok.org/download/source/libserialport/${pname}-${version}.tar.gz";
9 sha256 = "17ajlwgvyyrap8z7f16zcs59pksvncwbmd3mzf98wj7zqgczjaja";
12 nativeBuildInputs = [ pkg-config ];
13 buildInputs = lib.optional stdenv.isLinux udev
14 ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.IOKit;
17 description = "Cross-platform shared library for serial port access";
18 homepage = "https://sigrok.org/";
19 license = licenses.gpl3Plus;
20 platforms = platforms.linux ++ platforms.darwin;
21 maintainers = [ maintainers.bjornfor ];