1{
2 lib,
3 mkDerivation,
4 fetchFromGitHub,
5 cmake,
6 pkg-config,
7 boost,
8 doxygen,
9 gmp,
10 gnuradio,
11 libbladeRF,
12 mpir,
13 osmosdr,
14 python,
15 spdlog,
16}:
17
18mkDerivation {
19 pname = "gr-bladeRF";
20 version = "0-unstable-2023-11-20";
21
22 src = fetchFromGitHub {
23 owner = "Nuand";
24 repo = "gr-bladeRF";
25 rev = "27de2898dbee75d55c61f541315e3853e602e526";
26 hash = "sha256-josovHEp2VxgZqItkTAISdY1LARMIvQKD604fh4iZWc=";
27 };
28
29 buildInputs = [
30 boost
31 doxygen
32 gmp
33 gnuradio
34 libbladeRF
35 mpir
36 osmosdr
37 spdlog
38 ]
39 ++ lib.optionals (gnuradio.hasFeature "python-support") [
40 python.pkgs.numpy
41 python.pkgs.pybind11
42 ];
43 cmakeFlags = [
44 (lib.cmakeBool "ENABLE_PYTHON" (gnuradio.hasFeature "python-support"))
45 ];
46 nativeBuildInputs = [
47 cmake
48 pkg-config
49 ]
50 ++ lib.optionals (gnuradio.hasFeature "python-support") [
51 python.pkgs.mako
52 python.pkgs.pygccxml
53 ];
54
55 meta = {
56 description = "GNU Radio source and sink blocks for bladeRF devices";
57 homepage = "https://github.com/Nuand/gr-bladeRF";
58 license = lib.licenses.gpl3Plus;
59 maintainers = with lib.maintainers; [ wucke13 ];
60 platforms = lib.platforms.linux;
61 };
62}