This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / 5pkgs / sdrpp-brown / package.nix
6.7 kB 218 lines
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 fetchurl, 6 cmake, 7 pkg-config, 8 unzip, 9 libX11, 10 glfw, 11 glew, 12 fftw, 13 fftwFloat, 14 volk, 15 zstd, 16 libpulseaudio, 17 18 # Sources 19 airspy_source ? true, 20 airspy, 21 airspyhf_source ? true, 22 airspyhf, 23 audio_source ? true, 24 bladerf_source ? stdenv.hostPlatform.isLinux, 25 libbladeRF, 26 file_source ? true, 27 hackrf_source ? true, 28 hackrf, 29 hermes_source ? true, 30 hl2_source ? true, 31 kiwisdr_source ? true, 32 limesdr_source ? true, 33 limesuite, 34 network_source ? true, 35 plutosdr_source ? stdenv.hostPlatform.isLinux, 36 libiio, 37 libad9361, 38 rfspace_source ? true, 39 rtl_sdr_source ? true, 40 rtl-sdr-osmocom, 41 libusb1, 42 rtl_tcp_source ? true, 43 sdrplay_source ? false, 44 sdrplay, 45 sdrpp_server_source ? true, 46 soapy_source ? true, 47 soapysdr-with-plugins, 48 spectran_http_source ? true, 49 spyserver_source ? true, 50 usrp_source ? false, 51 uhd, 52 boost, 53 54 # Sinks 55 audio_sink ? true, 56 rtaudio, 57 mpeg_adts_sink ? false, # downloads lame at build time - disable for now 58 network_sink ? true, 59 portaudio_sink ? false, 60 portaudio, 61 62 # Decoders 63 atv_decoder ? true, 64 ch_extravhf_decoder ? false, # requires itpp/mbe libraries 65 ch_tetra_demodulator ? true, 66 dab_decoder ? false, 67 falcon9_decoder ? false, 68 ft8_decoder ? true, 69 kg_sstv_decoder ? false, 70 m17_decoder ? false, 71 codec2, 72 meteor_demodulator ? true, 73 pager_decoder ? true, 74 radio ? true, 75 weather_sat_decoder ? false, 76 77 # Misc 78 discord_presence ? true, 79 frequency_manager ? true, 80 iq_exporter ? true, 81 recorder ? true, 82 rigctl_client ? true, 83 rigctl_server ? true, 84 scanner ? true, 85 noise_reduction ? true, 86}: 87 88let 89 # ETSI TETRA codec - pre-fetched to avoid network access during build 90 etsiCodec = fetchurl { 91 url = "http://www.etsi.org/deliver/etsi_en/300300_300399/30039502/01.03.01_60/en_30039502v010301p0.zip"; 92 hash = "sha256-H+GMR3PIzLUu8jyltKCwhBs41U3dXZx9huuLBg8TLzk="; 93 }; 94in 95stdenv.mkDerivation (_finalAttrs: { 96 pname = "sdrpp-brown"; 97 98 version = "0-unstable-2025-12-29"; 99 100 src = fetchFromGitHub { 101 owner = "sannysanoff"; 102 repo = "SDRPlusPlusBrown"; 103 rev = "f0feccfb10a9a102255c771ec3f5923c6f58ad9e"; 104 hash = "sha256-2DeDWoWRTv6lcF+DQyaVx2oJsjlGsUf88MrF3+7T6Ew="; 105 }; 106 107 nativeBuildInputs = [ 108 cmake 109 pkg-config 110 ] 111 ++ lib.optional ch_tetra_demodulator unzip; 112 113 buildInputs = [ 114 glfw 115 glew 116 fftw 117 fftwFloat 118 volk 119 zstd 120 ] 121 ++ lib.optional stdenv.hostPlatform.isLinux libX11 122 ++ lib.optional stdenv.hostPlatform.isLinux libpulseaudio 123 ++ lib.optional airspy_source airspy 124 ++ lib.optional airspyhf_source airspyhf 125 ++ lib.optional bladerf_source libbladeRF 126 ++ lib.optional hackrf_source hackrf 127 ++ lib.optional limesdr_source limesuite 128 ++ lib.optionals rtl_sdr_source [ 129 rtl-sdr-osmocom 130 libusb1 131 ] 132 ++ lib.optional sdrplay_source sdrplay 133 ++ lib.optional soapy_source soapysdr-with-plugins 134 ++ lib.optionals plutosdr_source [ 135 libiio 136 libad9361 137 ] 138 ++ lib.optionals usrp_source [ 139 uhd 140 boost 141 ] 142 ++ lib.optional (audio_source || audio_sink) rtaudio 143 ++ lib.optional portaudio_sink portaudio 144 ++ lib.optional (dab_decoder || m17_decoder) codec2; 145 146 # Pre-place the ETSI codec in the build directory so CMake doesn't try to download it 147 preConfigure = lib.optionalString ch_tetra_demodulator '' 148 mkdir -p build/decoder_modules/ch_tetra_demodulator/etsi_codec 149 cp ${etsiCodec} build/decoder_modules/ch_tetra_demodulator/etsi_codec/etsi_tetra_codec.zip 150 ''; 151 152 cmakeFlags = [ 153 # Sources 154 (lib.cmakeBool "OPT_BUILD_AIRSPYHF_SOURCE" airspyhf_source) 155 (lib.cmakeBool "OPT_BUILD_AIRSPY_SOURCE" airspy_source) 156 (lib.cmakeBool "OPT_BUILD_AUDIO_SOURCE" audio_source) 157 (lib.cmakeBool "OPT_BUILD_BLADERF_SOURCE" bladerf_source) 158 (lib.cmakeBool "OPT_BUILD_FILE_SOURCE" file_source) 159 (lib.cmakeBool "OPT_BUILD_HACKRF_SOURCE" hackrf_source) 160 (lib.cmakeBool "OPT_BUILD_HERMES_SOURCE" hermes_source) 161 (lib.cmakeBool "OPT_BUILD_HL2_SOURCE" hl2_source) 162 (lib.cmakeBool "OPT_BUILD_KIWISDR_SOURCE" kiwisdr_source) 163 (lib.cmakeBool "OPT_BUILD_LIMESDR_SOURCE" limesdr_source) 164 (lib.cmakeBool "OPT_BUILD_NETWORK_SOURCE" network_source) 165 (lib.cmakeBool "OPT_BUILD_PLUTOSDR_SOURCE" plutosdr_source) 166 (lib.cmakeBool "OPT_BUILD_RFSPACE_SOURCE" rfspace_source) 167 (lib.cmakeBool "OPT_BUILD_RTL_SDR_SOURCE" rtl_sdr_source) 168 (lib.cmakeBool "OPT_BUILD_RTL_TCP_SOURCE" rtl_tcp_source) 169 (lib.cmakeBool "OPT_BUILD_SDRPLAY_SOURCE" sdrplay_source) 170 (lib.cmakeBool "OPT_BUILD_SDRPP_SERVER_SOURCE" sdrpp_server_source) 171 (lib.cmakeBool "OPT_BUILD_SOAPY_SOURCE" soapy_source) 172 (lib.cmakeBool "OPT_BUILD_SPECTRAN_HTTP_SOURCE" spectran_http_source) 173 (lib.cmakeBool "OPT_BUILD_SPYSERVER_SOURCE" spyserver_source) 174 (lib.cmakeBool "OPT_BUILD_USRP_SOURCE" usrp_source) 175 176 # Sinks 177 (lib.cmakeBool "OPT_BUILD_AUDIO_SINK" audio_sink) 178 (lib.cmakeBool "OPT_BUILD_MPEG_ADTS_SINK" mpeg_adts_sink) 179 (lib.cmakeBool "OPT_BUILD_NETWORK_SINK" network_sink) 180 (lib.cmakeBool "OPT_BUILD_NEW_PORTAUDIO_SINK" portaudio_sink) 181 182 # Decoders 183 (lib.cmakeBool "OPT_BUILD_ATV_DECODER" atv_decoder) 184 (lib.cmakeBool "OPT_BUILD_CH_EXTRAVHF_DECODER" ch_extravhf_decoder) 185 (lib.cmakeBool "OPT_BUILD_CH_TETRA_DEMODULATOR" ch_tetra_demodulator) 186 (lib.cmakeBool "OPT_BUILD_DAB_DECODER" dab_decoder) 187 (lib.cmakeBool "OPT_BUILD_FALCON9_DECODER" falcon9_decoder) 188 (lib.cmakeBool "OPT_BUILD_FT8_DECODER" ft8_decoder) 189 (lib.cmakeBool "OPT_BUILD_KG_SSTV_DECODER" kg_sstv_decoder) 190 (lib.cmakeBool "OPT_BUILD_M17_DECODER" m17_decoder) 191 (lib.cmakeBool "OPT_BUILD_METEOR_DEMODULATOR" meteor_demodulator) 192 (lib.cmakeBool "OPT_BUILD_PAGER_DECODER" pager_decoder) 193 (lib.cmakeBool "OPT_BUILD_RADIO" radio) 194 (lib.cmakeBool "OPT_BUILD_WEATHER_SAT_DECODER" weather_sat_decoder) 195 196 # Misc 197 (lib.cmakeBool "OPT_BUILD_DISCORD_PRESENCE" discord_presence) 198 (lib.cmakeBool "OPT_BUILD_FREQUENCY_MANAGER" frequency_manager) 199 (lib.cmakeBool "OPT_BUILD_IQ_EXPORTER" iq_exporter) 200 (lib.cmakeBool "OPT_BUILD_RECORDER" recorder) 201 (lib.cmakeBool "OPT_BUILD_RIGCTL_CLIENT" rigctl_client) 202 (lib.cmakeBool "OPT_BUILD_RIGCTL_SERVER" rigctl_server) 203 (lib.cmakeBool "OPT_BUILD_SCANNER" scanner) 204 (lib.cmakeBool "OPT_BUILD_NOISE_REDUCTION_LOGMMSE" noise_reduction) 205 ]; 206 207 env.NIX_CFLAGS_COMPILE = "-fpermissive"; 208 209 hardeningDisable = lib.optional stdenv.cc.isClang "format"; 210 211 meta = { 212 description = "SDR++ Brown Edition - Cross-Platform SDR Software with KiwiSDR support"; 213 homepage = "https://github.com/sannysanoff/SDRPlusPlusBrown"; 214 license = lib.licenses.gpl3Only; 215 platforms = lib.platforms.linux; 216 mainProgram = "sdrpp"; 217 }; 218})