Unverified Commit e97b3caa authored by Alba Mendez's avatar Alba Mendez Committed by GitHub
Browse files

hackrf: 2024.02.1 -> 2026.01.3

With the release of the HackRF Pro, an upgrade is badly needed.

A variety of other fixes and enhancements are included. The release notes mention the following highlights (I'm excluding changes to the firmware, which this package doesn't build):

### 2026.01.1
- HackRF Pro, a new hardware platform, is now supported. Initially HackRF Pro supports a legacy radio configuration mode that makes it compatible with software designed for use with HackRF One. Future releases will enable extended precision and other modes.
- Added support for newer PortaPacks with AGM Microelectronics CPLDs

### 2026.01.3
- Add access to larger SPI flash on HackRF Pro.
parent 6a7e3489
Loading
Loading
Loading
Loading
+3 −17
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  cmake,
  pkg-config,
  libusb1,
@@ -11,13 +10,13 @@

stdenv.mkDerivation (finalAttrs: {
  pname = "hackrf";
  version = "2024.02.1";
  version = "2026.01.3";

  src = fetchFromGitHub {
    owner = "greatscottgadgets";
    repo = "hackrf";
    rev = "v${finalAttrs.version}";
    sha256 = "sha256-b3nGrk2P6ZLYBSCSD7c0aIApCh3ZoVDcFftybqm4vx0=";
    tag = "v${finalAttrs.version}";
    sha256 = "sha256-/RSZ+jkh4wmb0n8Kiee9Nr5D6LPYdmZVigpsBagAaLg=";
  };

  nativeBuildInputs = [
@@ -30,14 +29,6 @@ stdenv.mkDerivation (finalAttrs: {
    fftwSinglePrec
  ];

  patches = [
    # CMake < 3.5 fix. Remove upon next version bump.
    (fetchpatch {
      url = "https://github.com/greatscottgadgets/hackrf/commit/5c394520403c40b656a7400681e4ae167943e43f.patch";
      hash = "sha256-FRzb+Bt5fQm94d1EDbMv8oUFwD93VZQHFpQpMDe/BAA=";
    })
  ];

  cmakeFlags = [
    "-DUDEV_RULES_GROUP=plugdev"
    "-DUDEV_RULES_PATH=lib/udev/rules.d"
@@ -49,11 +40,6 @@ stdenv.mkDerivation (finalAttrs: {

  doInstallCheck = true;

  postPatch = ''
    substituteInPlace host/cmake/modules/FindFFTW.cmake \
      --replace "find_library (FFTW_LIBRARIES NAMES fftw3)" "find_library (FFTW_LIBRARIES NAMES fftw3f)"
  '';

  meta = {
    description = "Open source SDR platform";
    homepage = "https://greatscottgadgets.com/hackrf/";