···1717, plasma-framework
1818, qttools
1919, iconv
2020+, cppunit
2121+, syncthing
2022, webviewSupport ? true
2123, jsSupport ? true
2224, kioPluginSupport ? stdenv.isLinux
···3133}:
32343335stdenv.mkDerivation (finalAttrs: {
3434- version = "1.4.6";
3636+ version = "1.4.7";
3537 pname = "syncthingtray";
36383739 src = fetchFromGitHub {
3840 owner = "Martchus";
3941 repo = "syncthingtray";
4042 rev = "v${finalAttrs.version}";
4141- sha256 = "sha256-/HAqO0eVFt4YLGeTbZSZcH2pOojvykukAGTBHZTfKLQ=";
4343+ sha256 = "sha256-ddOyAyvFifsdNMbwcMZTyhA+5pvz6/Eu/VoBmdsHi54=";
4244 };
43454446 buildInputs = [
···5860 wrapQtAppsHook
5961 cmake
6062 qttools
6363+ # Although these are test dependencies, we add them anyway so that we test
6464+ # whether the test units compile. On Darwin we don't run the tests but we
6565+ # still build them.
6666+ cppunit
6767+ syncthing
6168 ]
6269 ++ lib.optionals plasmoidSupport [ extra-cmake-modules ]
6370 ;
64716565- # No tests are available by upstream, but we test --help anyway
6666- # Don't test on Darwin because output is .app
7272+ # syncthing server seems to hang on darwin, causing tests to fail.
7373+ doCheck = !stdenv.isDarwin;
7474+ preCheck = ''
7575+ export QT_QPA_PLATFORM=offscreen
7676+ export QT_PLUGIN_PATH="${qtbase.bin}/${qtbase.qtPluginPrefix}"
7777+ '';
7878+ # don't test --help on Darwin because output is .app
6779 doInstallCheck = !stdenv.isDarwin;
6880 installCheckPhase = ''
6981 $out/bin/syncthingtray --help | grep ${finalAttrs.version}
7082 '';
71837284 cmakeFlags = [
8585+ "-DBUILD_TESTING=ON"
8686+ # See https://github.com/Martchus/syncthingtray/issues/208
8787+ "-DEXCLUDE_TESTS_FROM_ALL=OFF"
7388 "-DAUTOSTART_EXEC_PATH=${autostartExecPath}"
7489 # See https://github.com/Martchus/syncthingtray/issues/42
7590 "-DQT_PLUGIN_DIR:STRING=${placeholder "out"}/${qtbase.qtPluginPrefix}"
···4040# If one wishes to use a different src or name for a very custom build
4141, overrideSrc ? {}
4242, pname ? "gnuradio"
4343-, versionAttr ? {
4444- major = "3.8";
4545- minor = "5";
4646- patch = "0";
4747-}
4343+, version ? "3.8.5.0"
4844}:
49455046let
···204200 gr-zeromq = {
205201 runtime = [ cppzmq ];
206202 cmakeEnableFlag = "GR_ZEROMQ";
203203+ pythonRuntime = [
204204+ # Will compile without this, but it is required by tests, and by some
205205+ # gr blocks.
206206+ python.pkgs.pyzmq
207207+ ];
207208 };
208209 };
209210 shared = (import ./shared.nix {
···214215 removeReferencesTo
215216 featuresInfo
216217 features
217217- versionAttr
218218+ version
218219 sourceSha256
219220 overrideSrc
220221 fetchFromGitHub
···222223 qt = qt5;
223224 gtk = gtk3;
224225 });
225225- inherit (shared) hasFeature; # function
226226+ inherit (shared.passthru) hasFeature; # function
226227in
227228228228-stdenv.mkDerivation {
229229- inherit pname;
230230- inherit (shared)
231231- version
232232- src
233233- nativeBuildInputs
234234- buildInputs
235235- disallowedReferences
236236- stripDebugList
237237- doCheck
238238- dontWrapPythonPrograms
239239- dontWrapQtApps
240240- meta
241241- ;
229229+stdenv.mkDerivation (finalAttrs: (shared // {
230230+ inherit pname version;
231231+ # Will still evaluate correctly if not used here. It only helps nix-update
232232+ # find the right file in which version is defined.
233233+ inherit (shared) src;
234234+ # Remove failing tests
235235+ preConfigure = (shared.preConfigure or "") + ''
236236+ # https://github.com/gnuradio/gnuradio/issues/3801
237237+ rm gr-blocks/python/blocks/qa_cpp_py_binding.py
238238+ rm gr-blocks/python/blocks/qa_cpp_py_binding_set.py
239239+ rm gr-blocks/python/blocks/qa_ctrlport_probes.py
240240+ # Tests that fail due to numpy deprecations upstream hasn't accomodated to yet.
241241+ rm gr-fec/python/fec/qa_polar_decoder_sc.py
242242+ rm gr-fec/python/fec/qa_polar_decoder_sc_list.py
243243+ rm gr-fec/python/fec/qa_polar_decoder_sc_systematic.py
244244+ rm gr-fec/python/fec/qa_polar_encoder.py
245245+ rm gr-fec/python/fec/qa_polar_encoder_systematic.py
246246+ rm gr-filter/python/filter/qa_freq_xlating_fft_filter.py
247247+ '';
242248 patches = [
243249 # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
244250 ./modtool-newmod-permissions.3_8.patch
···291297 ${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
292298 ''
293299 ;
294294-}
300300+}))
+21-23
pkgs/applications/radio/gnuradio/3.9.nix
···4242# If one wishes to use a different src or name for a very custom build
4343, overrideSrc ? {}
4444, pname ? "gnuradio"
4545-, versionAttr ? {
4646- major = "3.9";
4747- minor = "8";
4848- patch = "0";
4949-}
4545+, version ? "3.9.8.0"
5046}:
51475248let
···231227 gr-zeromq = {
232228 runtime = [ cppzmq ];
233229 cmakeEnableFlag = "GR_ZEROMQ";
230230+ pythonRuntime = [
231231+ # Will compile without this, but it is required by tests, and by some
232232+ # gr blocks.
233233+ python.pkgs.pyzmq
234234+ ];
234235 };
235236 gr-network = {
236237 cmakeEnableFlag = "GR_NETWORK";
···250251 removeReferencesTo
251252 featuresInfo
252253 features
253253- versionAttr
254254+ version
254255 sourceSha256
255256 overrideSrc
256257 fetchFromGitHub
···258259 qt = qt5;
259260 gtk = gtk3;
260261 });
261261- inherit (shared) hasFeature; # function
262262+ inherit (shared.passthru) hasFeature; # function
262263in
263264264264-stdenv.mkDerivation {
265265- inherit pname;
266266- inherit (shared)
267267- version
268268- src
269269- nativeBuildInputs
270270- buildInputs
271271- cmakeFlags
272272- disallowedReferences
273273- stripDebugList
274274- doCheck
275275- dontWrapPythonPrograms
276276- dontWrapQtApps
277277- meta
278278- ;
265265+stdenv.mkDerivation (finalAttrs: (shared // {
266266+ inherit pname version;
267267+ # Will still evaluate correctly if not used here. It only helps nix-update
268268+ # find the right file in which version is defined.
269269+ inherit (shared) src;
270270+ # Remove failing tests
271271+ preConfigure = (shared.preConfigure or "") + ''
272272+ # https://github.com/gnuradio/gnuradio/issues/3801
273273+ rm gr-blocks/python/blocks/qa_cpp_py_binding.py
274274+ rm gr-blocks/python/blocks/qa_cpp_py_binding_set.py
275275+ rm gr-blocks/python/blocks/qa_ctrlport_probes.py
276276+ '';
279277 patches = [
280278 # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
281279 ./modtool-newmod-permissions.patch
···303301 ${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
304302 ''
305303 ;
306306-}
304304+}))
+14-23
pkgs/applications/radio/gnuradio/default.nix
···4545# If one wishes to use a different src or name for a very custom build
4646, overrideSrc ? {}
4747, pname ? "gnuradio"
4848-, versionAttr ? {
4949- major = "3.10";
5050- minor = "7";
5151- patch = "0";
5252-}
4848+, version ? "3.10.7.0"
5349}:
54505551let
···252248 gr-zeromq = {
253249 runtime = [ cppzmq ];
254250 cmakeEnableFlag = "GR_ZEROMQ";
251251+ pythonRuntime = [
252252+ # Will compile without this, but it is required by tests, and by some
253253+ # gr blocks.
254254+ python.pkgs.pyzmq
255255+ ];
255256 };
256257 gr-network = {
257258 cmakeEnableFlag = "GR_NETWORK";
···271272 removeReferencesTo
272273 featuresInfo
273274 features
274274- versionAttr
275275+ version
275276 sourceSha256
276277 overrideSrc
277278 fetchFromGitHub
···279280 qt = qt5;
280281 gtk = gtk3;
281282 });
282282- inherit (shared) hasFeature; # function
283283+ inherit (shared.passthru) hasFeature; # function
283284in
284285285285-stdenv.mkDerivation {
286286- inherit pname;
287287- inherit (shared)
288288- version
289289- src
290290- nativeBuildInputs
291291- buildInputs
292292- cmakeFlags
293293- disallowedReferences
294294- stripDebugList
295295- doCheck
296296- dontWrapPythonPrograms
297297- dontWrapQtApps
298298- meta
299299- ;
286286+stdenv.mkDerivation (finalAttrs: (shared // {
287287+ inherit pname version;
288288+ # Will still evaluate correctly if not used here. It only helps nix-update
289289+ # find the right file in which version is defined.
290290+ inherit (shared) src;
300291 patches = [
301292 # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
302293 ./modtool-newmod-permissions.patch
···332323 ${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
333324 ''
334325 ;
335335-}
326326+}))
+23-15
pkgs/applications/radio/gnuradio/shared.nix
···55, removeReferencesTo
66, featuresInfo
77, features
88-, versionAttr
88+, version
99, sourceSha256
1010# If overridden. No need to set default values, as they are given defaults in
1111# the main expressions
···1313, fetchFromGitHub
1414}:
15151616-rec {
1717- version = builtins.concatStringsSep "." (
1818- lib.attrVals [ "major" "minor" "patch" ] versionAttr
1616+let
1717+ # Check if a feature is enabled, while defaulting to true if feat is not
1818+ # specified.
1919+ hasFeature = feat: (
2020+ if builtins.hasAttr feat features then
2121+ features.${feat}
2222+ else
2323+ true
1924 );
2525+ versionAttr = {
2626+ major = builtins.concatStringsSep "." (lib.take 2 (lib.splitVersion version));
2727+ minor = builtins.elemAt (lib.splitVersion version) 2;
2828+ patch = builtins.elemAt (lib.splitVersion version) 3;
2929+ };
3030+in {
2031 src = if overrideSrc != {} then
2132 overrideSrc
2233 else
···2738 sha256 = sourceSha256;
2839 }
2940 ;
3030- # Check if a feature is enabled, while defaulting to true if feat is not
3131- # specified.
3232- hasFeature = feat: (
3333- if builtins.hasAttr feat features then
3434- features.${feat}
3535- else
3636- true
3737- );
3841 nativeBuildInputs = lib.flatten (lib.mapAttrsToList (
3942 feat: info: (
4043 lib.optionals (hasFeature feat) (
···109112 # Wrapping is done with an external wrapper
110113 dontWrapPythonPrograms = true;
111114 dontWrapQtApps = true;
112112- # Tests should succeed, but it's hard to get LD_LIBRARY_PATH right in order
113113- # for it to happen.
114114- doCheck = false;
115115+ # On darwin, it requires playing with DYLD_FALLBACK_LIBRARY_PATH to make if
116116+ # find libgnuradio-runtim.3.*.dylib .
117117+ doCheck = !stdenv.isDarwin;
118118+ preCheck = ''
119119+ export HOME=$(mktemp -d)
120120+ export QT_QPA_PLATFORM=offscreen
121121+ export QT_PLUGIN_PATH="${qt.qtbase.bin}/${qt.qtbase.qtPluginPrefix}"
122122+ '';
115123116124 meta = with lib; {
117125 description = "Software Defined Radio (SDR) software";