···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 = "5";
46- patch = "0";
47-}
48}:
4950let
···204 gr-zeromq = {
205 runtime = [ cppzmq ];
206 cmakeEnableFlag = "GR_ZEROMQ";
00000207 };
208 };
209 shared = (import ./shared.nix {
···214 removeReferencesTo
215 featuresInfo
216 features
217- versionAttr
218 sourceSha256
219 overrideSrc
220 fetchFromGitHub
···222 qt = qt5;
223 gtk = gtk3;
224 });
225- inherit (shared) hasFeature; # function
226in
227228-stdenv.mkDerivation {
229- inherit pname;
230- inherit (shared)
231- version
232- src
233- nativeBuildInputs
234- buildInputs
235- disallowedReferences
236- stripDebugList
237- doCheck
238- dontWrapPythonPrograms
239- dontWrapQtApps
240- meta
241- ;
00000242 patches = [
243 # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
244 ./modtool-newmod-permissions.3_8.patch
···291 ${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
292 ''
293 ;
294-}
···40# If one wishes to use a different src or name for a very custom build
41, overrideSrc ? {}
42, pname ? "gnuradio"
43+, version ? "3.8.5.0"
000044}:
4546let
···200 gr-zeromq = {
201 runtime = [ cppzmq ];
202 cmakeEnableFlag = "GR_ZEROMQ";
203+ pythonRuntime = [
204+ # Will compile without this, but it is required by tests, and by some
205+ # gr blocks.
206+ python.pkgs.pyzmq
207+ ];
208 };
209 };
210 shared = (import ./shared.nix {
···215 removeReferencesTo
216 featuresInfo
217 features
218+ version
219 sourceSha256
220 overrideSrc
221 fetchFromGitHub
···223 qt = qt5;
224 gtk = gtk3;
225 });
226+ inherit (shared.passthru) hasFeature; # function
227in
228229+stdenv.mkDerivation (finalAttrs: (shared // {
230+ inherit pname version;
231+ # Will still evaluate correctly if not used here. It only helps nix-update
232+ # find the right file in which version is defined.
233+ inherit (shared) src;
234+ # Remove failing tests
235+ preConfigure = (shared.preConfigure or "") + ''
236+ # https://github.com/gnuradio/gnuradio/issues/3801
237+ rm gr-blocks/python/blocks/qa_cpp_py_binding.py
238+ rm gr-blocks/python/blocks/qa_cpp_py_binding_set.py
239+ rm gr-blocks/python/blocks/qa_ctrlport_probes.py
240+ # Tests that fail due to numpy deprecations upstream hasn't accomodated to yet.
241+ rm gr-fec/python/fec/qa_polar_decoder_sc.py
242+ rm gr-fec/python/fec/qa_polar_decoder_sc_list.py
243+ rm gr-fec/python/fec/qa_polar_decoder_sc_systematic.py
244+ rm gr-fec/python/fec/qa_polar_encoder.py
245+ rm gr-fec/python/fec/qa_polar_encoder_systematic.py
246+ rm gr-filter/python/filter/qa_freq_xlating_fft_filter.py
247+ '';
248 patches = [
249 # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
250 ./modtool-newmod-permissions.3_8.patch
···297 ${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
298 ''
299 ;
300+}))
+21-23
pkgs/applications/radio/gnuradio/3.9.nix
···42# If one wishes to use a different src or name for a very custom build
43, overrideSrc ? {}
44, pname ? "gnuradio"
45-, versionAttr ? {
46- major = "3.9";
47- minor = "8";
48- patch = "0";
49-}
50}:
5152let
···231 gr-zeromq = {
232 runtime = [ cppzmq ];
233 cmakeEnableFlag = "GR_ZEROMQ";
00000234 };
235 gr-network = {
236 cmakeEnableFlag = "GR_NETWORK";
···250 removeReferencesTo
251 featuresInfo
252 features
253- versionAttr
254 sourceSha256
255 overrideSrc
256 fetchFromGitHub
···258 qt = qt5;
259 gtk = gtk3;
260 });
261- inherit (shared) hasFeature; # function
262in
263264-stdenv.mkDerivation {
265- inherit pname;
266- inherit (shared)
267- version
268- src
269- nativeBuildInputs
270- buildInputs
271- cmakeFlags
272- disallowedReferences
273- stripDebugList
274- doCheck
275- dontWrapPythonPrograms
276- dontWrapQtApps
277- meta
278- ;
279 patches = [
280 # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
281 ./modtool-newmod-permissions.patch
···303 ${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
304 ''
305 ;
306-}
···42# If one wishes to use a different src or name for a very custom build
43, overrideSrc ? {}
44, pname ? "gnuradio"
45+, version ? "3.9.8.0"
000046}:
4748let
···227 gr-zeromq = {
228 runtime = [ cppzmq ];
229 cmakeEnableFlag = "GR_ZEROMQ";
230+ pythonRuntime = [
231+ # Will compile without this, but it is required by tests, and by some
232+ # gr blocks.
233+ python.pkgs.pyzmq
234+ ];
235 };
236 gr-network = {
237 cmakeEnableFlag = "GR_NETWORK";
···251 removeReferencesTo
252 featuresInfo
253 features
254+ version
255 sourceSha256
256 overrideSrc
257 fetchFromGitHub
···259 qt = qt5;
260 gtk = gtk3;
261 });
262+ inherit (shared.passthru) hasFeature; # function
263in
264265+stdenv.mkDerivation (finalAttrs: (shared // {
266+ inherit pname version;
267+ # Will still evaluate correctly if not used here. It only helps nix-update
268+ # find the right file in which version is defined.
269+ inherit (shared) src;
270+ # Remove failing tests
271+ preConfigure = (shared.preConfigure or "") + ''
272+ # https://github.com/gnuradio/gnuradio/issues/3801
273+ rm gr-blocks/python/blocks/qa_cpp_py_binding.py
274+ rm gr-blocks/python/blocks/qa_cpp_py_binding_set.py
275+ rm gr-blocks/python/blocks/qa_ctrlport_probes.py
276+ '';
000277 patches = [
278 # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
279 ./modtool-newmod-permissions.patch
···301 ${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
302 ''
303 ;
304+}))
+14-23
pkgs/applications/radio/gnuradio/default.nix
···45# If one wishes to use a different src or name for a very custom build
46, overrideSrc ? {}
47, pname ? "gnuradio"
48-, versionAttr ? {
49- major = "3.10";
50- minor = "7";
51- patch = "0";
52-}
53}:
5455let
···252 gr-zeromq = {
253 runtime = [ cppzmq ];
254 cmakeEnableFlag = "GR_ZEROMQ";
00000255 };
256 gr-network = {
257 cmakeEnableFlag = "GR_NETWORK";
···271 removeReferencesTo
272 featuresInfo
273 features
274- versionAttr
275 sourceSha256
276 overrideSrc
277 fetchFromGitHub
···279 qt = qt5;
280 gtk = gtk3;
281 });
282- inherit (shared) hasFeature; # function
283in
284285-stdenv.mkDerivation {
286- inherit pname;
287- inherit (shared)
288- version
289- src
290- nativeBuildInputs
291- buildInputs
292- cmakeFlags
293- disallowedReferences
294- stripDebugList
295- doCheck
296- dontWrapPythonPrograms
297- dontWrapQtApps
298- meta
299- ;
300 patches = [
301 # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
302 ./modtool-newmod-permissions.patch
···332 ${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
333 ''
334 ;
335-}
···45# If one wishes to use a different src or name for a very custom build
46, overrideSrc ? {}
47, pname ? "gnuradio"
48+, version ? "3.10.7.0"
000049}:
5051let
···248 gr-zeromq = {
249 runtime = [ cppzmq ];
250 cmakeEnableFlag = "GR_ZEROMQ";
251+ pythonRuntime = [
252+ # Will compile without this, but it is required by tests, and by some
253+ # gr blocks.
254+ python.pkgs.pyzmq
255+ ];
256 };
257 gr-network = {
258 cmakeEnableFlag = "GR_NETWORK";
···272 removeReferencesTo
273 featuresInfo
274 features
275+ version
276 sourceSha256
277 overrideSrc
278 fetchFromGitHub
···280 qt = qt5;
281 gtk = gtk3;
282 });
283+ inherit (shared.passthru) hasFeature; # function
284in
285286+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;
0000000000291 patches = [
292 # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
293 ./modtool-newmod-permissions.patch
···323 ${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
324 ''
325 ;
326+}))
+23-15
pkgs/applications/radio/gnuradio/shared.nix
···5, removeReferencesTo
6, featuresInfo
7, features
8-, versionAttr
9, sourceSha256
10# If overridden. No need to set default values, as they are given defaults in
11# the main expressions
···13, fetchFromGitHub
14}:
1516-rec {
17- version = builtins.concatStringsSep "." (
18- lib.attrVals [ "major" "minor" "patch" ] versionAttr
0000019 );
00000020 src = if overrideSrc != {} then
21 overrideSrc
22 else
···27 sha256 = sourceSha256;
28 }
29 ;
30- # Check if a feature is enabled, while defaulting to true if feat is not
31- # specified.
32- hasFeature = feat: (
33- if builtins.hasAttr feat features then
34- features.${feat}
35- else
36- true
37- );
38 nativeBuildInputs = lib.flatten (lib.mapAttrsToList (
39 feat: info: (
40 lib.optionals (hasFeature feat) (
···109 # Wrapping is done with an external wrapper
110 dontWrapPythonPrograms = true;
111 dontWrapQtApps = true;
112- # Tests should succeed, but it's hard to get LD_LIBRARY_PATH right in order
113- # for it to happen.
114- doCheck = false;
00000115116 meta = with lib; {
117 description = "Software Defined Radio (SDR) software";
···5, removeReferencesTo
6, featuresInfo
7, features
8+, version
9, sourceSha256
10# If overridden. No need to set default values, as they are given defaults in
11# the main expressions
···13, fetchFromGitHub
14}:
1516+let
17+ # Check if a feature is enabled, while defaulting to true if feat is not
18+ # specified.
19+ hasFeature = feat: (
20+ if builtins.hasAttr feat features then
21+ features.${feat}
22+ else
23+ true
24 );
25+ versionAttr = {
26+ major = builtins.concatStringsSep "." (lib.take 2 (lib.splitVersion version));
27+ minor = builtins.elemAt (lib.splitVersion version) 2;
28+ patch = builtins.elemAt (lib.splitVersion version) 3;
29+ };
30+in {
31 src = if overrideSrc != {} then
32 overrideSrc
33 else
···38 sha256 = sourceSha256;
39 }
40 ;
0000000041 nativeBuildInputs = lib.flatten (lib.mapAttrsToList (
42 feat: info: (
43 lib.optionals (hasFeature feat) (
···112 # Wrapping is done with an external wrapper
113 dontWrapPythonPrograms = true;
114 dontWrapQtApps = true;
115+ # On darwin, it requires playing with DYLD_FALLBACK_LIBRARY_PATH to make if
116+ # find libgnuradio-runtim.3.*.dylib .
117+ doCheck = !stdenv.isDarwin;
118+ preCheck = ''
119+ export HOME=$(mktemp -d)
120+ export QT_QPA_PLATFORM=offscreen
121+ export QT_PLUGIN_PATH="${qt.qtbase.bin}/${qt.qtbase.qtPluginPrefix}"
122+ '';
123124 meta = with lib; {
125 description = "Software Defined Radio (SDR) software";