nixpkgs-suyu/pkgs/applications/radio/hackrf/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
999 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libusb1, fftwSinglePrec }:
2015-05-08 17:31:26 +02:00
stdenv.mkDerivation rec {
pname = "hackrf";
2022-09-30 16:10:11 +02:00
version = "2022.09.1";
2015-05-08 17:31:26 +02:00
src = fetchFromGitHub {
2021-10-09 22:29:09 +02:00
owner = "greatscottgadgets";
repo = "hackrf";
rev = "v${version}";
2022-09-30 16:10:11 +02:00
sha256 = "sha256-c+9DEMxioIbEDNTdLSOnxX1zpFk07K9rlGP9goEJMlU=";
2015-05-08 17:31:26 +02:00
};
nativeBuildInputs = [
cmake
pkg-config
];
2015-05-08 17:31:26 +02:00
buildInputs = [
libusb1
fftwSinglePrec
2015-05-08 17:31:26 +02:00
];
2017-07-26 19:01:42 +02:00
cmakeFlags = [ "-DUDEV_RULES_GROUP=plugdev" "-DUDEV_RULES_PATH=lib/udev/rules.d" ];
2015-05-08 17:31:26 +02:00
preConfigure = ''
2017-07-26 19:01:42 +02:00
cd host
2015-05-08 17:31:26 +02:00
'';
2017-07-26 19:01:42 +02:00
2021-10-09 22:29:09 +02:00
postPatch = ''
substituteInPlace host/cmake/modules/FindFFTW.cmake \
--replace "find_library (FFTW_LIBRARIES NAMES fftw3)" "find_library (FFTW_LIBRARIES NAMES fftw3f)"
'';
meta = with lib; {
2015-05-08 17:31:26 +02:00
description = "An open source SDR platform";
homepage = "https://greatscottgadgets.com/hackrf/";
2015-05-08 17:31:26 +02:00
license = licenses.gpl2;
2015-10-31 23:47:24 +01:00
platforms = platforms.all;
maintainers = with maintainers; [ sjmackenzie ];
2015-05-08 17:31:26 +02:00
};
}