4 # Remove gcc and python references
32 # Needed only if qt-gui is disabled, from some reason
37 , gobject-introspection
41 # Features available to override, the list of them is in featuresInfo. They
42 # are all turned on by default.
44 # If one wishes to use a different src or name for a very custom build
47 , version ? "3.10.11.0"
51 sourceSha256 = "sha256-QOZXUj+ZmfpazsrHEs8Gx3WSmoHG/zO43NEpyhIjpN8=";
66 # when gr-qtgui is disabled, icu needs to be included, otherwise
67 # building with boost 1.7x fails
68 ++ lib.optionals (!(hasFeature "gr-qtgui")) [ icu ];
69 pythonNative = with python.pkgs; [
76 cmakeEnableFlag = "DOXYGEN";
79 cmakeEnableFlag = "MANPAGES";
82 pythonRuntime = [ python.pkgs.six ];
86 cmakeEnableFlag = "PYTHON";
90 cmakeEnableFlag = "TESTING";
93 cmakeEnableFlag = "POSTINSTALL";
96 cmakeEnableFlag = "GNURADIO_RUNTIME";
108 # For gr-perf-monitorx
109 python.pkgs.matplotlib
112 cmakeEnableFlag = "GR_CTRLPORT";
114 gnuradio-companion = {
115 pythonRuntime = with python.pkgs; [
127 gobject-introspection
131 cmakeEnableFlag = "GRC";
135 python.pkgs.jsonschema
137 cmakeEnableFlag = "JSONYAML_BLOCKS";
140 cmakeEnableFlag = "GR_BLOCKS";
142 # Required to compile wavfile blocks.
147 cmakeEnableFlag = "GR_FEC";
150 runtime = [ fftwFloat ];
151 cmakeEnableFlag = "GR_FFT";
154 runtime = [ fftwFloat ];
155 cmakeEnableFlag = "GR_FILTER";
156 pythonRuntime = with python.pkgs; [
163 cmakeEnableFlag = "GR_ANALOG";
166 cmakeEnableFlag = "GR_DIGITAL";
169 cmakeEnableFlag = "GR_DTV";
173 ++ lib.optionals stdenv.isLinux [ alsa-lib libjack2 ]
174 ++ lib.optionals stdenv.isDarwin [ CoreAudio ]
176 cmakeEnableFlag = "GR_AUDIO";
179 cmakeEnableFlag = "GR_CHANNELS";
182 cmakeEnableFlag = "GR_PDU";
189 cmakeEnableFlag = "GR_IIO";
194 common-precompiled-headers = {
195 cmakeEnableFlag = "COMMON_PCH";
198 runtime = [ qt5.qtbase libsForQt5.qwt ];
199 pythonRuntime = [ python.pkgs.pyqt5 ];
200 cmakeEnableFlag = "GR_QTGUI";
203 cmakeEnableFlag = "GR_TRELLIS";
209 cmakeEnableFlag = "GR_UHD";
215 cmakeEnableFlag = "UHD_RFNOC";
218 cmakeEnableFlag = "GR_UTILS";
219 pythonRuntime = with python.pkgs; [
225 pythonRuntime = with python.pkgs; [
231 cmakeEnableFlag = "GR_MODTOOL";
234 cmakeEnableFlag = "GR_BLOCKTOOL";
238 cmakeEnableFlag = "GR_VIDEO_SDL";
241 runtime = [ codec2 gsm ];
242 cmakeEnableFlag = "GR_VOCODER";
245 cmakeEnableFlag = "GR_WAVELET";
246 runtime = [ gsl libsodium ];
249 runtime = [ cppzmq ];
250 cmakeEnableFlag = "GR_ZEROMQ";
252 # Will compile without this, but it is required by tests, and by some
258 cmakeEnableFlag = "GR_NETWORK";
261 cmakeEnableFlag = "GR_SOAPY";
267 shared = (import ./shared.nix {
283 inherit (shared.passthru) hasFeature; # function
286 stdenv.mkDerivation (finalAttrs: (shared // {
287 inherit pname version;
288 # Will still evaluate correctly if not used here. It only helps nix-update
289 # find the right file in which version is defined.
290 inherit (shared) src;
292 # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
293 ./modtool-newmod-permissions.patch
295 passthru = shared.passthru // {
296 # Deps that are potentially overridden and are used inside GR plugins - the same version must
301 # Used by many gnuradio modules, the same attribute is present in
302 # previous gnuradio versions where there it's log4cpp.
304 } // lib.optionalAttrs (hasFeature "gr-uhd") {
306 } // lib.optionalAttrs (hasFeature "gr-pdu") {
307 inherit libiio libad9361;
308 } // lib.optionalAttrs (hasFeature "gr-qtgui") {
309 inherit (libsForQt5) qwt;
312 postInstall = shared.postInstall
313 # This is the only python reference worth removing, if needed.
314 + lib.optionalString (!hasFeature "python-support") ''
315 ${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
316 ${removeReferencesTo}/bin/remove-references-to -t ${python} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
317 ${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake