3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/libsigrok/default.nix
Bjørn Forsman 300e495101 sigrok: update whole suite to latest (2016-01)
Release announcement, 2016-01-30:
https://www.sigrok.org/blog/major-sigrok-releases-libsigrok-libsigrokdecode-sigrok-cli-pulseview

I first tried updating the projects in separate commits. But later I
found cyclic dependencies, that would break git bisect, so I ended up
squashing the commits:

* libsigrok: 0.3.0 -> 0.4.0
  Enable building libsigrokcxx.so, the C++ bindings for libsigrok, by
  adding doxygen, glibmm and python as build deps. This is needed for
  Pulseview >= 0.3.0. Also update the firmware (sigrok-firmware-fx2lafw)
  while at it.

* libsigrokdecode: 0.3.0 -> 0.4.0

* sigrok-cli: 0.5.0 -> 0.6.0

* pulseview: 0.2.0 -> 0.3.0
  New dependency: glibmm (due to libsigrokcxx.pc from libsigrok).

Note that collectd is incompatible with the new libsigrok release, so
I let it use the old one (0.3.0).
2016-05-11 22:23:29 +02:00

37 lines
1.1 KiB
Nix

{ stdenv, fetchurl, pkgconfig, libzip, glib, libusb1, libftdi, check
, libserialport, librevisa, doxygen, glibmm, python
, version ? "0.4.0", sha256 ? "17k63p3yhpx9qbfprgayphqqhn2hdrcph73g6fqxmrinxqziyaaz"
}:
stdenv.mkDerivation rec {
inherit version;
name = "libsigrok-${version}";
src = fetchurl {
url = "http://sigrok.org/download/source/libsigrok/${name}.tar.gz";
inherit sha256;
};
firmware = fetchurl {
url = "http://sigrok.org/download/binary/sigrok-firmware-fx2lafw/sigrok-firmware-fx2lafw-bin-0.1.3.tar.gz";
sha256 = "1qr02ny97navqxr56xq1a227yzf6h09m8jlvc9bnjl0bsk6887bl";
};
buildInputs = [ pkgconfig libzip glib libusb1 libftdi check libserialport
librevisa doxygen glibmm python
];
postInstall = ''
mkdir -p "$out/share/sigrok-firmware/"
tar --strip-components=1 -xvf "${firmware}" -C "$out/share/sigrok-firmware/"
'';
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 ];
};
}