From e4dd2dcad4281958fced19abe189a4ab9926c341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Thu, 1 Jan 2015 19:45:19 +0100 Subject: [PATCH] libsigrok: install missing firmware files Without this, hardware that requires firmware (e.g. Saleae Logic) is unuseable. Example error that this fixes: sr: ezusb: Unable to open firmware file /nix/store/rqgppsz3gwy8jailflf3049fzyzrgkdb-libsigrok-0.3.0/share/sigrok-firmware/fx2lafw-saleae-logic.fw for reading: No such file or directory sr: fx2lafw: Firmware upload failed for device 0. --- pkgs/development/tools/libsigrok/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/tools/libsigrok/default.nix b/pkgs/development/tools/libsigrok/default.nix index c8905dcbafd..5be4f4a27ab 100644 --- a/pkgs/development/tools/libsigrok/default.nix +++ b/pkgs/development/tools/libsigrok/default.nix @@ -10,10 +10,20 @@ stdenv.mkDerivation rec { sha256 = "0l3h7zvn3w4c1b9dgvl3hirc4aj1csfkgbk87jkpl7bgl03nk4j3"; }; + firmware = fetchurl { + url = "http://sigrok.org/download/binary/sigrok-firmware-fx2lafw/sigrok-firmware-fx2lafw-bin-0.1.2.tar.gz"; + sha256 = "0w0w6l015d16181mx8mgyjha4bv3ba7x36p86k9n1x52809433gj"; + }; + buildInputs = [ pkgconfig libzip glib libusb1 libftdi check libserialport librevisa ]; + 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/;