2014-05-18 21:15:37 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libzip, glib, libusb1, libftdi, check
|
2016-05-11 20:21:35 +01:00
|
|
|
, libserialport, librevisa, doxygen, glibmm, python
|
|
|
|
, version ? "0.4.0", sha256 ? "17k63p3yhpx9qbfprgayphqqhn2hdrcph73g6fqxmrinxqziyaaz"
|
2014-05-18 21:15:37 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-05-11 20:21:35 +01:00
|
|
|
inherit version;
|
|
|
|
name = "libsigrok-${version}";
|
2014-05-18 21:15:37 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://sigrok.org/download/source/libsigrok/${name}.tar.gz";
|
2016-05-11 20:21:35 +01:00
|
|
|
inherit sha256;
|
2014-05-18 21:15:37 +01:00
|
|
|
};
|
|
|
|
|
2015-01-01 18:45:19 +00:00
|
|
|
firmware = fetchurl {
|
2016-05-11 20:21:35 +01:00
|
|
|
url = "http://sigrok.org/download/binary/sigrok-firmware-fx2lafw/sigrok-firmware-fx2lafw-bin-0.1.3.tar.gz";
|
|
|
|
sha256 = "1qr02ny97navqxr56xq1a227yzf6h09m8jlvc9bnjl0bsk6887bl";
|
2015-01-01 18:45:19 +00:00
|
|
|
};
|
|
|
|
|
2014-05-18 21:15:37 +01:00
|
|
|
buildInputs = [ pkgconfig libzip glib libusb1 libftdi check libserialport
|
2016-05-11 20:21:35 +01:00
|
|
|
librevisa doxygen glibmm python
|
2014-05-18 21:15:37 +01:00
|
|
|
];
|
|
|
|
|
2015-01-01 18:45:19 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/share/sigrok-firmware/"
|
|
|
|
tar --strip-components=1 -xvf "${firmware}" -C "$out/share/sigrok-firmware/"
|
|
|
|
'';
|
|
|
|
|
2014-05-18 21:15:37 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Core library of the sigrok signal analysis software suite";
|
|
|
|
homepage = http://sigrok.org/;
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|