Skip to content

Commit

Permalink
sigrok-firmware-fx2lafw: init at 0.1.7
Browse files Browse the repository at this point in the history
Cross-compile the firmware files instead of downloading the binaries.
Bump 0.1.6 -> 0.1.7.
  • Loading branch information
panicgh committed Aug 16, 2022
1 parent 0b0c92a commit bc36ea1
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkgs/development/tools/libsigrok/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
, hidapi
, libieee1284
, bluez
, sigrok-firmware-fx2lafw
}:

stdenv.mkDerivation rec {
Expand All @@ -26,11 +27,6 @@ stdenv.mkDerivation rec {
sha256 = "0g6fl684bpqm5p2z4j12c62m45j1dircznjina63w392ns81yd2d";
};

firmware = fetchurl {
url = "https://sigrok.org/download/binary/sigrok-firmware-fx2lafw/sigrok-firmware-fx2lafw-bin-0.1.6.tar.gz";
sha256 = "14sd8xqph4kb109g073daiavpadb20fcz7ch1ipn0waz7nlly4sw";
};

enableParallelBuilding = true;

nativeBuildInputs = [ doxygen pkg-config python ];
Expand All @@ -45,7 +41,7 @@ stdenv.mkDerivation rec {
cp contrib/*.rules $out/etc/udev/rules.d
mkdir -p "$out/share/sigrok-firmware/"
tar --strip-components=1 -xvf "${firmware}" -C "$out/share/sigrok-firmware/"
cp ${sigrok-firmware-fx2lafw}/share/sigrok-firmware/* "$out/share/sigrok-firmware/"
'';

doInstallCheck = true;
Expand Down
35 changes: 35 additions & 0 deletions pkgs/development/tools/sigrok-firmware-fx2lafw/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{ lib
, stdenv
, fetchurl
, sdcc
}:

stdenv.mkDerivation rec {
pname = "sigrok-firmware-fx2lafw";
version = "0.1.7";

src = fetchurl {
url = "https://sigrok.org/download/source/sigrok-firmware-fx2lafw/sigrok-firmware-fx2lafw-${version}.tar.gz";
sha256 = "sha256-o/RA1qhSpG4sXRmfwcjk2s0Aa8BODVV2KY7lXQVqzjs=";
};

enableParallelBuilding = true;

nativeBuildInputs = [ sdcc ];

meta = with lib; {
description = "Firmware for FX2 logic analyzers";
homepage = "https://sigrok.org/";

# licensing details explained in:
# https://sigrok.org/gitweb/?p=sigrok-firmware-fx2lafw.git;a=blob;f=README;hb=HEAD#l122
license = with licenses; [
gpl2Plus # overall
lgpl21Plus # fx2lib, Hantek 6022BE, Sainsmart DDS120 firmwares
];

sourceProvenance = with sourceTypes; [ fromSource ];
platforms = platforms.all;
maintainers = with maintainers; [ panicgh ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15864,6 +15864,8 @@ with pkgs;
libsigrok4dsl = callPackage ../applications/science/electronics/dsview/libsigrok4dsl.nix { };
libsigrokdecode4dsl = callPackage ../applications/science/electronics/dsview/libsigrokdecode4dsl.nix { };

sigrok-firmware-fx2lafw = callPackage ../development/tools/sigrok-firmware-fx2lafw { };

cli11 = callPackage ../development/tools/misc/cli11 { };

datree = callPackage ../development/tools/datree { };
Expand Down

0 comments on commit bc36ea1

Please sign in to comment.