libsigrok: fix c++ bindings (#131998)

Doxygen and Python are needed as nativeBuildInputs (according to configure).

Add a tiny installCheck for this.
This commit is contained in:
Harrison Houghton 2021-07-29 17:53:32 -04:00 committed by GitHub
parent ce67f3947e
commit 1642ca5a77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
{ lib, stdenv, fetchurl, pkg-config, libzip, glib, libusb1, libftdi1, check
, libserialport, librevisa, doxygen, glibmm
, libserialport, librevisa, doxygen, glibmm, python3
, version ? "0.5.1", sha256 ? "171b553dir5gn6w4f7n37waqk62nq2kf1jykx4ifjacdz5xdw3z4"
}:
@ -17,10 +17,8 @@ stdenv.mkDerivation rec {
sha256 = "14sd8xqph4kb109g073daiavpadb20fcz7ch1ipn0waz7nlly4sw";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libzip glib libusb1 libftdi1 check libserialport
librevisa doxygen glibmm
];
nativeBuildInputs = [ doxygen pkg-config python3 ];
buildInputs = [ libzip glib libusb1 libftdi1 check libserialport librevisa glibmm ];
strictDeps = true;
@ -29,11 +27,18 @@ stdenv.mkDerivation rec {
tar --strip-components=1 -xvf "${firmware}" -C "$out/share/sigrok-firmware/"
'';
doInstallCheck = true;
installCheckPhase = ''
# assert that c++ bindings are included
[[ -f $out/include/libsigrokcxx/libsigrokcxx.hpp ]] \
|| { echo 'C++ bindings were not generated; check configure output'; false; }
'';
meta = with lib; {
description = "Core library of the sigrok signal analysis software suite";
homepage = "https://sigrok.org/";
license = licenses.gpl3Plus;
platforms = platforms.linux ++ platforms.darwin;
maintainers = [ maintainers.bjornfor ];
maintainers = with maintainers; [ bjornfor ];
};
}