2017-08-30 19:49:27 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libzip, glib, libusb1, libftdi1, check
|
2016-05-11 21:21:35 +02:00
|
|
|
, libserialport, librevisa, doxygen, glibmm, python
|
2017-08-30 19:49:27 +02:00
|
|
|
, version ? "0.5.0", sha256 ? "197kr5ip98lxn7rv10zs35d1w0j7265s0xvckx0mq2l8kdvqd32c"
|
2014-05-18 22:15:37 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-05-11 21:21:35 +02:00
|
|
|
inherit version;
|
|
|
|
name = "libsigrok-${version}";
|
2014-05-18 22:15:37 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-03-25 07:04:25 +02:00
|
|
|
url = "https://sigrok.org/download/source/libsigrok/${name}.tar.gz";
|
2016-05-11 21:21:35 +02:00
|
|
|
inherit sha256;
|
2014-05-18 22:15:37 +02:00
|
|
|
};
|
|
|
|
|
2015-01-01 19:45:19 +01:00
|
|
|
firmware = fetchurl {
|
2018-03-25 07:04:25 +02:00
|
|
|
url = "https://sigrok.org/download/binary/sigrok-firmware-fx2lafw/sigrok-firmware-fx2lafw-bin-0.1.3.tar.gz";
|
2016-05-11 21:21:35 +02:00
|
|
|
sha256 = "1qr02ny97navqxr56xq1a227yzf6h09m8jlvc9bnjl0bsk6887bl";
|
2015-01-01 19:45:19 +01:00
|
|
|
};
|
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ libzip glib libusb1 libftdi1 check libserialport
|
2016-05-11 21:21:35 +02:00
|
|
|
librevisa doxygen glibmm python
|
2014-05-18 22:15:37 +02:00
|
|
|
];
|
|
|
|
|
2015-01-01 19:45:19 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/share/sigrok-firmware/"
|
|
|
|
tar --strip-components=1 -xvf "${firmware}" -C "$out/share/sigrok-firmware/"
|
|
|
|
'';
|
|
|
|
|
2014-05-18 22:15:37 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Core library of the sigrok signal analysis software suite";
|
2018-03-25 07:04:25 +02:00
|
|
|
homepage = https://sigrok.org/;
|
2014-05-18 22:15:37 +02:00
|
|
|
license = licenses.gpl3Plus;
|
2019-06-06 01:05:49 +02:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2014-05-18 22:15:37 +02:00
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|