Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
56 lines
1.0 KiB
Nix
56 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
pkg-config,
|
|
libusb1,
|
|
fftwSinglePrec,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "hackrf";
|
|
version = "2024.02.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "greatscottgadgets";
|
|
repo = "hackrf";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-b3nGrk2P6ZLYBSCSD7c0aIApCh3ZoVDcFftybqm4vx0=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
libusb1
|
|
fftwSinglePrec
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DUDEV_RULES_GROUP=plugdev"
|
|
"-DUDEV_RULES_PATH=lib/udev/rules.d"
|
|
];
|
|
|
|
preConfigure = ''
|
|
cd host
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
|
|
postPatch = ''
|
|
substituteInPlace host/cmake/modules/FindFFTW.cmake \
|
|
--replace "find_library (FFTW_LIBRARIES NAMES fftw3)" "find_library (FFTW_LIBRARIES NAMES fftw3f)"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Open source SDR platform";
|
|
homepage = "https://greatscottgadgets.com/hackrf/";
|
|
license = licenses.gpl2;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ sjmackenzie ];
|
|
};
|
|
}
|