Merge pull request #106599 from doronbehar/pkg/gnuradio/pkgs

authored by

Doron Behar and committed by
GitHub
5e367ece 4f6919dc

+1309 -560
+11 -1
nixos/doc/manual/release-notes/rl-2105.xml
··· 36 36 now point to an externally wrapped by default derivations, that allow you to 37 37 also add `extraPythonPackages` to the Python interpreter used by GNURadio. 38 38 Missing environmental variables needed for operational GUI were also added 39 - (<link xlink:href="https://github.com/NixOS/nixpkgs/issues/75478">#7547</link>). 39 + (<link xlink:href="https://github.com/NixOS/nixpkgs/issues/75478">#75478</link>). 40 + </para> 41 + </listitem> 42 + <listitem> 43 + <para> 44 + <link xlink:href="https://www.gnuradio.org/">GNURadio</link> has a 45 + <code>pkgs</code> attribute set, and there's a <code>gnuradio.callPackage</code> 46 + function that extends <code>pkgs</code> with a <code>mkDerivation</code>, and a 47 + <code>mkDerivationWith</code>, like Qt5. Now all <code>gnuradio.pkgs</code> are 48 + defined with <code>gnuradio.callPackage</code> and some packages that depend 49 + on gnuradio are defined with this as well. 40 50 </para> 41 51 </listitem> 42 52 <listitem>
+19 -13
pkgs/applications/radio/gnss-sdr/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub 1 + { lib 2 + , fetchFromGitHub 2 3 , armadillo 3 - , boost 4 4 , cmake 5 + , gmp 5 6 , glog 6 7 , gmock 7 8 , openssl 8 9 , gflags 9 - , gnuradio 10 + , gnuradio3_8 11 + , libpcap 10 12 , orc 11 13 , pkg-config 12 - , pythonPackages 13 14 , uhd 14 15 , log4cpp 15 16 , blas, lapack ··· 18 19 , protobuf 19 20 }: 20 21 21 - stdenv.mkDerivation rec { 22 + gnuradio3_8.pkgs.mkDerivation rec { 22 23 pname = "gnss-sdr"; 23 24 version = "0.0.13"; 24 25 ··· 29 30 sha256 = "0a3k47fl5dizzhbqbrbmckl636lznyjby2d2nz6fz21637hvrnby"; 30 31 }; 31 32 32 - nativeBuildInputs = [ cmake pkg-config ]; 33 + nativeBuildInputs = [ 34 + cmake 35 + gnuradio3_8.unwrapped.python 36 + gnuradio3_8.unwrapped.python.pkgs.Mako 37 + gnuradio3_8.unwrapped.python.pkgs.six 38 + ]; 39 + 33 40 buildInputs = [ 41 + gmp 34 42 armadillo 35 - boost.dev 43 + gnuradio3_8.unwrapped.boost 36 44 glog 37 45 gmock 38 - openssl.dev 46 + openssl 39 47 gflags 40 - gnuradio 41 48 orc 42 - pythonPackages.Mako 43 - pythonPackages.six 44 - 45 49 # UHD support is optional, but gnuradio is built with it, so there's 46 50 # nothing to be gained by leaving it out. 47 - uhd 51 + gnuradio3_8.unwrapped.uhd 48 52 log4cpp 49 53 blas lapack 50 54 matio 51 55 pugixml 52 56 protobuf 57 + gnuradio3_8.pkgs.osmosdr 58 + libpcap 53 59 ]; 54 60 55 61 cmakeFlags = [
+22 -33
pkgs/applications/radio/gnuradio/3.7.nix
··· 5 5 # Remove gcc and python references 6 6 , removeReferencesTo 7 7 , pkg-config 8 + , volk 8 9 , cppunit 9 10 , swig 10 11 , orc ··· 43 44 minor = "14"; 44 45 patch = "0"; 45 46 } 46 - , fetchSubmodules ? true 47 + # We use our build of volk and not the one bundled with the release 48 + , fetchSubmodules ? false 47 49 }: 48 50 49 51 let 50 - sourceSha256 = "1nh4f9dmygprlbqybd3j1byg9fsr6065n140mvc4b0v8qqygmhrc"; 52 + sourceSha256 = "BiUDibXV/5cEYmAAaIxT4WTxF/ni4MJumF5oJ/vuOyc="; 51 53 featuresInfo = { 52 54 # Needed always 53 55 basic = { ··· 61 63 }; 62 64 volk = { 63 65 cmakeEnableFlag = "VOLK"; 66 + runtime = [ 67 + volk 68 + ]; 64 69 }; 65 70 doxygen = { 66 71 native = [ doxygen ]; ··· 213 218 qt = qt4; 214 219 gtk = gtk2; 215 220 }); 221 + inherit (shared) hasFeature; # function 222 + in 223 + 224 + stdenv.mkDerivation rec { 225 + inherit pname; 216 226 inherit (shared) 217 227 version 218 228 src 219 - hasFeature # function 220 229 nativeBuildInputs 221 230 buildInputs 222 231 disallowedReferences 223 232 postInstall 224 - passthru 225 233 doCheck 226 234 dontWrapPythonPrograms 227 235 meta 228 236 ; 237 + 238 + passthru = shared.passthru // { 239 + # Deps that are potentially overriden and are used inside GR plugins - the same version must 240 + inherit boost volk; 241 + } // lib.optionalAttrs (hasFeature "gr-uhd" features) { 242 + inherit uhd; 243 + }; 229 244 cmakeFlags = shared.cmakeFlags 230 245 # From some reason, if these are not set, libcodec2 and gsm are 231 246 # not detected properly (slightly different then what's in ··· 235 250 "-DLIBCODEC2_INCLUDE_DIR=${codec2}/include" 236 251 "-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so" 237 252 "-DLIBGSM_INCLUDE_DIR=${gsm}/include/gsm" 253 + ] 254 + ++ lib.optionals (hasFeature "volk" features && volk != null) [ 255 + "-DENABLE_INTERNAL_VOLK=OFF" 238 256 ] 239 257 ; 240 258 stripDebugList = shared.stripDebugList ··· 250 268 + lib.optionalString (hasFeature "gnuradio-companion" features) '' 251 269 sed -i 's/.*pygtk_version.*/set(PYGTK_FOUND TRUE)/g' grc/CMakeLists.txt 252 270 '' 253 - # If python-support is disabled, don't install volk's (git submodule) 254 - # volk_modtool - it references python. 255 - # 256 - # NOTE: The same is done for 3.8, but we don't put this string in 257 - # ./shared.nix since on the next release of 3.8 it won't be needed there, 258 - # but it will be needed for 3.7, probably for ever. 259 - + lib.optionalString (!hasFeature "python-support" features) '' 260 - sed -i -e "/python\/volk_modtool/d" volk/CMakeLists.txt 261 - '' 262 271 ; 263 272 patches = [ 264 273 # Don't install python referencing files if python support is disabled. ··· 272 281 sha256 = "2Pitgu8accs16B5X5+/q51hr+IY9DMsA15f56gAtBs8="; 273 282 }) 274 283 ]; 275 - in 276 - 277 - stdenv.mkDerivation rec { 278 - inherit 279 - pname 280 - version 281 - src 282 - nativeBuildInputs 283 - buildInputs 284 - cmakeFlags 285 - preConfigure 286 - # disallowedReferences 287 - stripDebugList 288 - patches 289 - postInstall 290 - passthru 291 - doCheck 292 - dontWrapPythonPrograms 293 - meta 294 - ; 295 284 }
+284
pkgs/applications/radio/gnuradio/3.8.nix
··· 1 + { lib, stdenv 2 + , fetchFromGitHub 3 + , fetchpatch 4 + , cmake 5 + # Remove gcc and python references 6 + , removeReferencesTo 7 + , pkg-config 8 + , volk 9 + , cppunit 10 + , swig 11 + , orc 12 + , boost 13 + , log4cpp 14 + , mpir 15 + , doxygen 16 + , python 17 + , codec2 18 + , gsm 19 + , fftwFloat 20 + , alsaLib 21 + , libjack2 22 + , CoreAudio 23 + , uhd 24 + , SDL 25 + , gsl 26 + , cppzmq 27 + , zeromq 28 + # Needed only if qt-gui is disabled, from some reason 29 + , icu 30 + # GUI related 31 + , gtk3 32 + , pango 33 + , gobject-introspection 34 + , cairo 35 + , qt5 36 + , libsForQt5 37 + # Features available to override, the list of them is in featuresInfo. They 38 + # are all turned on by default. 39 + , features ? {} 40 + # If one wishes to use a different src or name for a very custom build 41 + , overrideSrc ? {} 42 + , pname ? "gnuradio" 43 + , versionAttr ? { 44 + major = "3.8"; 45 + minor = "2"; 46 + patch = "0"; 47 + } 48 + # We use our build of volk and not the one bundled with the release 49 + , fetchSubmodules ? false 50 + }: 51 + 52 + let 53 + sourceSha256 = "SFDjtyQRp0fXijZukpLYtISpx8imxedlYN9mRibv1eA="; 54 + featuresInfo = { 55 + # Needed always 56 + basic = { 57 + native = [ 58 + cmake 59 + pkg-config 60 + orc 61 + ]; 62 + runtime = [ 63 + boost 64 + log4cpp 65 + mpir 66 + ] 67 + # when gr-qtgui is disabled, icu needs to be included, otherwise 68 + # building with boost 1.7x fails 69 + ++ lib.optionals (!(hasFeature "gr-qtgui" features)) [ icu ]; 70 + pythonNative = with python.pkgs; [ 71 + Mako 72 + six 73 + ]; 74 + }; 75 + volk = { 76 + cmakeEnableFlag = "VOLK"; 77 + runtime = [ 78 + volk 79 + ]; 80 + }; 81 + doxygen = { 82 + native = [ doxygen ]; 83 + cmakeEnableFlag = "DOXYGEN"; 84 + }; 85 + sphinx = { 86 + pythonNative = with python.pkgs; [ sphinx ]; 87 + cmakeEnableFlag = "SPHINX"; 88 + }; 89 + python-support = { 90 + pythonRuntime = [ python.pkgs.six ]; 91 + native = [ 92 + swig 93 + python 94 + ]; 95 + cmakeEnableFlag = "PYTHON"; 96 + }; 97 + testing-support = { 98 + native = [ cppunit ]; 99 + cmakeEnableFlag = "TESTING"; 100 + }; 101 + gnuradio-runtime = { 102 + cmakeEnableFlag = "GNURADIO_RUNTIME"; 103 + }; 104 + gr-ctrlport = { 105 + # Thrift support is not really working well, and even the patch they 106 + # recommend applying on 0.9.2 won't apply. See: 107 + # https://github.com/gnuradio/gnuradio/blob/v3.8.2.0/gnuradio-runtime/lib/controlport/thrift/README 108 + cmakeEnableFlag = "GR_CTRLPORT"; 109 + native = [ 110 + swig 111 + ]; 112 + }; 113 + gnuradio-companion = { 114 + pythonRuntime = with python.pkgs; [ 115 + pyyaml 116 + Mako 117 + numpy 118 + pygobject3 119 + ]; 120 + runtime = [ 121 + gtk3 122 + pango 123 + gobject-introspection 124 + cairo 125 + ]; 126 + cmakeEnableFlag = "GRC"; 127 + }; 128 + gr-blocks = { 129 + cmakeEnableFlag = "GR_BLOCKS"; 130 + }; 131 + gr-fec = { 132 + cmakeEnableFlag = "GR_FEC"; 133 + }; 134 + gr-fft = { 135 + runtime = [ fftwFloat ]; 136 + cmakeEnableFlag = "GR_FFT"; 137 + }; 138 + gr-filter = { 139 + runtime = [ fftwFloat ]; 140 + cmakeEnableFlag = "GR_FILTER"; 141 + }; 142 + gr-analog = { 143 + cmakeEnableFlag = "GR_ANALOG"; 144 + }; 145 + gr-digital = { 146 + cmakeEnableFlag = "GR_DIGITAL"; 147 + }; 148 + gr-dtv = { 149 + cmakeEnableFlag = "GR_DTV"; 150 + }; 151 + gr-audio = { 152 + runtime = [] 153 + ++ lib.optionals stdenv.isLinux [ alsaLib libjack2 ] 154 + ++ lib.optionals stdenv.isDarwin [ CoreAudio ] 155 + ; 156 + cmakeEnableFlag = "GR_AUDIO"; 157 + }; 158 + gr-channels = { 159 + cmakeEnableFlag = "GR_CHANNELS"; 160 + }; 161 + gr-qtgui = { 162 + runtime = [ qt5.qtbase libsForQt5.qwt ]; 163 + pythonRuntime = [ python.pkgs.pyqt5 ]; 164 + cmakeEnableFlag = "GR_QTGUI"; 165 + }; 166 + gr-trellis = { 167 + cmakeEnableFlag = "GR_TRELLIS"; 168 + }; 169 + gr-uhd = { 170 + runtime = [ uhd ]; 171 + cmakeEnableFlag = "GR_UHD"; 172 + }; 173 + gr-utils = { 174 + cmakeEnableFlag = "GR_UTILS"; 175 + }; 176 + gr-modtool = { 177 + pythonRuntime = with python.pkgs; [ 178 + click 179 + click-plugins 180 + ]; 181 + cmakeEnableFlag = "GR_MODTOOL"; 182 + }; 183 + gr-video-sdl = { 184 + runtime = [ SDL ]; 185 + cmakeEnableFlag = "GR_VIDEO_SDL"; 186 + }; 187 + gr-vocoder = { 188 + runtime = [ codec2 gsm ]; 189 + cmakeEnableFlag = "GR_VOCODER"; 190 + }; 191 + gr-wavelet = { 192 + cmakeEnableFlag = "GR_WAVELET"; 193 + runtime = [ gsl ]; 194 + }; 195 + gr-zeromq = { 196 + runtime = [ cppzmq zeromq ]; 197 + cmakeEnableFlag = "GR_ZEROMQ"; 198 + }; 199 + }; 200 + shared = (import ./shared.nix { 201 + inherit 202 + stdenv 203 + lib 204 + python 205 + removeReferencesTo 206 + featuresInfo 207 + features 208 + versionAttr 209 + sourceSha256 210 + overrideSrc 211 + fetchFromGitHub 212 + fetchSubmodules 213 + ; 214 + qt = qt5; 215 + gtk = gtk3; 216 + }); 217 + inherit (shared) hasFeature; # function 218 + in 219 + 220 + stdenv.mkDerivation rec { 221 + inherit pname; 222 + inherit (shared) 223 + version 224 + src 225 + nativeBuildInputs 226 + buildInputs 227 + disallowedReferences 228 + stripDebugList 229 + doCheck 230 + dontWrapPythonPrograms 231 + dontWrapQtApps 232 + meta 233 + ; 234 + passthru = shared.passthru // { 235 + # Deps that are potentially overriden and are used inside GR plugins - the same version must 236 + inherit boost volk; 237 + } // lib.optionalAttrs (hasFeature "gr-uhd" features) { 238 + inherit uhd; 239 + } // lib.optionalAttrs (hasFeature "gr-qtgui" features) { 240 + inherit (libsForQt5) qwt; 241 + }; 242 + cmakeFlags = shared.cmakeFlags 243 + # From some reason, if these are not set, libcodec2 and gsm are not 244 + # detected properly. NOTE: qradiolink needs libcodec2 to be detected in 245 + # order to build, see https://github.com/qradiolink/qradiolink/issues/67 246 + ++ lib.optionals (hasFeature "gr-vocoder" features) [ 247 + "-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so" 248 + "-DLIBCODEC2_INCLUDE_DIRS=${codec2}/include" 249 + "-DLIBCODEC2_HAS_FREEDV_API=ON" 250 + "-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so" 251 + "-DLIBGSM_INCLUDE_DIRS=${gsm}/include/gsm" 252 + ] 253 + ++ lib.optionals (hasFeature "volk" features && volk != null) [ 254 + "-DENABLE_INTERNAL_VOLK=OFF" 255 + ] 256 + ; 257 + 258 + postInstall = shared.postInstall 259 + # This is the only python reference worth removing, if needed (3.7 doesn't 260 + # set that reference). 261 + + lib.optionalString (!hasFeature "python-support" features) '' 262 + ${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake 263 + '' 264 + ; 265 + patches = [ 266 + # Don't install python referencing files if python support is disabled. 267 + # See: https://github.com/gnuradio/gnuradio/pull/3839 268 + (fetchpatch { 269 + url = "https://github.com/gnuradio/gnuradio/commit/4a4fd570b398b0b50fe875fcf0eb9c9db2ea5c6e.diff"; 270 + sha256 = "xz2E0ji6zfdOAhjfPecAcaVOIls1XP8JngLkBbBBW5Q="; 271 + }) 272 + (fetchpatch { 273 + url = "https://github.com/gnuradio/gnuradio/commit/dbc8ad7e7361fddc7b1dbc267c07a776a3f9664b.diff"; 274 + sha256 = "tQcCpcUbJv3yqAX8rSHN/pAuBq4ueEvoVo7sNzZGvf4="; 275 + }) 276 + # Needed to use boost 1.7x, see: 277 + # https://github.com/gnuradio/gnuradio/issues/3720 278 + # https://github.com/gnuradio/gnuradio/pull/3967 279 + (fetchpatch { 280 + url = "https://github.com/gnuradio/gnuradio/commit/cbcb968358fad56f3646619b258f18b0e6693a07.diff"; 281 + sha256 = "1ajf4797f869lqv436xw61s29qdbn7f01i0970kfxv3yahd34p9v"; 282 + }) 283 + ]; 284 + }
-53
pkgs/applications/radio/gnuradio/ais.nix
··· 1 - { lib 2 - , stdenv 3 - , fetchFromGitHub 4 - , cmake 5 - , pkg-config 6 - , boost 7 - , gnuradio 8 - , makeWrapper 9 - , cppunit 10 - , gr-osmosdr 11 - , log4cpp 12 - , pythonSupport ? true 13 - , python 14 - , swig 15 - , fetchpatch 16 - }: 17 - 18 - stdenv.mkDerivation { 19 - pname = "gr-ais"; 20 - version = "2015-12-20"; 21 - 22 - src = fetchFromGitHub { 23 - owner = "bistromath"; 24 - repo = "gr-ais"; 25 - rev = "cdc1f52745853f9c739c718251830eb69704b26e"; 26 - sha256 = "1vl3kk8xr2mh5lf31zdld7yzmwywqffffah8iblxdzblgsdwxfl6"; 27 - }; 28 - 29 - patches = [ 30 - (fetchpatch { 31 - url = "https://github.com/bistromath/gr-ais/commit/8502d0252a2a1a9b8d1a71795eaeb5d820684054.patch"; 32 - sha256 = "1cwalphldvf6dbhzwz1gi53z0cb4921qsvlz4138q7m6dxccvssg"; 33 - }) 34 - ]; 35 - 36 - nativeBuildInputs = [ cmake makeWrapper pkg-config ]; 37 - buildInputs = [ boost gnuradio cppunit gr-osmosdr log4cpp ] 38 - ++ lib.optionals pythonSupport [ python swig ]; 39 - 40 - postInstall = '' 41 - for prog in "$out"/bin/*; do 42 - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") 43 - done 44 - ''; 45 - 46 - meta = with lib; { 47 - description = "Gnuradio block for ais"; 48 - homepage = "https://github.com/bistromath/gr-ais"; 49 - license = licenses.gpl3Plus; 50 - platforms = platforms.linux ++ platforms.darwin; 51 - maintainers = with maintainers; [ mog ]; 52 - }; 53 - }
+64 -89
pkgs/applications/radio/gnuradio/default.nix
··· 5 5 # Remove gcc and python references 6 6 , removeReferencesTo 7 7 , pkg-config 8 + , volk 8 9 , cppunit 9 - , swig 10 10 , orc 11 11 , boost 12 12 , log4cpp ··· 22 22 , uhd 23 23 , SDL 24 24 , gsl 25 + , libsodium 26 + , libsndfile 27 + , libunwind 25 28 , cppzmq 26 29 , zeromq 30 + # Needed only if qt-gui is disabled, from some reason 31 + , icu 27 32 # GUI related 28 33 , gtk3 29 34 , pango ··· 38 43 , overrideSrc ? {} 39 44 , pname ? "gnuradio" 40 45 , versionAttr ? { 41 - major = "3.8"; 42 - minor = "2"; 46 + major = "3.9"; 47 + minor = "0"; 43 48 patch = "0"; 44 49 } 45 - # Should be false on the release after 3.8.2.0 46 - , fetchSubmodules ? true 50 + , fetchSubmodules ? false 47 51 }: 48 52 49 53 let 50 - sourceSha256 = "1mnfwdy7w3160vi6110x2qkyq8l78qi8771zwak9n72bl7lhhpnf"; 54 + sourceSha256 = "ZjQzioAuWrd8jsYOnLNH1mK4n9EbrjgvPX3mTzVFdLk="; 51 55 featuresInfo = { 52 56 # Needed always 53 57 basic = { ··· 57 61 orc 58 62 ]; 59 63 runtime = [ 64 + volk 60 65 boost 61 66 log4cpp 62 67 mpir 63 - ]; 68 + ] 69 + # when gr-qtgui is disabled, icu needs to be included, otherwise 70 + # building with boost 1.7x fails 71 + ++ lib.optionals (!(hasFeature "gr-qtgui" features)) [ icu ]; 64 72 pythonNative = with python.pkgs; [ 65 73 Mako 66 74 six 67 75 ]; 68 76 }; 69 - # NOTE: Should be removed on the release after 3.8.2.0, see: 70 - # https://github.com/gnuradio/gnuradio/commit/80c04479d 71 - volk = { 72 - cmakeEnableFlag = "VOLK"; 73 - }; 74 77 doxygen = { 75 78 native = [ doxygen ]; 76 79 cmakeEnableFlag = "DOXYGEN"; 77 80 }; 78 - sphinx = { 79 - pythonNative = with python.pkgs; [ sphinx ]; 80 - cmakeEnableFlag = "SPHINX"; 81 - }; 82 81 python-support = { 83 82 pythonRuntime = [ python.pkgs.six ]; 84 83 native = [ 85 - swig 86 84 python 87 85 ]; 88 86 cmakeEnableFlag = "PYTHON"; ··· 90 88 testing-support = { 91 89 native = [ cppunit ]; 92 90 cmakeEnableFlag = "TESTING"; 91 + }; 92 + post-install = { 93 + cmakeEnableFlag = "POSTINSTALL"; 93 94 }; 94 95 gnuradio-runtime = { 95 96 cmakeEnableFlag = "GNURADIO_RUNTIME"; 97 + pythonRuntime = [ 98 + python.pkgs.pybind11 99 + ]; 96 100 }; 97 101 gr-ctrlport = { 98 102 # Thrift support is not really working well, and even the patch they 99 103 # recommend applying on 0.9.2 won't apply. See: 100 - # https://github.com/gnuradio/gnuradio/blob/v3.8.2.0/gnuradio-runtime/lib/controlport/thrift/README 104 + # https://github.com/gnuradio/gnuradio/blob/v3.9.0.0/gnuradio-runtime/lib/controlport/thrift/README 105 + runtime = [ 106 + libunwind 107 + ]; 101 108 cmakeEnableFlag = "GR_CTRLPORT"; 102 - native = [ 103 - swig 104 - ]; 105 109 }; 106 110 gnuradio-companion = { 107 111 pythonRuntime = with python.pkgs; [ ··· 110 114 numpy 111 115 pygobject3 112 116 ]; 117 + native = [ 118 + python.pkgs.pytest 119 + ]; 113 120 runtime = [ 114 121 gtk3 115 122 pango 116 123 gobject-introspection 117 124 cairo 125 + libsndfile 118 126 ]; 119 127 cmakeEnableFlag = "GRC"; 120 128 }; ··· 160 168 cmakeEnableFlag = "GR_TRELLIS"; 161 169 }; 162 170 gr-uhd = { 163 - runtime = [ uhd ]; 171 + runtime = [ 172 + uhd 173 + ]; 164 174 cmakeEnableFlag = "GR_UHD"; 165 175 }; 166 176 gr-utils = { ··· 173 183 ]; 174 184 cmakeEnableFlag = "GR_MODTOOL"; 175 185 }; 186 + gr-blocktool = { 187 + cmakeEnableFlag = "GR_BLOCKTOOL"; 188 + }; 176 189 gr-video-sdl = { 177 190 runtime = [ SDL ]; 178 191 cmakeEnableFlag = "GR_VIDEO_SDL"; 179 192 }; 180 - gr-vocoder = { 181 - runtime = [ codec2 gsm ]; 182 - cmakeEnableFlag = "GR_VOCODER"; 183 - }; 193 + # codec2 and gsm support is broken with gr3.9: https://github.com/gnuradio/gnuradio/issues/4278 194 + # gr-vocoder = { 195 + # runtime = [ codec2 gsm ]; 196 + # cmakeEnableFlag = "GR_VOCODER"; 197 + # }; 184 198 gr-wavelet = { 185 199 cmakeEnableFlag = "GR_WAVELET"; 186 - runtime = [ gsl ]; 200 + runtime = [ gsl libsodium ]; 187 201 }; 188 202 gr-zeromq = { 189 203 runtime = [ cppzmq zeromq ]; 190 204 cmakeEnableFlag = "GR_ZEROMQ"; 191 205 }; 206 + gr-network = { 207 + cmakeEnableFlag = "GR_NETWORK"; 208 + }; 192 209 }; 193 210 shared = (import ./shared.nix { 194 211 inherit ··· 207 224 qt = qt5; 208 225 gtk = gtk3; 209 226 }); 227 + inherit (shared) hasFeature; # function 228 + in 229 + 230 + stdenv.mkDerivation rec { 231 + inherit pname; 210 232 inherit (shared) 211 233 version 212 234 src 213 - hasFeature # function 214 235 nativeBuildInputs 215 236 buildInputs 237 + cmakeFlags 216 238 disallowedReferences 217 239 stripDebugList 218 - passthru 219 240 doCheck 220 241 dontWrapPythonPrograms 221 242 dontWrapQtApps 222 243 meta 223 244 ; 224 - cmakeFlags = shared.cmakeFlags 225 - # From some reason, if these are not set, libcodec2 and gsm are not 226 - # detected properly. NOTE: qradiolink needs libcodec2 to be detected in 227 - # order to build, see https://github.com/qradiolink/qradiolink/issues/67 228 - ++ lib.optionals (hasFeature "gr-vocoder" features) [ 229 - "-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so" 230 - "-DLIBCODEC2_INCLUDE_DIRS=${codec2}/include" 231 - "-DLIBCODEC2_HAS_FREEDV_API=ON" 232 - "-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so" 233 - "-DLIBGSM_INCLUDE_DIRS=${gsm}/include/gsm" 234 - ] 235 - ; 245 + passthru = shared.passthru // { 246 + # Deps that are potentially overriden and are used inside GR plugins - the same version must 247 + inherit boost volk; 248 + } // lib.optionalAttrs (hasFeature "gr-uhd" features) { 249 + inherit uhd; 250 + } // lib.optionalAttrs (hasFeature "gr-qtgui" features) { 251 + inherit (libsForQt5) qwt; 252 + }; 236 253 237 254 postInstall = shared.postInstall 238 - # This is the only python reference worth removing, if needed (3.7 doesn't 239 - # set that reference). 255 + # This is the only python reference worth removing, if needed. 256 + # Even if python support is enabled, and we don't care about this 257 + # reference, pybind's path is not properly set. See: 258 + # https://github.com/gnuradio/gnuradio/issues/4380 240 259 + lib.optionalString (!hasFeature "python-support" features) '' 241 260 ${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake 242 - '' 243 - ; 244 - preConfigure = "" 245 - # If python-support is disabled, don't install volk's (git submodule) 246 - # volk_modtool - it references python. 247 - # 248 - # NOTE: on the next release, volk will always be required to be installed 249 - # externally (submodule removed upstream). Hence this hook will fail and 250 - # we'll need to package volk while able to tell it to install or not 251 - # install python referencing files. When we'll be there, this will help: 252 - # https://github.com/gnuradio/volk/pull/404 253 - + lib.optionalString (!hasFeature "python-support" features) '' 254 - sed -i -e "/python\/volk_modtool/d" volk/CMakeLists.txt 261 + ${removeReferencesTo}/bin/remove-references-to -t ${python} $(readlink -f $out/lib/libgnuradio-runtime.so) 262 + ${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake 255 263 '' 256 - ; 257 - patches = [ 258 - # Don't install python referencing files if python support is disabled. 259 - # See: https://github.com/gnuradio/gnuradio/pull/3839 260 - (fetchpatch { 261 - url = "https://github.com/gnuradio/gnuradio/commit/4a4fd570b398b0b50fe875fcf0eb9c9db2ea5c6e.diff"; 262 - sha256 = "xz2E0ji6zfdOAhjfPecAcaVOIls1XP8JngLkBbBBW5Q="; 263 - }) 264 - (fetchpatch { 265 - url = "https://github.com/gnuradio/gnuradio/commit/dbc8ad7e7361fddc7b1dbc267c07a776a3f9664b.diff"; 266 - sha256 = "tQcCpcUbJv3yqAX8rSHN/pAuBq4ueEvoVo7sNzZGvf4="; 267 - }) 268 - ]; 269 - in 270 - 271 - stdenv.mkDerivation rec { 272 - inherit 273 - pname 274 - version 275 - src 276 - nativeBuildInputs 277 - buildInputs 278 - cmakeFlags 279 - preConfigure 280 - # disallowedReferences 281 - stripDebugList 282 - patches 283 - postInstall 284 - passthru 285 - doCheck 286 - dontWrapPythonPrograms 287 - dontWrapQtApps 288 - meta 289 264 ; 290 265 }
-37
pkgs/applications/radio/gnuradio/gsm.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, log4cpp 2 - , makeWrapper, cppunit, libosmocore, gr-osmosdr 3 - , pythonSupport ? true, python, swig 4 - }: 5 - 6 - assert pythonSupport -> python != null && swig != null; 7 - 8 - stdenv.mkDerivation { 9 - pname = "gr-gsm"; 10 - version = "2016-08-25"; 11 - 12 - src = fetchFromGitHub { 13 - owner = "ptrkrysik"; 14 - repo = "gr-gsm"; 15 - rev = "3ca05e6914ef29eb536da5dbec323701fbc2050d"; 16 - sha256 = "13nnq927kpf91iqccr8db9ripy5czjl5jiyivizn6bia0bam2pvx"; 17 - }; 18 - 19 - nativeBuildInputs = [ cmake pkg-config ]; 20 - buildInputs = [ 21 - boost gnuradio makeWrapper cppunit libosmocore gr-osmosdr log4cpp 22 - ] ++ lib.optionals pythonSupport [ python swig ]; 23 - 24 - postInstall = '' 25 - for prog in "$out"/bin/*; do 26 - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:${gr-osmosdr}/lib/${python.libPrefix}/site-packages:$(toPythonPath "$out") 27 - done 28 - ''; 29 - 30 - meta = with lib; { 31 - description = "Gnuradio block for gsm"; 32 - homepage = "https://github.com/ptrkrysik/gr-gsm"; 33 - license = licenses.gpl3Plus; 34 - platforms = platforms.linux; 35 - maintainers = with maintainers; [ mog ]; 36 - }; 37 - }
-38
pkgs/applications/radio/gnuradio/limesdr.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio 2 - , pythonSupport ? true, python, swig, limesuite, log4cpp 3 - } : 4 - 5 - assert pythonSupport -> python != null && swig != null; 6 - 7 - let 8 - version = "2.0.0"; 9 - 10 - in stdenv.mkDerivation { 11 - pname = "gr-limesdr"; 12 - inherit version; 13 - 14 - src = fetchFromGitHub { 15 - owner = "myriadrf"; 16 - repo = "gr-limesdr"; 17 - rev = "v${version}"; 18 - sha256 = "0ldqvfwl0gil89l9s31fjf9d7ki0dk572i8vna336igfaz348ypq"; 19 - }; 20 - 21 - nativeBuildInputs = [ 22 - cmake 23 - pkg-config 24 - ] ++ lib.optionals pythonSupport [ swig ]; 25 - 26 - buildInputs = [ 27 - boost gnuradio limesuite log4cpp 28 - ] ++ lib.optionals pythonSupport [ python ]; 29 - 30 - 31 - meta = with lib; { 32 - description = "Gnuradio source and sink blocks for LimeSDR"; 33 - homepage = "https://wiki.myriadrf.org/Gr-limesdr_Plugin_for_GNURadio"; 34 - license = licenses.mit; 35 - platforms = platforms.linux; 36 - maintainers = [ maintainers.markuskowa ]; 37 - }; 38 - }
-37
pkgs/applications/radio/gnuradio/nacl.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, uhd 2 - , makeWrapper, libsodium, cppunit, log4cpp 3 - , pythonSupport ? true, python, swig 4 - }: 5 - 6 - assert pythonSupport -> python != null && swig != null; 7 - 8 - stdenv.mkDerivation { 9 - pname = "gr-nacl"; 10 - version = "2017-04-10"; 11 - 12 - src = fetchFromGitHub { 13 - owner = "stwunsch"; 14 - repo = "gr-nacl"; 15 - rev = "15276bb0fcabf5fe4de4e58df3d579b5be0e9765"; 16 - sha256 = "018np0qlk61l7mlv3xxx5cj1rax8f1vqrsrch3higsl25yydbv7v"; 17 - }; 18 - 19 - nativeBuildInputs = [ cmake pkg-config ]; 20 - buildInputs = [ 21 - boost gnuradio uhd makeWrapper libsodium cppunit log4cpp 22 - ] ++ lib.optionals pythonSupport [ python swig ]; 23 - 24 - postInstall = '' 25 - for prog in "$out"/bin/*; do 26 - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") 27 - done 28 - ''; 29 - 30 - meta = with lib; { 31 - description = "Gnuradio block for encryption"; 32 - homepage = "https://github.com/stwunsch/gr-nacl"; 33 - license = licenses.gpl3Plus; 34 - platforms = platforms.linux ++ platforms.darwin; 35 - maintainers = with maintainers; [ mog ]; 36 - }; 37 - }
-45
pkgs/applications/radio/gnuradio/osmosdr.nix
··· 1 - { lib, stdenv, fetchgit, cmake, pkg-config, makeWrapper 2 - , boost 3 - , pythonSupport ? true, python, swig 4 - , airspy 5 - , gnuradio 6 - , hackrf 7 - , libbladeRF 8 - , rtl-sdr 9 - , soapysdr-with-plugins 10 - , uhd 11 - , log4cpp 12 - }: 13 - 14 - assert pythonSupport -> python != null && swig != null; 15 - 16 - stdenv.mkDerivation rec { 17 - pname = "gr-osmosdr"; 18 - version = "0.1.5"; 19 - 20 - src = fetchgit { 21 - url = "git://git.osmocom.org/gr-osmosdr"; 22 - rev = "v${version}"; 23 - sha256 = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv"; 24 - }; 25 - 26 - nativeBuildInputs = [ cmake makeWrapper pkg-config ]; 27 - buildInputs = [ 28 - boost log4cpp airspy gnuradio hackrf libbladeRF rtl-sdr uhd 29 - ] ++ lib.optionals stdenv.isLinux [ soapysdr-with-plugins ] 30 - ++ lib.optionals pythonSupport [ python swig python.pkgs.cheetah ]; 31 - 32 - postInstall = '' 33 - for prog in "$out"/bin/*; do 34 - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") 35 - done 36 - ''; 37 - 38 - meta = with lib; { 39 - description = "Gnuradio block for OsmoSDR and rtl-sdr"; 40 - homepage = "https://sdr.osmocom.org/trac/wiki/GrOsmoSDR"; 41 - license = licenses.gpl3Plus; 42 - platforms = platforms.linux ++ platforms.darwin; 43 - maintainers = with maintainers; [ bjornfor ]; 44 - }; 45 - }
-36
pkgs/applications/radio/gnuradio/rds.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, log4cpp 2 - , makeWrapper, pythonSupport ? true, python, swig 3 - }: 4 - 5 - assert pythonSupport -> python != null && swig != null; 6 - 7 - stdenv.mkDerivation rec { 8 - pname = "gr-rds"; 9 - version = "1.1.0"; 10 - 11 - src = fetchFromGitHub { 12 - owner = "bastibl"; 13 - repo = "gr-rds"; 14 - rev = "v${version}"; 15 - sha256 = "0jkzchvw0ivcxsjhi1h0mf7k13araxf5m4wi5v9xdgqxvipjzqfy"; 16 - }; 17 - 18 - nativeBuildInputs = [ cmake pkg-config ]; 19 - buildInputs = [ 20 - boost gnuradio makeWrapper log4cpp 21 - ] ++ lib.optionals pythonSupport [ python swig ]; 22 - 23 - postInstall = '' 24 - for prog in "$out"/bin/*; do 25 - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") 26 - done 27 - ''; 28 - 29 - meta = with lib; { 30 - description = "Gnuradio block for radio data system"; 31 - homepage = "https://github.com/bastibl/gr-rds"; 32 - license = licenses.gpl2Plus; 33 - platforms = platforms.linux ++ platforms.darwin; 34 - maintainers = with maintainers; [ mog ]; 35 - }; 36 - }
+4 -5
pkgs/applications/radio/gnuradio/shared.nix
··· 85 85 ; 86 86 postInstall = "" 87 87 # Gcc references 88 - + lib.optionalString (hasFeature "volk" features) '' 89 - ${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libvolk.so) 90 - '' 91 88 + lib.optionalString (hasFeature "gnuradio-runtime" features) '' 92 89 ${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libgnuradio-runtime.so) 93 90 '' ··· 103 100 features 104 101 featuresInfo 105 102 python 106 - qt 107 - gtk 108 103 ; 104 + } // lib.optionalAttrs (hasFeature "gr-qtgui" features) { 105 + inherit qt; 106 + } // lib.optionalAttrs (hasFeature "gnuradio-companion" features) { 107 + inherit gtk; 109 108 }; 110 109 # Wrapping is done with an external wrapper 111 110 dontWrapPythonPrograms = true;
+86 -39
pkgs/applications/radio/gnuradio/wrapper.nix
··· 1 1 { lib 2 2 , stdenv 3 + # The unwrapped gnuradio derivation 3 4 , unwrapped 5 + # If it's a minimal build, we don't want to wrap it with lndir and 6 + # wrapProgram.. 7 + , wrap ? true 8 + # For the wrapper 4 9 , makeWrapper 5 10 # For lndir 6 11 , xorg 12 + # To define a the gnuradio.pkgs scope 13 + , newScope 7 14 # For Emulating wrapGAppsHook 8 15 , gsettings-desktop-schemas 9 16 , glib ··· 37 44 [] 38 45 ) 39 46 ) unwrapped.featuresInfo) 40 - ++ lib.optionals (unwrapped.hasFeature "python-support" unwrapped.features) [ 41 - # Add unwrapped itself as a python module 42 - (unwrapped.python.pkgs.toPythonModule unwrapped) 43 - ] 47 + ++ lib.optionals 48 + (unwrapped.hasFeature "python-support" unwrapped.features) 49 + ( 50 + # Add unwrapped itself as a python module 51 + [ (unwrapped.python.pkgs.toPythonModule unwrapped) ] 52 + # Add all extraPackages as python modules 53 + ++ (builtins.map unwrapped.python.pkgs.toPythonModule extraPackages) 54 + ) 44 55 ; 45 - python3Env = unwrapped.python.withPackages(ps: pythonPkgs); 56 + pythonEnv = unwrapped.python.withPackages(ps: pythonPkgs); 46 57 47 58 name = (lib.appendToName "wrapped" unwrapped).name; 48 59 makeWrapperArgs = builtins.concatStringsSep " " ([ ··· 88 99 (if unwrapped.versionAttr.major == "3.8" then 89 100 [ 90 101 "--prefix" "QT_PLUGIN_PATH" ":" 91 - "${lib.getBin unwrapped.qt.qtbase}/${unwrapped.qt.qtbase.qtPluginPrefix}" 102 + "${ 103 + lib.makeSearchPath 104 + unwrapped.qt.qtbase.qtPluginPrefix 105 + (builtins.map lib.getBin [ 106 + unwrapped.qt.qtbase 107 + unwrapped.qt.qtwayland 108 + ]) 109 + }" 92 110 "--prefix" "QML2_IMPORT_PATH" ":" 93 - "${lib.getBin unwrapped.qt.qtbase}/${unwrapped.qt.qtbase.qtQmlPrefix}" 111 + "${ 112 + lib.makeSearchPath 113 + unwrapped.qt.qtbase.qtQmlPrefix 114 + (builtins.map lib.getBin [ 115 + unwrapped.qt.qtbase 116 + unwrapped.qt.qtwayland 117 + ]) 118 + }" 94 119 ] 95 120 else 96 - # TODO: Add here qt4 related environment for 3.7? 121 + # Add here qt4 related environment for 3.7? 97 122 [ 98 123 99 124 ] 100 125 ) 101 126 ++ extraMakeWrapperArgs 102 127 ); 103 - in 104 - stdenv.mkDerivation { 105 - inherit name; 106 128 107 - buildInputs = [ 108 - makeWrapper 109 - xorg.lndir 110 - ]; 111 - 112 - passthru = { 113 - inherit python3Env pythonPkgs unwrapped; 129 + packages = import ../../../top-level/gnuradio-packages.nix { 130 + inherit lib stdenv newScope; 131 + gnuradio = unwrapped; 132 + }; 133 + passthru = unwrapped.passthru // { 134 + inherit 135 + pythonEnv 136 + pythonPkgs 137 + unwrapped 138 + ; 139 + pkgs = packages; 114 140 }; 115 - 116 - buildCommand = '' 117 - mkdir $out 118 - cd $out 119 - lndir -silent ${unwrapped} 120 - for i in $out/bin/*; do 121 - if [[ ! -x "$i" ]]; then 122 - continue 123 - fi 124 - cp -L "$i" "$i".tmp 125 - mv -f "$i".tmp "$i" 126 - if head -1 "$i" | grep -q ${unwrapped.python}; then 127 - substituteInPlace "$i" \ 128 - --replace ${unwrapped.python} ${python3Env} 129 - fi 130 - wrapProgram "$i" ${makeWrapperArgs} 131 - done 132 - ''; 133 - 134 - inherit (unwrapped) meta; 135 - } 141 + self = if wrap then 142 + stdenv.mkDerivation { 143 + inherit name passthru; 144 + buildInputs = [ 145 + makeWrapper 146 + xorg.lndir 147 + ]; 148 + buildCommand = '' 149 + mkdir $out 150 + cd $out 151 + lndir -silent ${unwrapped} 152 + ${lib.optionalString 153 + (extraPackages != []) 154 + (builtins.concatStringsSep "\n" 155 + (builtins.map (pkg: '' 156 + if [[ -d ${lib.getBin pkg}/bin/ ]]; then 157 + lndir -silent ${pkg}/bin ./bin 158 + fi 159 + '') extraPackages) 160 + ) 161 + } 162 + for i in $out/bin/*; do 163 + if [[ ! -x "$i" ]]; then 164 + continue 165 + fi 166 + cp -L "$i" "$i".tmp 167 + mv -f "$i".tmp "$i" 168 + if head -1 "$i" | grep -q ${unwrapped.python}; then 169 + substituteInPlace "$i" \ 170 + --replace ${unwrapped.python} ${pythonEnv} 171 + fi 172 + wrapProgram "$i" ${makeWrapperArgs} 173 + done 174 + ''; 175 + inherit (unwrapped) meta; 176 + } 177 + else 178 + unwrapped.overrideAttrs(_: { 179 + inherit passthru; 180 + }) 181 + ; 182 + in self
+30 -6
pkgs/applications/radio/gqrx/default.nix
··· 1 - { lib, fetchFromGitHub, cmake, qtbase, qtsvg, gnuradio, boost, gr-osmosdr 2 - , mkDerivation 1 + { lib 2 + , fetchFromGitHub 3 + , cmake 4 + , pkg-config 5 + , qt5 6 + , gnuradio3_8Minimal 7 + , log4cpp 8 + , mpir 9 + , fftwFloat 10 + , alsaLib 11 + , libjack2 3 12 # drivers (optional): 4 - , rtl-sdr, hackrf 13 + , rtl-sdr 14 + , hackrf 5 15 , pulseaudioSupport ? true, libpulseaudio 6 16 }: 7 17 8 18 assert pulseaudioSupport -> libpulseaudio != null; 9 19 10 - mkDerivation rec { 20 + gnuradio3_8Minimal.pkgs.mkDerivation rec { 11 21 pname = "gqrx"; 12 22 version = "2.14.4"; 13 23 ··· 18 28 sha256 = "sha256-mMaxu0jq2GaNLWjLsJQXx+zCxtyiCAZQJJZ8GJtnllQ="; 19 29 }; 20 30 21 - nativeBuildInputs = [ cmake ]; 31 + nativeBuildInputs = [ 32 + cmake 33 + pkg-config 34 + qt5.wrapQtAppsHook 35 + ]; 22 36 buildInputs = [ 23 - qtbase qtsvg gnuradio boost gr-osmosdr rtl-sdr hackrf 37 + log4cpp 38 + mpir 39 + fftwFloat 40 + alsaLib 41 + libjack2 42 + gnuradio3_8Minimal.unwrapped.boost 43 + qt5.qtbase 44 + qt5.qtsvg 45 + gnuradio3_8Minimal.pkgs.osmosdr 46 + rtl-sdr 47 + hackrf 24 48 ] ++ lib.optionals pulseaudioSupport [ libpulseaudio ]; 25 49 26 50 postInstall = ''
+9 -10
pkgs/applications/radio/inspectrum/default.nix
··· 1 1 { lib 2 - , mkDerivation 2 + , gnuradio3_8Minimal 3 3 , fetchFromGitHub 4 4 , pkg-config 5 5 , cmake 6 - , boost 7 6 , fftwFloat 8 - , gnuradio 7 + , qt5 9 8 , liquid-dsp 10 - , qtbase 11 - , wrapQtAppsHook 12 9 }: 13 10 14 - mkDerivation rec { 11 + gnuradio3_8Minimal.pkgs.mkDerivation rec { 15 12 pname = "inspectrum"; 16 13 version = "0.2.3"; 17 14 ··· 22 19 sha256 = "1x6nyn429pk0f7lqzskrgsbq09mq5787xd4piic95add6n1cc355"; 23 20 }; 24 21 25 - nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; 22 + nativeBuildInputs = [ 23 + cmake 24 + qt5.wrapQtAppsHook 25 + pkg-config 26 + ]; 26 27 buildInputs = [ 27 28 fftwFloat 28 - boost 29 - gnuradio 30 29 liquid-dsp 31 - qtbase 30 + qt5.qtbase 32 31 ]; 33 32 34 33 meta = with lib; {
+44 -24
pkgs/applications/radio/qradiolink/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, alsaLib, boost 2 - , qt4, libpulseaudio, codec2, libconfig 3 - , gnuradio, gr-osmosdr, gsm 4 - , libopus, libjpeg, protobuf, qwt, speex 5 - } : 6 - 7 - let 8 - version = "0.5.0"; 1 + { lib 2 + , fetchFromGitHub 3 + , libpulseaudio 4 + , libconfig 5 + # Needs a gnuradio built with qt gui support 6 + , gnuradio3_8 7 + # Not gnuradioPackages' 8 + , codec2 9 + , log4cpp 10 + , gmp 11 + , gsm 12 + , libopus 13 + , libjpeg 14 + , libsndfile 15 + , libftdi 16 + , protobuf 17 + , speex 18 + , speexdsp 19 + }: 9 20 10 - in stdenv.mkDerivation { 21 + gnuradio3_8.pkgs.mkDerivation rec { 11 22 pname = "qradiolink"; 12 - inherit version; 23 + version = "0.8.5-2"; 13 24 14 25 src = fetchFromGitHub { 15 - owner = "kantooon"; 26 + owner = "qradiolink"; 16 27 repo = "qradiolink"; 17 28 rev = version; 18 - sha256 = "0xhg5zhjznmls5m3rhpk1qx0dipxmca12s85w15d0i7qwva2f1gi"; 29 + sha256 = "MgHfKR3AJW3pIN9oCBr4BWxk1fGSCpLmMzjxvuTmuFA="; 19 30 }; 20 31 21 32 preBuild = '' 22 - cd ext 33 + cd src/ext 23 34 protoc --cpp_out=. Mumble.proto 24 35 protoc --cpp_out=. QRadioLink.proto 25 - cd .. 36 + cd ../.. 26 37 qmake 27 38 ''; 28 39 29 40 installPhase = '' 30 - mkdir -p $out/bin 31 - cp qradiolink $out/bin 41 + install -D qradiolink $out/bin/qradiolink 42 + install -Dm644 src/res/icon.png $out/share/pixmaps/qradiolink.png 43 + install -Dm644 qradiolink.desktop $out/share/applications/qradiolink.desktop 32 44 ''; 33 45 34 46 buildInputs = [ 35 - qt4 36 - alsaLib 37 - boost 38 - libpulseaudio 47 + gnuradio3_8.unwrapped.boost 39 48 codec2 49 + log4cpp 50 + gmp 51 + libpulseaudio 40 52 libconfig 41 53 gsm 42 - gnuradio 43 - gr-osmosdr 54 + gnuradio3_8.pkgs.osmosdr 44 55 libopus 45 56 libjpeg 57 + speex 58 + speexdsp 59 + gnuradio3_8.qt.qtbase 60 + gnuradio3_8.qt.qtmultimedia 61 + libftdi 62 + libsndfile 63 + gnuradio3_8.qwt 64 + ]; 65 + nativeBuildInputs = [ 46 66 protobuf 47 - speex 48 - qwt 67 + gnuradio3_8.qt.qmake 68 + gnuradio3_8.qt.wrapQtAppsHook 49 69 ]; 50 70 51 71 enableParallelBuilding = true;
+159
pkgs/applications/radio/uhd/3.5.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , fetchFromGitHub 5 + , cmake 6 + , pkg-config 7 + # See https://files.ettus.com/manual_archive/v3.15.0.0/html/page_build_guide.html for dependencies explanations 8 + , boost 9 + , enableLibuhd_C_api ? true 10 + # requires numpy 11 + , enableLibuhd_Python_api ? false 12 + , python3 13 + , enableExamples ? false 14 + , enableUtils ? false 15 + , enableLiberio ? false 16 + , liberio 17 + , libusb1 18 + , enableDpdk ? false 19 + , dpdk 20 + # Devices 21 + , enableOctoClock ? true 22 + , enableMpmd ? true 23 + , enableB100 ? true 24 + , enableB200 ? true 25 + , enableUsrp1 ? true 26 + , enableUsrp2 ? true 27 + , enableX300 ? true 28 + , enableN230 ? true 29 + , enableN300 ? true 30 + , enableN320 ? true 31 + , enableE300 ? true 32 + , enableE320 ? true 33 + }: 34 + 35 + let 36 + onOffBool = b: if b then "ON" else "OFF"; 37 + inherit (lib) optionals; 38 + in 39 + 40 + stdenv.mkDerivation rec { 41 + pname = "uhd"; 42 + # UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz 43 + # and xxx.yyy.zzz. Hrmpf... style keeps changing 44 + version = "3.15.0.0"; 45 + 46 + src = fetchFromGitHub { 47 + owner = "EttusResearch"; 48 + repo = "uhd"; 49 + rev = "v${version}"; 50 + sha256 = "0jknln88a69fh244670nb7qrflbyv0vvdxfddb5g8ncpb6hcg8qf"; 51 + }; 52 + # Firmware images are downloaded (pre-built) from the respective release on Github 53 + uhdImagesSrc = fetchurl { 54 + url = "https://github.com/EttusResearch/uhd/releases/download/v${version}/uhd-images_${version}.tar.xz"; 55 + sha256 = "1fir1a13ac07mqhm4sr34cixiqj2difxq0870qv1wr7a7cbfw6vp"; 56 + }; 57 + 58 + cmakeFlags = [ 59 + "-DENABLE_LIBUHD=ON" 60 + "-DENABLE_USB=ON" 61 + "-DENABLE_TESTS=ON" # This installs tests as well so we delete them via postPhases 62 + "-DENABLE_EXAMPLES=${onOffBool enableExamples}" 63 + "-DENABLE_UTILS=${onOffBool enableUtils}" 64 + "-DENABLE_LIBUHD_C_API=${onOffBool enableLibuhd_C_api}" 65 + "-DENABLE_LIBUHD_PYTHON_API=${onOffBool enableLibuhd_Python_api}" 66 + "-DENABLE_LIBERIO=${onOffBool enableLiberio}" 67 + "-DENABLE_DPDK=${onOffBool enableDpdk}" 68 + # Devices 69 + "-DENABLE_OCTOCLOCK=${onOffBool enableOctoClock}" 70 + "-DENABLE_MPMD=${onOffBool enableMpmd}" 71 + "-DENABLE_B100=${onOffBool enableB100}" 72 + "-DENABLE_B200=${onOffBool enableB200}" 73 + "-DENABLE_USRP1=${onOffBool enableUsrp1}" 74 + "-DENABLE_USRP2=${onOffBool enableUsrp2}" 75 + "-DENABLE_X300=${onOffBool enableX300}" 76 + "-DENABLE_N230=${onOffBool enableN230}" 77 + "-DENABLE_N300=${onOffBool enableN300}" 78 + "-DENABLE_N320=${onOffBool enableN320}" 79 + "-DENABLE_E300=${onOffBool enableE300}" 80 + "-DENABLE_E320=${onOffBool enableE320}" 81 + ] 82 + # TODO: Check if this still needed 83 + # ABI differences GCC 7.1 84 + # /nix/store/wd6r25miqbk9ia53pp669gn4wrg9n9cj-gcc-7.3.0/include/c++/7.3.0/bits/vector.tcc:394:7: note: parameter passing for argument of type 'std::vector<uhd::range_t>::iterator {aka __gnu_cxx::__normal_iterator<uhd::range_t*, std::vector<uhd::range_t> >}' changed in GCC 7.1 85 + ++ [ (lib.optionalString stdenv.isAarch32 "-DCMAKE_CXX_FLAGS=-Wno-psabi") ] 86 + ; 87 + 88 + # Python + Mako are always required for the build itself but not necessary for runtime. 89 + pythonEnv = python3.withPackages (ps: with ps; [ Mako ] 90 + ++ optionals (enableLibuhd_Python_api) [ numpy setuptools ] 91 + ++ optionals (enableUtils) [ requests six ] 92 + ); 93 + 94 + nativeBuildInputs = [ 95 + cmake 96 + pkg-config 97 + ] 98 + # If both enableLibuhd_Python_api and enableUtils are off, we don't need 99 + # pythonEnv in buildInputs as it's a 'build' dependency and not a runtime 100 + # dependency 101 + ++ optionals (!enableLibuhd_Python_api && !enableUtils) [ pythonEnv ] 102 + ; 103 + buildInputs = [ 104 + boost 105 + libusb1 106 + ] 107 + # However, if enableLibuhd_Python_api *or* enableUtils is on, we need 108 + # pythonEnv for runtime as well. The utilities' runtime dependencies are 109 + # handled at the environment 110 + ++ optionals (enableLibuhd_Python_api || enableUtils) [ pythonEnv ] 111 + ++ optionals (enableLiberio) [ liberio ] 112 + ++ optionals (enableDpdk) [ dpdk ] 113 + ; 114 + 115 + doCheck = true; 116 + 117 + # Build only the host software 118 + preConfigure = "cd host"; 119 + # TODO: Check if this still needed, perhaps relevant: 120 + # https://files.ettus.com/manual_archive/v3.15.0.0/html/page_build_guide.html#build_instructions_unix_arm 121 + patches = if stdenv.isAarch32 then ./neon.patch else null; 122 + 123 + postPhases = [ "installFirmware" "removeInstalledTests" ] 124 + ++ optionals (enableUtils) [ "moveUdevRules" ] 125 + ; 126 + 127 + # UHD expects images in `$CMAKE_INSTALL_PREFIX/share/uhd/images` 128 + installFirmware = '' 129 + mkdir -p "$out/share/uhd/images" 130 + tar --strip-components=1 -xvf "${uhdImagesSrc}" -C "$out/share/uhd/images" 131 + ''; 132 + 133 + # -DENABLE_TESTS=ON installs the tests, we don't need them in the output 134 + removeInstalledTests = '' 135 + rm -r $out/lib/uhd/tests 136 + ''; 137 + 138 + # Moves the udev rules to the standard location, needed only if utils are 139 + # enabled 140 + moveUdevRules = '' 141 + mkdir -p $out/lib/udev/rules.d 142 + mv $out/lib/uhd/utils/uhd-usrp.rules $out/lib/udev/rules.d/ 143 + ''; 144 + 145 + meta = with lib; { 146 + description = "USRP Hardware Driver (for Software Defined Radio)"; 147 + longDescription = '' 148 + The USRP Hardware Driver (UHD) software is the hardware driver for all 149 + USRP (Universal Software Radio Peripheral) devices. 150 + 151 + USRP devices are designed and sold by Ettus Research, LLC and its parent 152 + company, National Instruments. 153 + ''; 154 + homepage = "https://uhd.ettus.com/"; 155 + license = licenses.gpl3Plus; 156 + platforms = platforms.linux ++ platforms.darwin; 157 + maintainers = with maintainers; [ bjornfor fpletz tomberek ]; 158 + }; 159 + }
+9 -8
pkgs/applications/radio/uhd/default.nix
··· 1 - { lib, stdenv 1 + { lib 2 + , stdenv 2 3 , fetchurl 3 4 , fetchFromGitHub 4 5 , cmake ··· 8 9 , enableLibuhd_C_api ? true 9 10 # requires numpy 10 11 , enableLibuhd_Python_api ? false 11 - , python3 ? null 12 + , python3 12 13 , enableExamples ? false 13 14 , enableUtils ? false 14 15 , enableLiberio ? false 15 - , liberio ? null 16 - , libusb1 ? null 16 + , liberio 17 + , libusb1 17 18 , enableDpdk ? false 18 - , dpdk ? null 19 + , dpdk 19 20 # Devices 20 21 , enableOctoClock ? true 21 22 , enableMpmd ? true ··· 40 41 pname = "uhd"; 41 42 # UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz 42 43 # and xxx.yyy.zzz. Hrmpf... style keeps changing 43 - version = "3.15.0.0"; 44 + version = "4.0.0.0"; 44 45 45 46 src = fetchFromGitHub { 46 47 owner = "EttusResearch"; 47 48 repo = "uhd"; 48 49 rev = "v${version}"; 49 - sha256 = "0jknln88a69fh244670nb7qrflbyv0vvdxfddb5g8ncpb6hcg8qf"; 50 + sha256 = "NCyiI4pIPw0nBRFdUGpgZ/x2mWz+Qm78ZGACUnSbGSs="; 50 51 }; 51 52 # Firmware images are downloaded (pre-built) from the respective release on Github 52 53 uhdImagesSrc = fetchurl { 53 54 url = "https://github.com/EttusResearch/uhd/releases/download/v${version}/uhd-images_${version}.tar.xz"; 54 - sha256 = "1fir1a13ac07mqhm4sr34cixiqj2difxq0870qv1wr7a7cbfw6vp"; 55 + sha256 = "Xfx0bsHUQ5+Dp+xk0sVWWP83oyXQcUH5AX4PNEE7fY4="; 55 56 }; 56 57 57 58 cmakeFlags = [
+45
pkgs/development/gnuradio-modules/ais/default.nix
··· 1 + { lib 2 + , stdenv 3 + , mkDerivation 4 + , fetchFromGitHub 5 + , cmake 6 + , pkg-config 7 + , python 8 + , boost 9 + , cppunit 10 + , log4cpp 11 + , osmosdr 12 + }: 13 + 14 + mkDerivation rec { 15 + pname = "gr-ais"; 16 + version = "2015-12-20"; 17 + src = fetchFromGitHub { 18 + owner = "bistromath"; 19 + repo = "gr-ais"; 20 + rev = "cdc1f52745853f9c739c718251830eb69704b26e"; 21 + sha256 = "1vl3kk8xr2mh5lf31zdld7yzmwywqffffah8iblxdzblgsdwxfl6"; 22 + }; 23 + disabledForGRafter = "3.8"; 24 + 25 + nativeBuildInputs = [ 26 + cmake 27 + pkg-config 28 + python 29 + ]; 30 + 31 + buildInputs = [ 32 + cppunit 33 + osmosdr 34 + boost 35 + log4cpp 36 + ]; 37 + 38 + meta = with lib; { 39 + description = "Gnuradio block for ais"; 40 + homepage = "https://github.com/bistromath/gr-ais"; 41 + license = licenses.gpl3Plus; 42 + platforms = platforms.unix; 43 + maintainers = with maintainers; [ mog ]; 44 + }; 45 + }
+48
pkgs/development/gnuradio-modules/gsm/default.nix
··· 1 + { lib 2 + , mkDerivation 3 + , fetchFromGitHub 4 + , cmake 5 + , pkg-config 6 + , cppunit 7 + , swig 8 + , boost 9 + , log4cpp 10 + , python 11 + , libosmocore 12 + , osmosdr 13 + }: 14 + 15 + mkDerivation { 16 + pname = "gr-gsm"; 17 + version = "2016-08-25"; 18 + src = fetchFromGitHub { 19 + owner = "ptrkrysik"; 20 + repo = "gr-gsm"; 21 + rev = "3ca05e6914ef29eb536da5dbec323701fbc2050d"; 22 + sha256 = "13nnq927kpf91iqccr8db9ripy5czjl5jiyivizn6bia0bam2pvx"; 23 + }; 24 + disabledForGRafter = "3.8"; 25 + 26 + nativeBuildInputs = [ 27 + cmake 28 + pkg-config 29 + swig 30 + python 31 + ]; 32 + 33 + buildInputs = [ 34 + cppunit 35 + log4cpp 36 + boost 37 + libosmocore 38 + osmosdr 39 + ]; 40 + 41 + meta = with lib; { 42 + description = "Gnuradio block for gsm"; 43 + homepage = "https://github.com/ptrkrysik/gr-gsm"; 44 + license = licenses.gpl3Plus; 45 + platforms = platforms.linux; 46 + maintainers = with maintainers; [ mog ]; 47 + }; 48 + }
+61
pkgs/development/gnuradio-modules/limesdr/default.nix
··· 1 + { lib 2 + , mkDerivation 3 + , fetchFromGitHub 4 + , gnuradio 5 + , cmake 6 + , pkg-config 7 + , doxygen 8 + , swig 9 + , python 10 + , log4cpp 11 + , mpir 12 + , boost 13 + , gmp 14 + , icu 15 + , limesuite 16 + }: 17 + 18 + let 19 + version = { 20 + "3.7" = "2.0.0"; 21 + "3.8" = "3.0.1"; 22 + "3.9" = null; 23 + }.${gnuradio.versionAttr.major}; 24 + src = fetchFromGitHub { 25 + owner = "myriadrf"; 26 + repo = "gr-limesdr"; 27 + rev = "v${version}"; 28 + sha256 = { 29 + "3.7" = "0ldqvfwl0gil89l9s31fjf9d7ki0dk572i8vna336igfaz348ypq"; 30 + "3.8" = "ffs+8TU0yr6IW1xZJ/abQ1CQWGZM+zYqPRJxy3ZvM9U="; 31 + "3.9" = null; 32 + }.${gnuradio.versionAttr.major}; 33 + }; 34 + in mkDerivation { 35 + pname = "gr-limesdr"; 36 + inherit version src; 37 + disabledForGRafter = "3.9"; 38 + 39 + nativeBuildInputs = [ 40 + cmake 41 + pkg-config 42 + swig 43 + python 44 + ]; 45 + buildInputs = [ 46 + log4cpp 47 + mpir 48 + boost 49 + gmp 50 + icu 51 + limesuite 52 + ]; 53 + 54 + meta = with lib; { 55 + description = "Gnuradio source and sink blocks for LimeSDR"; 56 + homepage = "https://wiki.myriadrf.org/Gr-limesdr_Plugin_for_GNURadio"; 57 + license = licenses.mit; 58 + platforms = platforms.linux; 59 + maintainers = [ maintainers.markuskowa ]; 60 + }; 61 + }
+25
pkgs/development/gnuradio-modules/mkDerivation.nix
··· 1 + { lib 2 + , unwrapped 3 + }: 4 + 5 + mkDerivation: 6 + 7 + args: 8 + 9 + # Check if it's supposed to not get built for the current gnuradio version 10 + if (builtins.hasAttr "disabledForGRafter" args) && 11 + (lib.versionAtLeast unwrapped.versionAttr.major args.disabledForGRafter) then 12 + let name = args.name or "${args.pname}"; in 13 + throw "Package ${name} is incompatible with GNURadio ${unwrapped.versionAttr.major}" 14 + else 15 + 16 + let 17 + args_ = { 18 + enableParallelBuilding = args.enableParallelBuilding or true; 19 + nativeBuildInputs = (args.nativeBuildInputs or []); 20 + # We add gnuradio and volk itself by default - most gnuradio based packages 21 + # will not consider it a depenency worth mentioning and it will almost 22 + # always be needed 23 + buildInputs = (args.buildInputs or []) ++ [ unwrapped unwrapped.volk ]; 24 + }; 25 + in mkDerivation (args // args_)
+46
pkgs/development/gnuradio-modules/nacl/default.nix
··· 1 + { lib 2 + , mkDerivation 3 + , fetchFromGitHub 4 + , cmake 5 + , pkg-config 6 + , cppunit 7 + , swig 8 + , boost 9 + , log4cpp 10 + , python 11 + , libsodium 12 + }: 13 + 14 + mkDerivation { 15 + pname = "gr-nacl"; 16 + version = "2017-04-10"; 17 + src = fetchFromGitHub { 18 + owner = "stwunsch"; 19 + repo = "gr-nacl"; 20 + rev = "15276bb0fcabf5fe4de4e58df3d579b5be0e9765"; 21 + sha256 = "018np0qlk61l7mlv3xxx5cj1rax8f1vqrsrch3higsl25yydbv7v"; 22 + }; 23 + disabledForGRafter = "3.8"; 24 + 25 + nativeBuildInputs = [ 26 + cmake 27 + pkg-config 28 + swig 29 + python 30 + ]; 31 + 32 + buildInputs = [ 33 + cppunit 34 + log4cpp 35 + boost 36 + libsodium 37 + ]; 38 + 39 + meta = with lib; { 40 + description = "Gnuradio block for encryption"; 41 + homepage = "https://github.com/stwunsch/gr-nacl"; 42 + license = licenses.gpl3Plus; 43 + platforms = platforms.linux ++ platforms.darwin; 44 + maintainers = with maintainers; [ mog ]; 45 + }; 46 + }
+86
pkgs/development/gnuradio-modules/osmosdr/default.nix
··· 1 + { lib 2 + , mkDerivation 3 + , fetchgit 4 + , gnuradio 5 + , cmake 6 + , pkg-config 7 + , log4cpp 8 + , mpir 9 + , boost 10 + , gmp 11 + , fftwFloat 12 + , python 13 + , swig 14 + , uhd 15 + , icu 16 + , airspy 17 + , hackrf 18 + , libbladeRF 19 + , rtl-sdr 20 + , soapysdr-with-plugins 21 + }: 22 + 23 + let 24 + version = { 25 + "3.7" = "0.1.5"; 26 + "3.8" = "0.2.2"; 27 + "3.9" = null; 28 + }.${gnuradio.versionAttr.major}; 29 + src = fetchgit { 30 + url = "git://git.osmocom.org/gr-osmosdr"; 31 + rev = "v${version}"; 32 + sha256 = { 33 + "3.7" = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv"; 34 + "3.8" = "HT6xlN6cJAnvF+s1g2I1uENhBJJizdADlLXeSD0rEqs="; 35 + "3.9" = null; 36 + }.${gnuradio.versionAttr.major}; 37 + }; 38 + in mkDerivation { 39 + pname = "gr-osmosdr"; 40 + inherit version src; 41 + disabledForGRafter = "3.9"; 42 + 43 + buildInputs = [ 44 + log4cpp 45 + mpir 46 + boost 47 + fftwFloat 48 + gmp 49 + icu 50 + airspy 51 + hackrf 52 + libbladeRF 53 + rtl-sdr 54 + soapysdr-with-plugins 55 + ] ++ lib.optional (gnuradio.hasFeature "gr-uhd" gnuradio.features) [ 56 + uhd 57 + ]; 58 + cmakeFlags = [ 59 + (if (gnuradio.hasFeature "python-support" gnuradio.features) then 60 + "-DENABLE_PYTHON=ON" 61 + else 62 + "-DENABLE_PYTHON=OFF" 63 + ) 64 + ]; 65 + nativeBuildInputs = [ 66 + cmake 67 + pkg-config 68 + swig 69 + ] ++ lib.optionals (gnuradio.hasFeature "python-support" gnuradio.features) [ 70 + (if (gnuradio.versionAttr.major == "3.7") then 71 + python.pkgs.cheetah 72 + else 73 + python.pkgs.Mako 74 + ) 75 + python 76 + ] 77 + ; 78 + 79 + meta = with lib; { 80 + description = "Gnuradio block for OsmoSDR and rtl-sdr"; 81 + homepage = "https://sdr.osmocom.org/trac/wiki/GrOsmoSDR"; 82 + license = licenses.gpl3Plus; 83 + maintainers = with maintainers; [ bjornfor ]; 84 + platforms = platforms.unix; 85 + }; 86 + }
+59
pkgs/development/gnuradio-modules/rds/default.nix
··· 1 + { lib 2 + , mkDerivation 3 + , fetchFromGitHub 4 + , gnuradio 5 + , cmake 6 + , pkg-config 7 + , swig 8 + , python 9 + , log4cpp 10 + , mpir 11 + , boost 12 + , gmp 13 + , icu 14 + }: 15 + 16 + let 17 + version = { 18 + "3.7" = "1.1.0"; 19 + "3.8" = "3.8.0"; 20 + "3.9" = null; 21 + }.${gnuradio.versionAttr.major}; 22 + src = fetchFromGitHub { 23 + owner = "bastibl"; 24 + repo = "gr-rds"; 25 + rev = "v${version}"; 26 + sha256 = { 27 + "3.7" = "0jkzchvw0ivcxsjhi1h0mf7k13araxf5m4wi5v9xdgqxvipjzqfy"; 28 + "3.8" = "+yKLJu2bo7I2jkAiOdjvdhZwxFz9NFgTmzcLthH9Y5o="; 29 + "3.9" = null; 30 + }.${gnuradio.versionAttr.major}; 31 + }; 32 + in mkDerivation { 33 + pname = "gr-rds"; 34 + inherit version src; 35 + disabledForGRafter = "3.9"; 36 + 37 + buildInputs = [ 38 + log4cpp 39 + mpir 40 + boost 41 + gmp 42 + icu 43 + ]; 44 + 45 + nativeBuildInputs = [ 46 + cmake 47 + pkg-config 48 + swig 49 + python 50 + ]; 51 + 52 + meta = with lib; { 53 + description = "Gnuradio block for radio data system"; 54 + homepage = "https://github.com/bastibl/gr-rds"; 55 + license = licenses.gpl2Plus; 56 + platforms = platforms.unix; 57 + maintainers = with maintainers; [ mog ]; 58 + }; 59 + }
+51
pkgs/development/libraries/volk/default.nix
··· 1 + { stdenv 2 + , lib 3 + , fetchFromGitHub 4 + , fetchpatch 5 + , cmake 6 + , cppunit 7 + , python3 8 + , enableModTool ? true 9 + , removeReferencesTo 10 + }: 11 + 12 + stdenv.mkDerivation rec { 13 + pname = "volk"; 14 + version = "2.4.1"; 15 + 16 + src = fetchFromGitHub { 17 + owner = "gnuradio"; 18 + repo = pname; 19 + rev = "v${version}"; 20 + sha256 = "fuHJ+p5VN4ThdbQFbzB08VCuy/Zo7m/I1Gs5EQGPeNY="; 21 + fetchSubmodules = true; 22 + }; 23 + 24 + patches = [ 25 + # Fixes a failing test: https://github.com/gnuradio/volk/pull/434 26 + (fetchpatch { 27 + url = "https://github.com/gnuradio/volk/pull/434/commits/bce8531b6f1a3c5abe946ed6674b283d54258281.patch"; 28 + sha256 = "OLW9uF6iL47z63kjvYqwsWtkINav8Xhs+Htqg6Kr4uI="; 29 + }) 30 + ]; 31 + cmakeFlags = lib.optionals (!enableModTool) [ "-DENABLE_MODTOOL=OFF" ]; 32 + postInstall = '' 33 + ${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libvolk.so) 34 + ''; 35 + 36 + nativeBuildInputs = [ 37 + cmake 38 + python3 39 + python3.pkgs.Mako 40 + ]; 41 + 42 + doCheck = true; 43 + 44 + meta = with lib; { 45 + homepage = "http://libvolk.org/"; 46 + description = "The Vector Optimized Library of Kernels"; 47 + license = licenses.gpl3Plus; 48 + maintainers = with maintainers; [ doronbehar ]; 49 + platforms = platforms.all; 50 + }; 51 + }
+16 -8
pkgs/top-level/aliases.nix
··· 240 240 gnome_doc_utils = gnome-doc-utils; # added 2018-02-25 241 241 gnome_themes_standard = gnome-themes-standard; # added 2018-02-25 242 242 gnunet_git = throw "gnunet_git was removed due to gnunet becoming stable"; # added 2019-05-27 243 - gnuradio-nacl = gr-nacl; # added 2019-05-27 244 - gnuradio-gsm = gr-gsm; # added 2019-05-27 245 - gnuradio-ais = gr-ais; # added 2019-05-27 246 - gnuradio-limesdr = gr-limesdr; # added 2019-05-27 247 - gnuradio-rds = gr-rds; # added 2019-05-27 248 - gnuradio-osmosdr = gr-osmosdr; # added 2019-05-27 249 - # added 20-10-2020 243 + # Added 2020-10-16 250 244 gnuradio-with-packages = gnuradio3_7.override { 251 - extraPackages = [ gr-nacl gr-gsm gr-ais gr-limesdr gr-rds gr-osmosdr ]; 245 + extraPackages = lib.attrVals [ 246 + "osmosdr" "ais" "gsm" "nacl" "rds" "limesdr" 247 + ] gnuradio3_7Packages; 252 248 }; 249 + gnuradio-nacl = gnuradio3_7.pkgs.nacl; # added 2019-05-27, changed 2020-10-16 250 + gnuradio-gsm = gnuradio3_7.pkgs.gsm; # added 2019-05-27, changed 2020-10-16 251 + gnuradio-ais = gnuradio3_7.pkgs.ais; # added 2019-05-27, changed 2020-10-16 252 + gnuradio-limesdr = gnuradio3_7.pkgs.limesdr; # added 2019-05-27, changed 2020-10-16 253 + gnuradio-rds = gnuradio3_7.pkgs.rds; # added 2019-05-27, changed 2020-10-16 254 + gnuradio-osmosdr = gnuradio3_7.pkgs.osmosdr; # added 2019-05-27, changed 2020-10-16 255 + gr-nacl = gnuradio3_7.pkgs.nacl; # added 2019-05-27, changed 2020-10-16 256 + gr-gsm = gnuradio3_7.pkgs.gsm; # added 2019-05-27, changed 2020-10-16 257 + gr-ais = gnuradio3_7.pkgs.ais; # added 2019-05-27, changed 2020-10-16 258 + gr-limesdr = gnuradio3_7.pkgs.limesdr; # added 2019-05-27, changed 2020-10-16 259 + gr-rds = gnuradio3_7.pkgs.rds; # added 2019-05-27, changed 2020-10-16 260 + gr-osmosdr = gnuradio3_7.pkgs.osmosdr; # added 2019-05-27, changed 2020-10-16 253 261 gnustep-make = gnustep.make; # added 2016-7-6 254 262 gnupg20 = throw "gnupg20 has been removed from nixpkgs as upstream dropped support on 2017-12-31";# added 2020-07-12 255 263 gnuvd = throw "gnuvd was removed because the backend service is missing"; # added 2020-01-14
+84 -78
pkgs/top-level/all-packages.nix
··· 3957 3957 3958 3958 volctl = callPackage ../tools/audio/volctl { }; 3959 3959 3960 + volk = callPackage ../development/libraries/volk { }; 3961 + 3960 3962 vorta = libsForQt5.callPackage ../applications/backup/vorta { }; 3961 3963 3962 3964 utahfs = callPackage ../applications/networking/utahfs { }; ··· 13145 13147 13146 13148 uefi-firmware-parser = callPackage ../development/tools/analysis/uefi-firmware-parser { }; 13147 13149 13148 - uhd = callPackage ../applications/radio/uhd { }; 13150 + uhd3_5 = callPackage ../applications/radio/uhd/3.5.nix { }; 13151 + uhd = callPackage ../applications/radio/uhd { 13152 + boost = boost17x; 13153 + }; 13149 13154 13150 13155 uisp = callPackage ../development/tools/misc/uisp { }; 13151 13156 ··· 16779 16784 16780 16785 qm-dsp = callPackage ../development/libraries/audio/qm-dsp { }; 16781 16786 16782 - qradiolink = callPackage ../applications/radio/qradiolink { 16783 - # 3.8 support is not ready yet: 16784 - # https://github.com/qradiolink/qradiolink/issues/67#issuecomment-703222573 16785 - # The non minimal build is used because the 'qtgui' component is needed. 16786 - # gr-osmosdr is using the same gnuradio as of now. 16787 - gnuradio = gnuradio3_7-unwrapped; 16788 - }; 16787 + qradiolink = callPackage ../applications/radio/qradiolink { }; 16789 16788 16790 16789 qrupdate = callPackage ../development/libraries/qrupdate { }; 16791 16790 ··· 22339 22338 22340 22339 gksu = callPackage ../applications/misc/gksu { }; 22341 22340 22342 - gnss-sdr = callPackage ../applications/radio/gnss-sdr { 22343 - boost = boost166; 22344 - gnuradio = gnuradio3_7-unwrapped; 22345 - }; 22341 + gnss-sdr = callPackage ../applications/radio/gnss-sdr { }; 22346 22342 22347 - gnuradio-unwrapped = callPackage ../applications/radio/gnuradio { 22348 - inherit (darwin.apple_sdk.frameworks) CoreAudio; 22349 - python = python3; 22343 + gnuradio = callPackage ../applications/radio/gnuradio/wrapper.nix { 22344 + unwrapped = callPackage ../applications/radio/gnuradio { 22345 + inherit (darwin.apple_sdk.frameworks) CoreAudio; 22346 + python = python3; 22347 + boost = boost17x; 22348 + }; 22350 22349 }; 22350 + gnuradioPackages = lib.recurseIntoAttrs gnuradio.pkgs; 22351 22351 # A build without gui components and other utilites not needed for end user 22352 22352 # libraries 22353 - gnuradioMinimal = gnuradio-unwrapped.override { 22354 - features = { 22355 - gnuradio-companion = false; 22356 - python-support = false; 22357 - gr-ctrlport = false; 22358 - examples = false; 22359 - gr-qtgui = false; 22360 - gr-utils = false; 22361 - gr-modtool = false; 22362 - sphinx = false; 22363 - doxygen = false; 22353 + gnuradioMinimal = gnuradio.override { 22354 + wrap = false; 22355 + unwrapped = gnuradio.unwrapped.override { 22356 + volk = volk.override { 22357 + # So it will not reference python 22358 + enableModTool = false; 22359 + }; 22360 + features = { 22361 + gnuradio-companion = false; 22362 + python-support = false; 22363 + examples = false; 22364 + gr-qtgui = false; 22365 + gr-utils = false; 22366 + gr-modtool = false; 22367 + gr-blocktool = false; 22368 + sphinx = false; 22369 + doxygen = false; 22370 + }; 22364 22371 }; 22365 22372 }; 22366 - gnuradio = callPackage ../applications/radio/gnuradio/wrapper.nix { 22367 - unwrapped = gnuradio-unwrapped; 22368 - }; 22369 - gnuradio3_7-unwrapped = callPackage ../applications/radio/gnuradio/3.7.nix { 22370 - inherit (darwin.apple_sdk.frameworks) CoreAudio; 22371 - python = python2; 22373 + gnuradio3_8 = callPackage ../applications/radio/gnuradio/wrapper.nix { 22374 + unwrapped = callPackage ../applications/radio/gnuradio/3.8.nix { 22375 + inherit (darwin.apple_sdk.frameworks) CoreAudio; 22376 + python = python3; 22377 + boost = boost17x; 22378 + }; 22372 22379 }; 22380 + gnuradio3_8Packages = lib.recurseIntoAttrs gnuradio3_8.pkgs; 22373 22381 # A build without gui components and other utilites not needed if gnuradio is 22374 22382 # used as a c++ library. 22375 - gnuradio3_7Minimal = gnuradio3_7-unwrapped.override { 22376 - features = { 22377 - gnuradio-companion = false; 22378 - python-support = false; 22379 - gr-ctrlport = false; 22380 - gr-qtgui = false; 22381 - gr-utils = false; 22382 - sphinx = false; 22383 - doxygen = false; 22384 - gr-wxgui = false; 22383 + gnuradio3_8Minimal = gnuradio3_8.override { 22384 + wrap = false; 22385 + unwrapped = gnuradio3_8.unwrapped.override { 22386 + volk = volk.override { 22387 + enableModTool = false; 22388 + }; 22389 + features = { 22390 + gnuradio-companion = false; 22391 + python-support = false; 22392 + examples = false; 22393 + gr-qtgui = false; 22394 + gr-utils = false; 22395 + gr-modtool = false; 22396 + sphinx = false; 22397 + doxygen = false; 22398 + }; 22385 22399 }; 22386 22400 }; 22387 22401 gnuradio3_7 = callPackage ../applications/radio/gnuradio/wrapper.nix { 22388 - unwrapped = gnuradio3_7-unwrapped; 22402 + unwrapped = callPackage ../applications/radio/gnuradio/3.7.nix { 22403 + inherit (darwin.apple_sdk.frameworks) CoreAudio; 22404 + python = python2; 22405 + # Incompatible with uhd4+ 22406 + uhd = uhd3_5; 22407 + }; 22408 + }; 22409 + gnuradio3_7Packages = lib.recurseIntoAttrs gnuradio3_7.pkgs; 22410 + # A build without gui components and other utilites not needed if gnuradio is 22411 + # used as a c++ library. 22412 + gnuradio3_7Minimal = gnuradio3_7.override { 22413 + wrap = false; 22414 + unwrapped = gnuradio3_7.unwrapped.override { 22415 + volk = volk.override { 22416 + enableModTool = false; 22417 + }; 22418 + features = { 22419 + gnuradio-companion = false; 22420 + python-support = false; 22421 + gr-qtgui = false; 22422 + gr-utils = false; 22423 + sphinx = false; 22424 + doxygen = false; 22425 + gr-wxgui = false; 22426 + }; 22427 + }; 22389 22428 }; 22390 22429 22391 22430 grandorgue = callPackage ../applications/audio/grandorgue { }; 22392 22431 22393 - gr-nacl = callPackage ../applications/radio/gnuradio/nacl.nix { 22394 - gnuradio = gnuradio3_7-unwrapped; 22395 - }; 22396 - 22397 - gr-gsm = callPackage ../applications/radio/gnuradio/gsm.nix { 22398 - gnuradio = gnuradio3_7-unwrapped; 22399 - }; 22400 - 22401 - gr-ais = callPackage ../applications/radio/gnuradio/ais.nix { 22402 - gnuradio = gnuradio3_7-unwrapped; 22403 - }; 22404 - 22405 - gr-limesdr = callPackage ../applications/radio/gnuradio/limesdr.nix { 22406 - gnuradio = gnuradio3_7-unwrapped; 22407 - }; 22408 - 22409 - gr-rds = callPackage ../applications/radio/gnuradio/rds.nix { 22410 - gnuradio = gnuradio3_7-unwrapped; 22411 - }; 22412 - 22413 - gr-osmosdr = callPackage ../applications/radio/gnuradio/osmosdr.nix { 22414 - gnuradio = gnuradio3_7-unwrapped; 22415 - }; 22416 - 22417 22432 goldendict = libsForQt5.callPackage ../applications/misc/goldendict { 22418 22433 inherit (darwin) libiconv; 22419 22434 }; ··· 22440 22455 22441 22456 gpx = callPackage ../applications/misc/gpx { }; 22442 22457 22443 - gqrx = libsForQt514.callPackage ../applications/radio/gqrx { 22444 - gnuradio = gnuradio3_7Minimal; 22445 - # Use the same gnuradio for gr-osmosdr as well 22446 - gr-osmosdr = gr-osmosdr.override { 22447 - gnuradio = gnuradio3_7Minimal; 22448 - pythonSupport = false; 22449 - }; 22450 - }; 22458 + gqrx = callPackage ../applications/radio/gqrx { }; 22451 22459 22452 22460 gpx-viewer = callPackage ../applications/misc/gpx-viewer { }; 22453 22461 ··· 23295 23303 23296 23304 inkscape-extensions = recurseIntoAttrs (callPackages ../applications/graphics/inkscape/extensions.nix {}); 23297 23305 23298 - inspectrum = libsForQt514.callPackage ../applications/radio/inspectrum { 23299 - gnuradio = gnuradioMinimal; 23300 - }; 23306 + inspectrum = callPackage ../applications/radio/inspectrum { }; 23301 23307 23302 23308 ion3 = callPackage ../applications/window-managers/ion-3 { 23303 23309 lua = lua5_1;
+47
pkgs/top-level/gnuradio-packages.nix
··· 1 + { lib 2 + , stdenv 3 + , newScope 4 + , gnuradio # unwrapped gnuradio 5 + }: 6 + 7 + lib.makeScope newScope ( self: 8 + 9 + let 10 + # Modeled after qt's 11 + mkDerivationWith = import ../development/gnuradio-modules/mkDerivation.nix { 12 + inherit lib; 13 + unwrapped = gnuradio; 14 + }; 15 + mkDerivation = mkDerivationWith stdenv.mkDerivation; 16 + 17 + callPackage = self.newScope { 18 + inherit (gnuradio) 19 + # Packages that are potentially overriden and used as deps here. 20 + boost 21 + uhd 22 + volk 23 + ; 24 + inherit mkDerivationWith mkDerivation; 25 + }; 26 + 27 + in { 28 + 29 + inherit callPackage mkDerivation mkDerivationWith; 30 + 31 + ### Packages 32 + 33 + inherit gnuradio; 34 + 35 + osmosdr = callPackage ../development/gnuradio-modules/osmosdr/default.nix { }; 36 + 37 + ais = callPackage ../development/gnuradio-modules/ais/default.nix { }; 38 + 39 + gsm = callPackage ../development/gnuradio-modules/gsm/default.nix { }; 40 + 41 + nacl = callPackage ../development/gnuradio-modules/nacl/default.nix { }; 42 + 43 + rds = callPackage ../development/gnuradio-modules/rds/default.nix { }; 44 + 45 + limesdr = callPackage ../development/gnuradio-modules/limesdr/default.nix { }; 46 + 47 + })