1{
2 lib,
3 fetchFromGitHub,
4 libpulseaudio,
5 libconfig,
6 # Needs a gnuradio built with qt gui support
7 gnuradio,
8 log4cpp,
9 thrift,
10 # Not gnuradioPackages'
11 codec2,
12 gmp,
13 gsm,
14 libopus,
15 libjpeg,
16 libsndfile,
17 libftdi,
18 limesuite,
19 soapysdr-with-plugins,
20 protobuf,
21 speex,
22 speexdsp,
23 cppzmq,
24 uhd,
25}:
26
27gnuradio.pkgs.mkDerivation {
28 pname = "qradiolink";
29 # https://github.com/qradiolink/qradiolink/tree/gr_3.10
30 version = "0.9.0-1-unstable-2024-08-29";
31
32 src = fetchFromGitHub {
33 owner = "qradiolink";
34 repo = "qradiolink";
35 rev = "f1006a20e0a642d0ac20aab18b19fa97567f2621";
36 sha256 = "sha256-9AYFO+mmwLAH8gEpZn6qcENabc/KBMcg/0wCTKsInNY=";
37 };
38
39 preBuild = ''
40 cd src/ext
41 protoc --cpp_out=. Mumble.proto
42 protoc --cpp_out=. QRadioLink.proto
43 cd ../..
44 qmake
45 '';
46
47 installPhase = ''
48 install -D qradiolink $out/bin/qradiolink
49 install -Dm644 src/res/icon.png $out/share/pixmaps/qradiolink.png
50 install -Dm644 qradiolink.desktop $out/share/applications/qradiolink.desktop
51 '';
52
53 buildInputs = [
54 gnuradio.unwrapped.boost
55 codec2
56 gnuradio.unwrapped.logLib
57 # gnuradio uses it's own log library (spdlog), and qradiolink is still
58 # using the old gnuradio log library log4cpp. Perhaps this won't be needed
59 # once the gr_3.10 branch will mature enough to be merged into qradiolink's
60 # master branch.
61 log4cpp
62 gmp
63 libpulseaudio
64 libconfig
65 gsm
66 gnuradio.pkgs.osmosdr
67 libopus
68 libjpeg
69 limesuite
70 soapysdr-with-plugins
71 speex
72 speexdsp
73 gnuradio.qt.qtbase
74 gnuradio.qt.qtmultimedia
75 libftdi
76 libsndfile
77 cppzmq
78 gnuradio.qwt
79 uhd
80 ]
81 ++ lib.optionals (gnuradio.hasFeature "gr-ctrlport") [
82 thrift
83 gnuradio.unwrapped.python.pkgs.thrift
84 ];
85 nativeBuildInputs = [
86 protobuf
87 gnuradio.qt.qmake
88 gnuradio.qt.wrapQtAppsHook
89 ];
90
91 meta = with lib; {
92 description = "SDR transceiver application for analog and digital modes";
93 mainProgram = "qradiolink";
94 homepage = "http://qradiolink.org/";
95 license = licenses.agpl3Plus;
96 maintainers = [ maintainers.markuskowa ];
97 platforms = platforms.linux;
98 };
99}