1{ lib, stdenv, fetchurl, pkg-config, autoreconfHook, glib, python3, check, libxcrypt }:
2
3stdenv.mkDerivation rec {
4 pname = "libsigrokdecode";
5 version = "0.5.3";
6
7 src = fetchurl {
8 url = "https://sigrok.org/download/source/${pname}/${pname}-${version}.tar.gz";
9 sha256 = "1h1zi1kpsgf6j2z8j8hjpv1q7n49i3fhqjn8i178rka3cym18265";
10 };
11
12 # upstream was rleased before Python 3.9 and thus only checks versions up to 3.8
13 postPatch = ''
14 substituteInPlace configure.ac --replace '[python-3.8-embed]' '[python3-embed]'
15 '';
16
17 nativeBuildInputs = [ pkg-config autoreconfHook ];
18 buildInputs = [ glib python3 libxcrypt ];
19 nativeCheckInputs = [ check ];
20 doCheck = true;
21
22 meta = with lib; {
23 description = "Protocol decoding library for the sigrok signal analysis software suite";
24 homepage = "https://sigrok.org/";
25 license = licenses.gpl3Plus;
26 platforms = platforms.linux ++ platforms.darwin;
27 maintainers = [ maintainers.bjornfor ];
28 };
29}