diff options
Diffstat (limited to 'pkgs/applications/radio')
26 files changed, 242 insertions, 370 deletions
diff --git a/pkgs/applications/radio/cloudlog/default.nix b/pkgs/applications/radio/cloudlog/default.nix index b64771be55c..073909b80e5 100644 --- a/pkgs/applications/radio/cloudlog/default.nix +++ b/pkgs/applications/radio/cloudlog/default.nix @@ -8,16 +8,16 @@ stdenvNoCC.mkDerivation rec { pname = "cloudlog"; - version = "2.4.9"; + version = "2.5.0"; src = fetchFromGitHub { owner = "magicbug"; repo = "Cloudlog"; rev = version; - sha256 = "sha256-sygkddnSou1U2ZEwNhKvHCkFEl91pYSYOjbKPLqgGj4="; + hash = "sha256-4+aP+y7TNCq7zGOK3HCrl1NQOmpOHezfbL9B1vW2AUo="; }; - postPath = '' + postPatch = '' substituteInPlace index.php \ --replace "define('ENVIRONMENT', 'development');" "define('ENVIRONMENT', 'production');" ''; diff --git a/pkgs/applications/radio/csdr/default.nix b/pkgs/applications/radio/csdr/default.nix index 5f130c26658..3a5d85f9940 100644 --- a/pkgs/applications/radio/csdr/default.nix +++ b/pkgs/applications/radio/csdr/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "csdr"; - version = "0.18.1"; + version = "0.18.2"; src = fetchFromGitHub { owner = "jketterl"; repo = pname; rev = version; - sha256 = "sha256-Cmms+kQzTP+CMDRXCbtWuizosFe9FywLobjBOUA79O0="; + sha256 = "sha256-LdVzeTTIvDQIXRdcz/vpQu/fUgtE8nx1kIEfoiwxrUg="; }; nativeBuildInputs = [ diff --git a/pkgs/applications/radio/direwolf/default.nix b/pkgs/applications/radio/direwolf/default.nix index d3c01aff769..99503d5d036 100644 --- a/pkgs/applications/radio/direwolf/default.nix +++ b/pkgs/applications/radio/direwolf/default.nix @@ -1,26 +1,44 @@ -{ lib, stdenv, fetchFromGitHub, cmake, alsa-lib, espeak, gpsd -, hamlib, perl, python3, udev }: - -with lib; +{ lib +, stdenv +, fetchFromGitHub +, cmake +, alsa-lib +, gpsd +, gpsdSupport ? false +, hamlib +, hamlibSupport ? true +, perl +, portaudio +, python3 +, espeak +, udev +, extraScripts ? false +}: stdenv.mkDerivation rec { pname = "direwolf"; - version = "1.6"; + version = "1.7"; src = fetchFromGitHub { owner = "wb2osz"; repo = "direwolf"; rev = version; - sha256 = "0xmz64m02knbrpasfij4rrq53ksxna5idxwgabcw4n2b1ig7pyx5"; + hash = "sha256-Vbxc6a6CK+wrBfs15dtjfRa1LJDKKyHMrg8tqsF7EX4="; }; nativeBuildInputs = [ cmake ]; strictDeps = true; - buildInputs = [ - espeak gpsd hamlib perl python3 - ] ++ (optionals stdenv.isLinux [alsa-lib udev]); + buildInputs = lib.optionals stdenv.isLinux [ alsa-lib udev ] + ++ lib.optionals stdenv.isDarwin [ portaudio ] + ++ lib.optionals gpsdSupport [ gpsd ] + ++ lib.optionals hamlibSupport [ hamlib ] + ++ lib.optionals extraScripts [ python3 perl espeak ]; + + preConfigure = lib.optionals (!extraScripts) '' + echo "" > scripts/CMakeLists.txt + ''; postPatch = '' substituteInPlace conf/CMakeLists.txt \ @@ -31,21 +49,23 @@ stdenv.mkDerivation rec { substituteInPlace src/decode_aprs.c \ --replace /usr/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt \ --replace /opt/local/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt - patchShebangs scripts/dwespeak.sh - substituteInPlace scripts/dwespeak.sh \ - --replace espeak ${espeak}/bin/espeak substituteInPlace cmake/cpack/direwolf.desktop.in \ --replace 'Terminal=false' 'Terminal=true' \ --replace 'Exec=@APPLICATION_DESKTOP_EXEC@' 'Exec=direwolf' substituteInPlace src/dwgpsd.c \ --replace 'GPSD_API_MAJOR_VERSION > 11' 'GPSD_API_MAJOR_VERSION > 14' + '' + + lib.optionalString extraScripts '' + patchShebangs scripts/dwespeak.sh + substituteInPlace scripts/dwespeak.sh \ + --replace espeak ${espeak}/bin/espeak ''; - meta = { + meta = with lib; { description = "A Soundcard Packet TNC, APRS Digipeater, IGate, APRStt gateway"; homepage = "https://github.com/wb2osz/direwolf/"; license = licenses.gpl2; platforms = platforms.unix; - maintainers = with maintainers; [ lasandell ]; + maintainers = with maintainers; [ lasandell sarcasticadmin ]; }; } diff --git a/pkgs/applications/radio/ebook2cw/default.nix b/pkgs/applications/radio/ebook2cw/default.nix index 6c3fbc16c40..329d87d80f4 100644 --- a/pkgs/applications/radio/ebook2cw/default.nix +++ b/pkgs/applications/radio/ebook2cw/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Convert ebooks to Morse MP3s/OGGs"; - homepage = "http://fkurz.net/ham/ebook2cw.html"; + homepage = "https://fkurz.net/ham/ebook2cw.html"; license = licenses.gpl2; platforms = platforms.all; maintainers = with maintainers; [ earldouglas ]; diff --git a/pkgs/applications/radio/flamp/default.nix b/pkgs/applications/radio/flamp/default.nix index 8eb813af97b..483fbfc2911 100644 --- a/pkgs/applications/radio/flamp/default.nix +++ b/pkgs/applications/radio/flamp/default.nix @@ -10,12 +10,12 @@ stdenv.mkDerivation (finalAttrs: { pname = "flamp"; - version = "2.2.07"; + version = "2.2.09"; src = fetchgit { url = "https://git.code.sf.net/p/fldigi/flamp"; rev = "v${finalAttrs.version}"; - hash = "sha256-BnKL1iwaw1iJC5qcGCvdMr461n0BSYxk61dbAnhpz2c="; + hash = "sha256-ev+Ik/e1zQGTH4FeiCDPHbrcXlctencEo4R0+M2Kg+g="; }; nativeBuildInputs = [ diff --git a/pkgs/applications/radio/flrig/default.nix b/pkgs/applications/radio/flrig/default.nix index c2aa051e70f..e660f0c9da7 100644 --- a/pkgs/applications/radio/flrig/default.nix +++ b/pkgs/applications/radio/flrig/default.nix @@ -8,12 +8,12 @@ }: stdenv.mkDerivation rec { - version = "2.0.03"; + version = "2.0.04"; pname = "flrig"; src = fetchurl { url = "mirror://sourceforge/fldigi/${pname}-${version}.tar.gz"; - sha256 = "sha256-/5hOryoupl7MYWekx2hL3q+2GMXA6rohjvYy2XTkJBI="; + sha256 = "sha256-+AcQ7l1RXFDVVraYySBUE/+ZCyCOMiM2L4LyRXFquUc="; }; buildInputs = [ diff --git a/pkgs/applications/radio/fm-tune/default.nix b/pkgs/applications/radio/fm-tune/default.nix deleted file mode 100644 index 59c61dc4ed5..00000000000 --- a/pkgs/applications/radio/fm-tune/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, liquid-dsp, soapysdr }: - -stdenv.mkDerivation rec { - pname = "fm-tune"; - version = "1.1"; - - src = fetchFromGitHub { - owner = "viraptor"; - repo = "fm_tune"; - rev = version; - sha256 = "pwL2G1Ni1Ixw/N0diSoGGIoVrtmF92mWZ5i57OOvkX4="; - }; - - nativeBuildInputs = [ pkg-config ]; - - buildInputs = [ liquid-dsp soapysdr ]; - - meta = with lib; { - description = "Find initial calibration offset for SDR devices"; - longDescription = '' - fm_tune finds the initial offset for calibrating an SDR device. This is - based a given FM radio station frequency. The offset given by this tool is - not precise, but can be useful as a starting point for other tools which - cannot correct for very large errors. - ''; - homepage = "https://github.com/viraptor/fm_tune"; - license = licenses.asl20; - platforms = platforms.unix; - maintainers = with maintainers; [ viraptor ]; - mainProgram = "fm_tune"; - }; -} diff --git a/pkgs/applications/radio/freedv/default.nix b/pkgs/applications/radio/freedv/default.nix index cd4e69529eb..a337470664a 100644 --- a/pkgs/applications/radio/freedv/default.nix +++ b/pkgs/applications/radio/freedv/default.nix @@ -25,19 +25,21 @@ stdenv.mkDerivation rec { pname = "freedv"; - version = "1.9.2"; + version = "1.9.5"; src = fetchFromGitHub { owner = "drowe67"; repo = "freedv-gui"; rev = "v${version}"; - hash = "sha256-SBWwAmIsa9HfaZpH8TioMm9IaoZ+x4HNHaOBps0vA0A="; + hash = "sha256-uCWdDmHzNx1vkZFttQZLD4YfXoXz5VZQfir9sGOoDhw="; }; postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace CMakeLists.txt \ + --replace "-Wl,-ld_classic" "" substituteInPlace src/CMakeLists.txt \ --replace "\''${CMAKE_SOURCE_DIR}/macdylibbundler/dylibbundler" "dylibbundler" - sed -i "/hdiutil/d" src/CMakeLists.txt + sed -i "/codesign/d;/hdiutil/d" src/CMakeLists.txt ''; nativeBuildInputs = [ diff --git a/pkgs/applications/radio/gnuradio/3.8.nix b/pkgs/applications/radio/gnuradio/3.8.nix index e10d3df374e..3113915bce8 100644 --- a/pkgs/applications/radio/gnuradio/3.8.nix +++ b/pkgs/applications/radio/gnuradio/3.8.nix @@ -40,11 +40,7 @@ # If one wishes to use a different src or name for a very custom build , overrideSrc ? {} , pname ? "gnuradio" -, versionAttr ? { - major = "3.8"; - minor = "5"; - patch = "0"; -} +, version ? "3.8.5.0" }: let @@ -204,6 +200,11 @@ let gr-zeromq = { runtime = [ cppzmq ]; cmakeEnableFlag = "GR_ZEROMQ"; + pythonRuntime = [ + # Will compile without this, but it is required by tests, and by some + # gr blocks. + python.pkgs.pyzmq + ]; }; }; shared = (import ./shared.nix { @@ -214,7 +215,7 @@ let removeReferencesTo featuresInfo features - versionAttr + version sourceSha256 overrideSrc fetchFromGitHub @@ -222,23 +223,28 @@ let qt = qt5; gtk = gtk3; }); - inherit (shared) hasFeature; # function + inherit (shared.passthru) hasFeature; # function in -stdenv.mkDerivation { - inherit pname; - inherit (shared) - version - src - nativeBuildInputs - buildInputs - disallowedReferences - stripDebugList - doCheck - dontWrapPythonPrograms - dontWrapQtApps - meta - ; +stdenv.mkDerivation (finalAttrs: (shared // { + inherit pname version; + # Will still evaluate correctly if not used here. It only helps nix-update + # find the right file in which version is defined. + inherit (shared) src; + # Remove failing tests + preConfigure = (shared.preConfigure or "") + '' + # https://github.com/gnuradio/gnuradio/issues/3801 + rm gr-blocks/python/blocks/qa_cpp_py_binding.py + rm gr-blocks/python/blocks/qa_cpp_py_binding_set.py + rm gr-blocks/python/blocks/qa_ctrlport_probes.py + # Tests that fail due to numpy deprecations upstream hasn't accomodated to yet. + rm gr-fec/python/fec/qa_polar_decoder_sc.py + rm gr-fec/python/fec/qa_polar_decoder_sc_list.py + rm gr-fec/python/fec/qa_polar_decoder_sc_systematic.py + rm gr-fec/python/fec/qa_polar_encoder.py + rm gr-fec/python/fec/qa_polar_encoder_systematic.py + rm gr-filter/python/filter/qa_freq_xlating_fft_filter.py + ''; patches = [ # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227 ./modtool-newmod-permissions.3_8.patch @@ -291,4 +297,4 @@ stdenv.mkDerivation { ${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake '' ; -} +})) diff --git a/pkgs/applications/radio/gnuradio/3.9.nix b/pkgs/applications/radio/gnuradio/3.9.nix index a393cd5528d..4d10851b7e1 100644 --- a/pkgs/applications/radio/gnuradio/3.9.nix +++ b/pkgs/applications/radio/gnuradio/3.9.nix @@ -42,11 +42,7 @@ # If one wishes to use a different src or name for a very custom build , overrideSrc ? {} , pname ? "gnuradio" -, versionAttr ? { - major = "3.9"; - minor = "8"; - patch = "0"; -} +, version ? "3.9.8.0" }: let @@ -231,6 +227,11 @@ let gr-zeromq = { runtime = [ cppzmq ]; cmakeEnableFlag = "GR_ZEROMQ"; + pythonRuntime = [ + # Will compile without this, but it is required by tests, and by some + # gr blocks. + python.pkgs.pyzmq + ]; }; gr-network = { cmakeEnableFlag = "GR_NETWORK"; @@ -250,7 +251,7 @@ let removeReferencesTo featuresInfo features - versionAttr + version sourceSha256 overrideSrc fetchFromGitHub @@ -258,24 +259,21 @@ let qt = qt5; gtk = gtk3; }); - inherit (shared) hasFeature; # function + inherit (shared.passthru) hasFeature; # function in -stdenv.mkDerivation { - inherit pname; - inherit (shared) - version - src - nativeBuildInputs - buildInputs - cmakeFlags - disallowedReferences - stripDebugList - doCheck - dontWrapPythonPrograms - dontWrapQtApps - meta - ; +stdenv.mkDerivation (finalAttrs: (shared // { + inherit pname version; + # Will still evaluate correctly if not used here. It only helps nix-update + # find the right file in which version is defined. + inherit (shared) src; + # Remove failing tests + preConfigure = (shared.preConfigure or "") + '' + # https://github.com/gnuradio/gnuradio/issues/3801 + rm gr-blocks/python/blocks/qa_cpp_py_binding.py + rm gr-blocks/python/blocks/qa_cpp_py_binding_set.py + rm gr-blocks/python/blocks/qa_ctrlport_probes.py + ''; patches = [ # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227 ./modtool-newmod-permissions.patch @@ -303,4 +301,4 @@ stdenv.mkDerivation { ${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake '' ; -} +})) diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index a443aec5367..d1f0a3fd6fb 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -45,11 +45,7 @@ # If one wishes to use a different src or name for a very custom build , overrideSrc ? {} , pname ? "gnuradio" -, versionAttr ? { - major = "3.10"; - minor = "7"; - patch = "0"; -} +, version ? "3.10.7.0" }: let @@ -252,6 +248,11 @@ let gr-zeromq = { runtime = [ cppzmq ]; cmakeEnableFlag = "GR_ZEROMQ"; + pythonRuntime = [ + # Will compile without this, but it is required by tests, and by some + # gr blocks. + python.pkgs.pyzmq + ]; }; gr-network = { cmakeEnableFlag = "GR_NETWORK"; @@ -271,7 +272,7 @@ let removeReferencesTo featuresInfo features - versionAttr + version sourceSha256 overrideSrc fetchFromGitHub @@ -279,24 +280,14 @@ let qt = qt5; gtk = gtk3; }); - inherit (shared) hasFeature; # function + inherit (shared.passthru) hasFeature; # function in -stdenv.mkDerivation { - inherit pname; - inherit (shared) - version - src - nativeBuildInputs - buildInputs - cmakeFlags - disallowedReferences - stripDebugList - doCheck - dontWrapPythonPrograms - dontWrapQtApps - meta - ; +stdenv.mkDerivation (finalAttrs: (shared // { + inherit pname version; + # Will still evaluate correctly if not used here. It only helps nix-update + # find the right file in which version is defined. + inherit (shared) src; patches = [ # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227 ./modtool-newmod-permissions.patch @@ -332,4 +323,4 @@ stdenv.mkDerivation { ${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake '' ; -} +})) diff --git a/pkgs/applications/radio/gnuradio/shared.nix b/pkgs/applications/radio/gnuradio/shared.nix index bdbc22cb787..fbb4960dc8f 100644 --- a/pkgs/applications/radio/gnuradio/shared.nix +++ b/pkgs/applications/radio/gnuradio/shared.nix @@ -5,7 +5,7 @@ , removeReferencesTo , featuresInfo , features -, versionAttr +, version , sourceSha256 # If overridden. No need to set default values, as they are given defaults in # the main expressions @@ -13,10 +13,21 @@ , fetchFromGitHub }: -rec { - version = builtins.concatStringsSep "." ( - lib.attrVals [ "major" "minor" "patch" ] versionAttr +let + # Check if a feature is enabled, while defaulting to true if feat is not + # specified. + hasFeature = feat: ( + if builtins.hasAttr feat features then + features.${feat} + else + true ); + versionAttr = { + major = builtins.concatStringsSep "." (lib.take 2 (lib.splitVersion version)); + minor = builtins.elemAt (lib.splitVersion version) 2; + patch = builtins.elemAt (lib.splitVersion version) 3; + }; +in { src = if overrideSrc != {} then overrideSrc else @@ -27,14 +38,6 @@ rec { sha256 = sourceSha256; } ; - # Check if a feature is enabled, while defaulting to true if feat is not - # specified. - hasFeature = feat: ( - if builtins.hasAttr feat features then - features.${feat} - else - true - ); nativeBuildInputs = lib.flatten (lib.mapAttrsToList ( feat: info: ( lib.optionals (hasFeature feat) ( @@ -109,9 +112,14 @@ rec { # Wrapping is done with an external wrapper dontWrapPythonPrograms = true; dontWrapQtApps = true; - # Tests should succeed, but it's hard to get LD_LIBRARY_PATH right in order - # for it to happen. - doCheck = false; + # On darwin, it requires playing with DYLD_FALLBACK_LIBRARY_PATH to make if + # find libgnuradio-runtim.3.*.dylib . + doCheck = !stdenv.isDarwin; + preCheck = '' + export HOME=$(mktemp -d) + export QT_QPA_PLATFORM=offscreen + export QT_PLUGIN_PATH="${qt.qtbase.bin}/${qt.qtbase.qtPluginPrefix}" + ''; meta = with lib; { description = "Software Defined Radio (SDR) software"; diff --git a/pkgs/applications/radio/gqrx/default.nix b/pkgs/applications/radio/gqrx/default.nix index 1610d5e0f9f..dc8df168384 100644 --- a/pkgs/applications/radio/gqrx/default.nix +++ b/pkgs/applications/radio/gqrx/default.nix @@ -27,13 +27,13 @@ assert !(pulseaudioSupport && portaudioSupport); gnuradioMinimal.pkgs.mkDerivation rec { pname = "gqrx"; - version = "2.16"; + version = "2.17.3"; src = fetchFromGitHub { owner = "gqrx-sdr"; repo = "gqrx"; rev = "v${version}"; - hash = "sha256-14MVimOxM7upq6vpEhvVRnrverBuFToE2ktNhG59LKE="; + hash = "sha256-dHbDy/aIsqBQG1raeN9nM/QtiFgy+Qhoj/ThN8LV6gI="; }; nativeBuildInputs = [ diff --git a/pkgs/applications/radio/gridtracker/default.nix b/pkgs/applications/radio/gridtracker/default.nix index d909751969c..49e13f4ab08 100644 --- a/pkgs/applications/radio/gridtracker/default.nix +++ b/pkgs/applications/radio/gridtracker/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "gridtracker"; - version = "1.23.0402"; + version = "1.23.1112"; src = fetchFromGitLab { owner = "gridtracker.org"; repo = "gridtracker"; rev = "v${version}"; - sha256 = "sha256-6SQuFN8Fi0fbWCYrQIIeSaXR2haI7uux4txCPKEoJvo="; + sha256 = "sha256-0A1/P57RtUExxflr2XayHPEyr28B6UDYY7pVCAJpWX0="; }; nativeBuildInputs = [ wrapGAppsHook ]; diff --git a/pkgs/applications/radio/limesuite/default.nix b/pkgs/applications/radio/limesuite/default.nix index a08293c8ef7..c7f1891e2c5 100644 --- a/pkgs/applications/radio/limesuite/default.nix +++ b/pkgs/applications/radio/limesuite/default.nix @@ -1,5 +1,4 @@ { lib, stdenv, fetchFromGitHub, cmake -, fetchpatch , sqlite, wxGTK32, libusb1, soapysdr , mesa_glu, libX11, gnuplot, fltk , GLUT @@ -8,25 +7,15 @@ stdenv.mkDerivation rec { pname = "limesuite"; - version = "22.09.1"; + version = "23.10.0"; src = fetchFromGitHub { owner = "myriadrf"; repo = "LimeSuite"; rev = "v${version}"; - sha256 = "sha256-t3v2lhPZ1L/HRRBwA3k1KfIpih6R4TUmBWaIm8sVGdY="; + sha256 = "sha256-o58UNc4r+MQbH00727YTV17M7D29BbH8CgUXCORKk7E="; }; - patches = [ - # Pull gcc-13 fix pending upstream inclusion: - # https://github.com/myriadrf/LimeSuite/pull/384 - (fetchpatch { - name = "gcc-13.patch"; - url = "https://github.com/myriadrf/LimeSuite/commit/4ab51835d0fde4ffe6b7be2ac3dfa915e7d4d26e.patch"; - hash = "sha256-53nLeluMtTPXxchbpftPE8Z1QMyi0UKp+0nRF4ufUgo="; - }) - ]; - nativeBuildInputs = [ cmake ]; cmakeFlags = [ diff --git a/pkgs/applications/radio/multimon-ng/default.nix b/pkgs/applications/radio/multimon-ng/default.nix index ec26a7ddb9b..776313d4916 100644 --- a/pkgs/applications/radio/multimon-ng/default.nix +++ b/pkgs/applications/radio/multimon-ng/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "multimon-ng"; - version = "1.2.0"; + version = "1.3.0"; src = fetchFromGitHub { owner = "EliasOenal"; repo = "multimon-ng"; rev = version; - sha256 = "sha256-Qk9zg3aSrEfC16wQqL/EMG6MPobX8dnJ1OLH8EMap0I="; + sha256 = "sha256-IJnvOVajkcjaa0DDo8hbkkVvBnDqPKQUN8wJHlafo70="; }; buildInputs = lib.optionals stdenv.isLinux [ libpulseaudio libX11 ]; diff --git a/pkgs/applications/radio/pat/default.nix b/pkgs/applications/radio/pat/default.nix index 58eefd0dbcd..991df60b24b 100644 --- a/pkgs/applications/radio/pat/default.nix +++ b/pkgs/applications/radio/pat/default.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, buildGoModule, fetchFromGitHub }: +{ lib +, stdenv +, buildGoModule +, fetchFromGitHub +, libax25 +, installShellFiles +}: buildGoModule rec { pname = "pat"; @@ -15,10 +21,25 @@ buildGoModule rec { ldflags = [ "-s" "-w" ]; + nativeBuildInputs = [ + installShellFiles + ]; + + buildInputs = lib.optional stdenv.isLinux [ libax25 ]; + + # Needed by wl2k-go go module for libax25 to include support for Linux' AX.25 stack by linking against libax25. + # ref: https://github.com/la5nta/wl2k-go/blob/abe3ae5bf6a2eec670a21672d461d1c3e1d4c2f3/transport/ax25/ax25.go#L11-L17 + tags = lib.optionals stdenv.isLinux [ "libax25" ]; + + postInstall = '' + installManPage man/pat-configure.1 man/pat.1 + ''; + meta = with lib; { description = "Pat is a cross platform Winlink client written in Go."; homepage = "https://getpat.io/"; license = licenses.mit; - maintainers = with maintainers; [ dotemup ]; + maintainers = with maintainers; [ dotemup sarcasticadmin ]; + platforms = platforms.unix; }; } diff --git a/pkgs/applications/radio/qdmr/default.nix b/pkgs/applications/radio/qdmr/default.nix index 440c1c955ab..ed3fa1715f7 100644 --- a/pkgs/applications/radio/qdmr/default.nix +++ b/pkgs/applications/radio/qdmr/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { owner = "hmatuschek"; repo = "qdmr"; rev = "v${version}"; - sha256 = "sha256-YLGsKGcKIPd0ihd5IzlT71dYkxZfeH7BpnKQMEyY8dI="; + hash = "sha256-YLGsKGcKIPd0ihd5IzlT71dYkxZfeH7BpnKQMEyY8dI="; }; nativeBuildInputs = [ diff --git a/pkgs/applications/radio/sdrangel/default.nix b/pkgs/applications/radio/sdrangel/default.nix index 5cd8819445b..1a986b6b0d1 100644 --- a/pkgs/applications/radio/sdrangel/default.nix +++ b/pkgs/applications/radio/sdrangel/default.nix @@ -24,7 +24,7 @@ , libbladeRF , mbelib , ninja -, opencv3 +, opencv4 , pkg-config , qtcharts , qtdeclarative @@ -52,13 +52,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "sdrangel"; - version = "7.15.4"; + version = "7.17.0"; src = fetchFromGitHub { owner = "f4exb"; repo = "sdrangel"; rev = "v${finalAttrs.version}"; - hash = "sha256-oSFnoNmoXvdb5lpx/j3DVVhOfbsDZlGNZNcvud1w8Ks="; + hash = "sha256-v2ESMFAbsYbZVVIHlGCU01QPDorUZyLiUEhexr6zF5o="; }; nativeBuildInputs = [ @@ -90,7 +90,7 @@ stdenv.mkDerivation (finalAttrs: { libusb1 limesuite mbelib - opencv3 + opencv4 qtcharts qtdeclarative qtgamepad diff --git a/pkgs/applications/radio/soapysdr/default.nix b/pkgs/applications/radio/soapysdr/default.nix index 7e0c01c2f5f..ee03d67d598 100644 --- a/pkgs/applications/radio/soapysdr/default.nix +++ b/pkgs/applications/radio/soapysdr/default.nix @@ -51,9 +51,7 @@ stdenv.mkDerivation (finalAttrs: { python.pkgs.numpy ]; - cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" - ] ++ lib.optionals usePython [ + cmakeFlags = lib.optionals usePython [ "-DUSE_PYTHON_CONFIG=ON" ]; diff --git a/pkgs/applications/radio/tqsl/default.nix b/pkgs/applications/radio/tqsl/default.nix index 085706658af..a207ba2f146 100644 --- a/pkgs/applications/radio/tqsl/default.nix +++ b/pkgs/applications/radio/tqsl/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { openssl zlib lmdb - (curl.override { inherit openssl; }) + curl wxGTK32 ]; diff --git a/pkgs/applications/radio/uhd/3.5.nix b/pkgs/applications/radio/uhd/3.5.nix deleted file mode 100644 index 5f34597ea27..00000000000 --- a/pkgs/applications/radio/uhd/3.5.nix +++ /dev/null @@ -1,160 +0,0 @@ -{ lib -, stdenv -, fetchurl -, fetchFromGitHub -, cmake -, pkg-config -# See https://files.ettus.com/manual_archive/v3.15.0.0/html/page_build_guide.html for dependencies explanations -, boost -, enableLibuhd_C_api ? true -# requires numpy -, enableLibuhd_Python_api ? false -, python3 -, enableExamples ? false -, enableUtils ? false -, enableLiberio ? false -, liberio -, libusb1 -, enableDpdk ? false -, dpdk -# Devices -, enableOctoClock ? true -, enableMpmd ? true -, enableB100 ? true -, enableB200 ? true -, enableUsrp1 ? true -, enableUsrp2 ? true -, enableX300 ? true -, enableN230 ? true -, enableN300 ? true -, enableN320 ? true -, enableE300 ? true -, enableE320 ? true -}: - -let - onOffBool = b: if b then "ON" else "OFF"; - inherit (lib) optionals; -in - -stdenv.mkDerivation rec { - pname = "uhd"; - # UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz - # and xxx.yyy.zzz. Hrmpf... style keeps changing - version = "3.15.0.0"; - - src = fetchFromGitHub { - owner = "EttusResearch"; - repo = "uhd"; - rev = "v${version}"; - sha256 = "0jknln88a69fh244670nb7qrflbyv0vvdxfddb5g8ncpb6hcg8qf"; - }; - # Firmware images are downloaded (pre-built) from the respective release on Github - uhdImagesSrc = fetchurl { - url = "https://github.com/EttusResearch/uhd/releases/download/v${version}/uhd-images_${version}.tar.xz"; - sha256 = "1fir1a13ac07mqhm4sr34cixiqj2difxq0870qv1wr7a7cbfw6vp"; - }; - - cmakeFlags = [ - "-DENABLE_LIBUHD=ON" - "-DENABLE_USB=ON" - "-DENABLE_TESTS=ON" # This installs tests as well so we delete them via postPhases - "-DENABLE_EXAMPLES=${onOffBool enableExamples}" - "-DENABLE_UTILS=${onOffBool enableUtils}" - "-DENABLE_LIBUHD_C_API=${onOffBool enableLibuhd_C_api}" - "-DENABLE_LIBUHD_PYTHON_API=${onOffBool enableLibuhd_Python_api}" - "-DENABLE_LIBERIO=${onOffBool enableLiberio}" - "-DENABLE_DPDK=${onOffBool enableDpdk}" - # Devices - "-DENABLE_OCTOCLOCK=${onOffBool enableOctoClock}" - "-DENABLE_MPMD=${onOffBool enableMpmd}" - "-DENABLE_B100=${onOffBool enableB100}" - "-DENABLE_B200=${onOffBool enableB200}" - "-DENABLE_USRP1=${onOffBool enableUsrp1}" - "-DENABLE_USRP2=${onOffBool enableUsrp2}" - "-DENABLE_X300=${onOffBool enableX300}" - "-DENABLE_N230=${onOffBool enableN230}" - "-DENABLE_N300=${onOffBool enableN300}" - "-DENABLE_N320=${onOffBool enableN320}" - "-DENABLE_E300=${onOffBool enableE300}" - "-DENABLE_E320=${onOffBool enableE320}" - ] - # TODO: Check if this still needed - # ABI differences GCC 7.1 - # /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 - ++ [ (lib.optionalString stdenv.isAarch32 "-DCMAKE_CXX_FLAGS=-Wno-psabi") ] - ; - - # Python + mako are always required for the build itself but not necessary for runtime. - pythonEnv = python3.withPackages (ps: with ps; [ mako ] - ++ optionals (enableLibuhd_Python_api) [ numpy setuptools ] - ++ optionals (enableUtils) [ requests six ] - ); - - nativeBuildInputs = [ - cmake - pkg-config - ] - # If both enableLibuhd_Python_api and enableUtils are off, we don't need - # pythonEnv in buildInputs as it's a 'build' dependency and not a runtime - # dependency - ++ optionals (!enableLibuhd_Python_api && !enableUtils) [ pythonEnv ] - ; - buildInputs = [ - boost - libusb1 - ] - # However, if enableLibuhd_Python_api *or* enableUtils is on, we need - # pythonEnv for runtime as well. The utilities' runtime dependencies are - # handled at the environment - ++ optionals (enableLibuhd_Python_api || enableUtils) [ pythonEnv ] - ++ optionals (enableLiberio) [ liberio ] - ++ optionals (enableDpdk) [ dpdk ] - ; - - doCheck = true; - - # Build only the host software - preConfigure = "cd host"; - # TODO: Check if this still needed, perhaps relevant: - # https://files.ettus.com/manual_archive/v3.15.0.0/html/page_build_guide.html#build_instructions_unix_arm - patches = if stdenv.isAarch32 then ./neon.patch else null; - - postPhases = [ "installFirmware" "removeInstalledTests" ] - ++ optionals (enableUtils) [ "moveUdevRules" ] - ; - - # UHD expects images in `$CMAKE_INSTALL_PREFIX/share/uhd/images` - installFirmware = '' - mkdir -p "$out/share/uhd/images" - tar --strip-components=1 -xvf "${uhdImagesSrc}" -C "$out/share/uhd/images" - ''; - - # -DENABLE_TESTS=ON installs the tests, we don't need them in the output - removeInstalledTests = '' - rm -r $out/lib/uhd/tests - ''; - - # Moves the udev rules to the standard location, needed only if utils are - # enabled - moveUdevRules = '' - mkdir -p $out/lib/udev/rules.d - mv $out/lib/uhd/utils/uhd-usrp.rules $out/lib/udev/rules.d/ - ''; - - meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; - description = "USRP Hardware Driver (for Software Defined Radio)"; - longDescription = '' - The USRP Hardware Driver (UHD) software is the hardware driver for all - USRP (Universal Software Radio Peripheral) devices. - - USRP devices are designed and sold by Ettus Research, LLC and its parent - company, National Instruments. - ''; - homepage = "https://uhd.ettus.com/"; - license = licenses.gpl3Plus; - platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ bjornfor fpletz tomberek ]; - }; -} diff --git a/pkgs/applications/radio/uhd/default.nix b/pkgs/applications/radio/uhd/default.nix index 23c0a728586..c3f7b58fa1b 100644 --- a/pkgs/applications/radio/uhd/default.nix +++ b/pkgs/applications/radio/uhd/default.nix @@ -8,13 +8,19 @@ , boost , ncurses , enableCApi ? true -# requires numpy +# Although we handle the Python API's dependencies in pythonEnvArg, this +# feature is currently disabled as upstream attempts to run `python setup.py +# install` by itself, and it fails because the Python's environment's prefix is +# not a writable directly. Adding support for this feature would require using +# python's pypa/build nad pypa/install hooks directly, and currently it is hard +# to do that because it all happens after a long buildPhase of the C API. , enablePythonApi ? false , python3 , buildPackages , enableExamples ? false -, enableUtils ? false +, enableUtils ? true , libusb1 +# Disable dpdk for now due to compilation issues. , enableDpdk ? false , dpdk # Devices @@ -43,9 +49,11 @@ in stdenv.mkDerivation (finalAttrs: { pname = "uhd"; - # UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz - # and xxx.yyy.zzz. Hrmpf... style keeps changing - version = "4.4.0.0"; + # NOTE: Use the following command to update the package, and the uhdImageSrc attribute: + # + # nix-shell maintainers/scripts/update.nix --argstr package uhd --argstr commit true + # + version = "4.6.0.0"; outputs = [ "out" "dev" ]; @@ -53,14 +61,24 @@ stdenv.mkDerivation (finalAttrs: { owner = "EttusResearch"; repo = "uhd"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-khVOHlvacZc4EMg4m55rxEqPvLY1xURpAfOW905/3jg="; + # The updateScript relies on the `src` using `hash`, and not `sha256. To + # update the correct hash for the `src` vs the `uhdImagesSrc` + hash = "sha256-9ZGt0ZrGbprCmpAuOue6pg2gliu4MvlRFHGxyMJeKAc="; }; # Firmware images are downloaded (pre-built) from the respective release on Github uhdImagesSrc = fetchurl { url = "https://github.com/EttusResearch/uhd/releases/download/v${finalAttrs.version}/uhd-images_${finalAttrs.version}.tar.xz"; - sha256 = "V8ldW8bvYWbrDAvpWpHcMeLf9YvF8PIruDAyNK/bru4="; + # Please don't convert this to a hash, in base64, see comment near src's + # hash. + sha256 = "17g503mhndaabrdl7qai3rdbafr8xx8awsyr7h2bdzwzprzmh4m3"; + }; + passthru = { + updateScript = [ + ./update.sh + # Pass it this file name as argument + (builtins.unsafeGetAttrPos "pname" finalAttrs.finalPackage).file + ]; }; - # TODO: Add passthru.updateScript that will update both of the above hashes... cmakeFlags = [ "-DENABLE_LIBUHD=ON" @@ -123,7 +141,7 @@ stdenv.mkDerivation (finalAttrs: { ]; postPhases = [ "installFirmware" "removeInstalledTests" ] - ++ optionals (enableUtils && stdenv.targetPlatform.isLinux) [ "moveUdevRules" ] + ++ optionals (enableUtils && stdenv.hostPlatform.isLinux) [ "moveUdevRules" ] ; # UHD expects images in `$CMAKE_INSTALL_PREFIX/share/uhd/images` @@ -144,6 +162,10 @@ stdenv.mkDerivation (finalAttrs: { mv $out/lib/uhd/utils/uhd-usrp.rules $out/lib/udev/rules.d/ ''; + disallowedReferences = optionals (!enablePythonApi && !enableUtils) [ + python3 + ]; + meta = with lib; { description = "USRP Hardware Driver (for Software Defined Radio)"; longDescription = '' diff --git a/pkgs/applications/radio/uhd/update.sh b/pkgs/applications/radio/uhd/update.sh new file mode 100755 index 00000000000..e52fb059041 --- /dev/null +++ b/pkgs/applications/radio/uhd/update.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p jq nix nix-prefetch-github + +set -euo pipefail +echoerr() { echo "$@" 1>&2; } + +fname="$1" +echoerr got fname $fname +shift +latest_release=$(curl --silent https://api.github.com/repos/EttusResearch/uhd/releases/latest) +version=$(jq -r '.tag_name' <<<"$latest_release" | cut -c2-) +# Update version, if needed +if grep -q 'version = "'$version $fname; then + echoerr Current version $version is the latest available + exit 0; +fi +echoerr got version $version +sed -i -E 's/(version = ").*(";)/\1'$version'\2/g' $fname +# Verify the sed command above did not fail +grep -q $version $fname +# Update srcHash +srcHash="$(nix-prefetch-github EttusResearch uhd --rev v${version} | jq --raw-output .hash)" +sed -i -E 's#(hash = ").*(";)#\1'$srcHash'\2#g' $fname +grep -q $srcHash $fname +imageHash="$(nix-prefetch-url https://github.com/EttusResearch/uhd/releases/download/v${version}/uhd-images_${version}.tar.xz)" +sed -i -E 's#(sha256 = ").*(";)#\1'$imageHash'\2#g' $fname +grep -q $imageHash $fname diff --git a/pkgs/applications/radio/wsjtx/default.nix b/pkgs/applications/radio/wsjtx/default.nix index 00cc0eaca12..23fb34db0e3 100644 --- a/pkgs/applications/radio/wsjtx/default.nix +++ b/pkgs/applications/radio/wsjtx/default.nix @@ -1,27 +1,22 @@ -{ lib, stdenv, fetchurl, asciidoc, asciidoctor, autoconf, automake, cmake, - docbook_xsl, fftw, fftwFloat, gfortran, libtool, libusb1, qtbase, +{ lib, stdenv, fetchgit, asciidoc, asciidoctor, cmake, pkg-config, + fftw, fftwFloat, gfortran, hamlib_4, libtool, libusb1, qtbase, qtmultimedia, qtserialport, qttools, boost, texinfo, wrapQtAppsHook }: stdenv.mkDerivation rec { pname = "wsjtx"; version = "2.6.1"; - # This is a "superbuild" tarball containing both wsjtx and a hamlib fork - src = fetchurl { - url = "https://sourceforge.net/projects/wsjt/files/wsjtx-${version}/wsjtx-${version}.tgz"; - sha256 = "sha256-YNDiy0WkmmrVhbCQiCGp/yw6wlZNYQQmIP82wt3Mdl8="; + src = fetchgit { + url = "http://git.code.sf.net/p/wsjt/wsjtx"; + rev = "wsjtx-${version}"; + hash = "sha256-fELx3B9JqCCL5vaIHab3of5ah9qdu5lemqjUnvY5DdM="; }; - # Hamlib builds with autotools, wsjtx builds with cmake - # Omitting pkg-config because it causes issues locating the built hamlib nativeBuildInputs = [ - asciidoc asciidoctor autoconf automake cmake docbook_xsl gfortran libtool - qttools texinfo wrapQtAppsHook + asciidoc asciidoctor cmake gfortran libtool + pkg-config qttools texinfo wrapQtAppsHook ]; - buildInputs = [ fftw fftwFloat libusb1 qtbase qtmultimedia qtserialport boost ]; - - # Remove Git dependency from superbuild since sources are included - patches = [ ./super.patch ]; + buildInputs = [ fftw fftwFloat hamlib_4 libusb1 qtbase qtmultimedia qtserialport boost ]; meta = with lib; { description = "Weak-signal digital communication modes for amateur radio"; @@ -33,9 +28,8 @@ stdenv.mkDerivation rec { contacts under extreme weak-signal conditions. ''; homepage = "https://physics.princeton.edu/pulsar/k1jt/wsjtx.html"; - # Older licenses are for the statically-linked hamlib - license = with licenses; [ gpl3Plus gpl2Plus lgpl21Plus ]; + license = with licenses; [ gpl3Plus ]; platforms = platforms.linux; - maintainers = with maintainers; [ lasandell numinit ]; + maintainers = with maintainers; [ lasandell numinit melling ]; }; } diff --git a/pkgs/applications/radio/wsjtx/super.patch b/pkgs/applications/radio/wsjtx/super.patch deleted file mode 100644 index 2d72fcddf0d..00000000000 --- a/pkgs/applications/radio/wsjtx/super.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 84fa38a..87e31bb 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -24,7 +24,6 @@ source tarball." ) - # - # Find_library (USB_LIBRARY NAMES libusb.a usb) - Find_program (PATCH_EXECUTABLE patch REQUIRED) --Find_package (Git REQUIRED) - - # - # extra C flags to minimize hamlib excutable sizes |