This repository has no description
0

Configure Feed

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

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