diff --git a/pkgs/development/tools/libsigrok/default.nix b/pkgs/development/tools/libsigrok/default.nix index eceb267c139d9..6df1a043b6ad7 100644 --- a/pkgs/development/tools/libsigrok/default.nix +++ b/pkgs/development/tools/libsigrok/default.nix @@ -15,6 +15,7 @@ , hidapi , libieee1284 , bluez +, sigrok-firmware-fx2lafw }: stdenv.mkDerivation rec { @@ -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 ]; @@ -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; diff --git a/pkgs/development/tools/sigrok-firmware-fx2lafw/default.nix b/pkgs/development/tools/sigrok-firmware-fx2lafw/default.nix new file mode 100644 index 0000000000000..86b1f3be33c1c --- /dev/null +++ b/pkgs/development/tools/sigrok-firmware-fx2lafw/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c4d018cdf1aec..76fa96ea96a12 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };