push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,110 @@
{
lib,
stdenv,
fetchFromGitHub,
fpc,
lazarus,
atk,
cairo,
gdk-pixbuf,
glib,
gtk2-x11,
libX11,
pango,
hamlib,
mariadb,
tqsl,
xdg-utils,
xplanet,
autoPatchelfHook,
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
pname = "cqrlog";
version = "2.5.2";
src = fetchFromGitHub {
owner = "ok2cqr";
repo = "cqrlog";
rev = "v${version}";
sha256 = "0zzcg0bl6mq4wfifj998x9x09w8sigbh46synpqx034fpr0swyhb";
};
# Adds the possibility to change the lazarus directory,
# otherwise, we would get error : "directory lcl not found"
patches = [ ./fix-makefile-lazarusdir.patch ];
postPatch = ''
substituteInPlace Makefile \
--replace @Lazarusdir@ "${lazarus}/share/lazarus" \
--replace /usr ""
substituteInPlace src/fTRXControl.pas \
--replace "/usr/bin/rigctld" "${hamlib}/bin/rigctld"
substituteInPlace src/fCallAttachment.pas \
--replace "/usr/bin/xdg-open" "${xdg-utils}/bin/xdg-open"
substituteInPlace src/fRotControl.pas \
--replace "/usr/bin/rotctld" "${hamlib}/bin/rotctld"
substituteInPlace src/fPreferences.pas \
--replace "/usr/bin/rigctld" "${hamlib}/bin/rigctld" \
--replace "/usr/bin/rotctld" "${hamlib}/bin/rotctld" \
--replace "/usr/bin/xplanet" "${xplanet}/bin/xplanet"
substituteInPlace src/fLoTWExport.pas \
--replace "/usr/bin/tqsl" "${tqsl}/bin/tqsl"
substituteInPlace src/dUtils.pas \
--replace "/usr/bin/xplanet" "${xplanet}/bin/xplanet" \
--replace "/usr/bin/rigctld" "${hamlib}/bin/rigctld"
# Order is important
substituteInPlace src/dData.pas \
--replace "/usr/bin/mysqld_safe" "${mariadb}/bin/mysqld_safe" \
--replace "/usr/bin/mysqld" "${mariadb}/bin/mysqld"
# To be fail when I need to patch a new hardcoded binary
! grep -C src -RC0 "/usr"
'';
nativeBuildInputs = [
lazarus
fpc
autoPatchelfHook
wrapGAppsHook3
];
buildInputs = [
atk
cairo
gdk-pixbuf
glib
gtk2-x11
libX11
pango
];
propagatedBuildInputs = [
hamlib
mariadb
tqsl
xdg-utils
xplanet
];
makeFlags = [
"FPC=fpc"
"PP=fpc"
"DESTDIR=$(out)"
];
postFixup = ''
libmysqlclient=$(find "${mariadb.client}/lib" -name "libmysqlclient.so" | tail -n1)
patchelf --add-needed "libmysqlclient.so" \
--add-rpath "$(dirname "$libmysqlclient")" \
"$out/bin/.cqrlog-wrapped"
'';
meta = with lib; {
description = "Linux logging program for amateur radio operators";
mainProgram = "cqrlog";
homepage = "https://www.cqrlog.com/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ shamilton ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,13 @@
Seulement dans b: logs
diff --color -ur a/Makefile b/Makefile
--- a/Makefile 2021-02-15 17:07:14.333810200 +0100
+++ b/Makefile 2021-02-15 17:19:18.599426984 +0100
@@ -6,7 +6,7 @@
tmpdir = /tmp
cqrlog: src/cqrlog.lpi
- $(CC) --ws=gtk2 --pcp=$(tmpdir)/.lazarus src/cqrlog.lpi
+ $(CC) --ws=gtk2 --pcp=$(tmpdir)/.lazarus --lazarusdir=@Lazarusdir@ src/cqrlog.lpi
$(ST) src/cqrlog
gzip tools/cqrlog.1 -c > tools/cqrlog.1.gz

View File

@@ -0,0 +1,89 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
alsa-lib,
gpsd,
gpsdSupport ? false,
hamlib,
hamlibSupport ? true,
perl,
portaudio,
python3,
espeak,
udev,
udevCheckHook,
extraScripts ? false,
}:
stdenv.mkDerivation rec {
pname = "direwolf";
version = "1.7";
src = fetchFromGitHub {
owner = "wb2osz";
repo = "direwolf";
rev = version;
hash = "sha256-Vbxc6a6CK+wrBfs15dtjfRa1LJDKKyHMrg8tqsF7EX4=";
};
nativeBuildInputs = [
cmake
udevCheckHook
];
strictDeps = true;
buildInputs =
lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
udev
]
++ lib.optionals stdenv.hostPlatform.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 \
--replace /etc/udev/rules.d/ $out/lib/udev/rules.d/
substituteInPlace src/symbols.c \
--replace /usr/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt \
--replace /opt/local/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt
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
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
'';
doInstallCheck = true;
meta = with lib; {
description = "Soundcard Packet TNC, APRS Digipeater, IGate, APRStt gateway";
homepage = "https://github.com/wb2osz/direwolf/";
license = licenses.gpl2;
platforms = platforms.unix;
maintainers = with maintainers; [
lasandell
sarcasticadmin
];
};
}

View File

@@ -0,0 +1,62 @@
{
lib,
stdenv,
fetchurl,
hamlib,
fltk13,
libjpeg,
libpng,
portaudio,
libsndfile,
libsamplerate,
libpulseaudio,
libXinerama,
gettext,
pkg-config,
alsa-lib,
udev,
}:
stdenv.mkDerivation rec {
pname = "fldigi";
version = "4.2.09";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
hash = "sha256-L+gj4DQyEOhPYAgOQuMtKf9RLzHJ4ACUHvGJcXDiLDc=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libXinerama
gettext
hamlib
fltk13
libjpeg
libpng
portaudio
libsndfile
libsamplerate
]
++ lib.optionals (stdenv.hostPlatform.isLinux) [
libpulseaudio
alsa-lib
udev
];
env.CXXFLAGS = lib.optionalString stdenv.cc.isClang "-std=c++14";
enableParallelBuilding = true;
meta = with lib; {
description = "Digital modem program";
homepage = "https://sourceforge.net/projects/fldigi/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [
relrod
ftrvxmtrx
];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,347 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
# Remove gcc and python references
removeReferencesTo,
pkg-config,
volk,
cppunit,
orc,
boost,
spdlog,
mpir,
doxygen,
python,
codec2,
gsm,
fftwFloat,
alsa-lib,
libjack2,
libiio,
libad9361,
uhd,
SDL,
gsl,
soapysdr,
libsodium,
libsndfile,
libunwind,
thrift,
cppzmq,
# Needed only if qt-gui is disabled, from some reason
icu,
# GUI related
gtk3,
pango,
gobject-introspection,
cairo,
qt5,
libsForQt5,
# Features available to override, the list of them is in featuresInfo. They
# are all turned on by default.
features ? { },
# If one wishes to use a different src or name for a very custom build
overrideSrc ? { },
pname ? "gnuradio",
version ? "3.10.12.0",
}:
let
sourceSha256 = "sha256-489Pc6z6Ha7jkTzZSEArDQJGkWdWRDIn1uhfFyLLiCo=";
featuresInfo = {
# Needed always
basic = {
native = [
cmake
pkg-config
orc
];
runtime = [
volk
boost
spdlog
mpir
]
# when gr-qtgui is disabled, icu needs to be included, otherwise
# building with boost 1.7x fails
++ lib.optionals (!(hasFeature "gr-qtgui")) [ icu ];
pythonNative = with python.pythonOnBuildForHost.pkgs; [
mako
six
];
};
doxygen = {
native = [ doxygen ];
cmakeEnableFlag = "DOXYGEN";
};
man-pages = {
cmakeEnableFlag = "MANPAGES";
};
python-support = {
pythonRuntime = [ python.pkgs.six ];
native = [
python
];
cmakeEnableFlag = "PYTHON";
};
testing-support = {
native = [ cppunit ];
cmakeEnableFlag = "TESTING";
};
post-install = {
cmakeEnableFlag = "POSTINSTALL";
};
gnuradio-runtime = {
cmakeEnableFlag = "GNURADIO_RUNTIME";
pythonRuntime = [
python.pkgs.pybind11
];
};
gr-ctrlport = {
runtime = [
libunwind
thrift
];
pythonRuntime = [
python.pkgs.thrift
# For gr-perf-monitorx
python.pkgs.matplotlib
python.pkgs.networkx
];
cmakeEnableFlag = "GR_CTRLPORT";
};
gnuradio-companion = {
pythonRuntime = with python.pkgs; [
pyyaml
mako
numpy
pygobject3
];
native = [
python.pkgs.pytest
];
runtime = [
gtk3
pango
gobject-introspection
cairo
libsndfile
];
cmakeEnableFlag = "GRC";
};
jsonyaml_blocks = {
pythonRuntime = [
python.pkgs.jsonschema
];
cmakeEnableFlag = "JSONYAML_BLOCKS";
};
gr-blocks = {
cmakeEnableFlag = "GR_BLOCKS";
runtime = [
# Required to compile wavfile blocks.
libsndfile
];
};
gr-fec = {
cmakeEnableFlag = "GR_FEC";
};
gr-fft = {
runtime = [ fftwFloat ];
cmakeEnableFlag = "GR_FFT";
};
gr-filter = {
runtime = [ fftwFloat ];
cmakeEnableFlag = "GR_FILTER";
pythonRuntime = with python.pkgs; [
scipy
pyqtgraph
pyqt5
];
};
gr-analog = {
cmakeEnableFlag = "GR_ANALOG";
};
gr-digital = {
cmakeEnableFlag = "GR_DIGITAL";
};
gr-dtv = {
cmakeEnableFlag = "GR_DTV";
};
gr-audio = {
runtime =
[ ]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libjack2
];
cmakeEnableFlag = "GR_AUDIO";
};
gr-channels = {
cmakeEnableFlag = "GR_CHANNELS";
};
gr-pdu = {
cmakeEnableFlag = "GR_PDU";
runtime = [
libiio
libad9361
];
};
gr-iio = {
cmakeEnableFlag = "GR_IIO";
runtime = [
libiio
];
};
common-precompiled-headers = {
cmakeEnableFlag = "COMMON_PCH";
};
gr-qtgui = {
runtime = [
qt5.qtbase
libsForQt5.qwt
];
pythonRuntime = [ python.pkgs.pyqt5 ];
cmakeEnableFlag = "GR_QTGUI";
};
gr-trellis = {
cmakeEnableFlag = "GR_TRELLIS";
};
gr-uhd = {
runtime = [
uhd
];
cmakeEnableFlag = "GR_UHD";
};
gr-uhd-rfnoc = {
runtime = [
uhd
];
cmakeEnableFlag = "UHD_RFNOC";
};
gr-utils = {
cmakeEnableFlag = "GR_UTILS";
pythonRuntime = with python.pkgs; [
# For gr_plot
matplotlib
];
};
gr-modtool = {
pythonRuntime = with python.pkgs; [
setuptools
click
click-plugins
pygccxml
];
cmakeEnableFlag = "GR_MODTOOL";
};
gr-blocktool = {
cmakeEnableFlag = "GR_BLOCKTOOL";
};
gr-video-sdl = {
runtime = [ SDL ];
cmakeEnableFlag = "GR_VIDEO_SDL";
};
gr-vocoder = {
runtime = [
codec2
gsm
];
cmakeEnableFlag = "GR_VOCODER";
};
gr-wavelet = {
cmakeEnableFlag = "GR_WAVELET";
runtime = [
gsl
libsodium
];
};
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";
};
gr-soapy = {
cmakeEnableFlag = "GR_SOAPY";
runtime = [
soapysdr
];
};
};
shared = (
import ./shared.nix {
inherit
stdenv
lib
python
removeReferencesTo
featuresInfo
features
version
sourceSha256
overrideSrc
fetchFromGitHub
;
qt = qt5;
gtk = gtk3;
}
);
inherit (shared.passthru) hasFeature; # function
in
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
];
passthru =
shared.passthru
// {
# Deps that are potentially overridden and are used inside GR plugins - the same version must
inherit
boost
volk
;
# Used by many gnuradio modules, the same attribute is present in
# previous gnuradio versions where there it's log4cpp.
logLib = spdlog;
}
// lib.optionalAttrs (hasFeature "gr-uhd") {
inherit uhd;
}
// lib.optionalAttrs (hasFeature "gr-pdu") {
inherit libiio libad9361;
}
// lib.optionalAttrs (hasFeature "gr-qtgui") {
inherit (libsForQt5) qwt;
};
postInstall =
shared.postInstall
# This is the only python reference worth removing, if needed.
+ lib.optionalString (!hasFeature "python-support") ''
remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
''
+ lib.optionalString (!hasFeature "python-support" && hasFeature "gnuradio-runtime") ''
remove-references-to -t ${python} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
'';
}
)
)

View File

@@ -0,0 +1,15 @@
diff --git i/gr-utils/modtool/core/newmod.py w/gr-utils/modtool/core/newmod.py
index 8b222473f..c82fcd538 100644
--- i/gr-utils/modtool/core/newmod.py
+++ w/gr-utils/modtool/core/newmod.py
@@ -66,7 +66,9 @@ class ModToolNewModule(ModTool):
self._setup_scm(mode='new')
logger.info(f"Creating out-of-tree module in {self.dir}...")
try:
- shutil.copytree(self.srcdir, self.dir)
+ # https://stackoverflow.com/a/17022146/4935114
+ shutil.copystat = lambda x, y: x
+ shutil.copytree(self.srcdir, self.dir, copy_function=shutil.copyfile)
source_dir = os.path.join(gr.prefix(), "share", "gnuradio")
for source_name, target_name in (
("clang-format.conf", ".clang-format"),

View File

@@ -0,0 +1,161 @@
{
lib,
stdenv,
python,
qt,
gtk,
removeReferencesTo,
featuresInfo,
features,
version,
sourceSha256,
# If overridden. No need to set default values, as they are given defaults in
# the main expressions
overrideSrc,
fetchFromGitHub,
}:
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;
};
cross = stdenv.hostPlatform != stdenv.buildPlatform;
in
{
src =
if overrideSrc != { } then
overrideSrc
else
fetchFromGitHub {
repo = "gnuradio";
owner = "gnuradio";
rev = "v${version}";
sha256 = sourceSha256;
};
nativeBuildInputs = [
removeReferencesTo
]
++ lib.flatten (
lib.mapAttrsToList (
feat: info:
(lib.optionals (hasFeature feat) (
(lib.optionals (builtins.hasAttr "native" info) info.native)
++ (lib.optionals (builtins.hasAttr "pythonNative" info) info.pythonNative)
))
) featuresInfo
);
buildInputs = lib.flatten (
lib.mapAttrsToList (
feat: info:
(lib.optionals (hasFeature feat) (
(lib.optionals (builtins.hasAttr "runtime" info) info.runtime)
++ (lib.optionals (
builtins.hasAttr "pythonRuntime" info && hasFeature "python-support"
) info.pythonRuntime)
))
) featuresInfo
);
cmakeFlags = [
# https://pybind11.readthedocs.io/en/stable/changelog.html#version-2-13-0-june-25-2024
(lib.cmakeBool "CMAKE_CROSSCOMPILING" cross)
(lib.cmakeBool "PYBIND11_USE_CROSSCOMPILING" (cross && hasFeature "gnuradio-runtime"))
]
++ lib.mapAttrsToList (
feat: info:
(
if feat == "basic" then
# Abuse this unavoidable "iteration" to set this flag which we want as
# well - it means: Don't turn on features just because their deps are
# satisfied, let only our cmakeFlags decide.
(lib.cmakeBool "ENABLE_DEFAULT" false)
else
(lib.cmakeBool "ENABLE_${info.cmakeEnableFlag}" (hasFeature feat))
)
) featuresInfo;
disallowedReferences = [
stdenv.cc
stdenv.cc.cc
]
# If python-support is disabled, we probably don't want it referenced
++ lib.optionals (!hasFeature "python-support") [ python ];
# Gcc references from examples
stripDebugList = [
"lib"
"bin"
]
++ lib.optionals (hasFeature "gr-audio") [ "share/gnuradio/examples/audio" ]
++ lib.optionals (hasFeature "gr-uhd") [ "share/gnuradio/examples/uhd" ]
++ lib.optionals (hasFeature "gr-qtgui") [ "share/gnuradio/examples/qt-gui" ];
postInstall =
""
# Gcc references
+ lib.optionalString (hasFeature "gnuradio-runtime") ''
remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
''
# Clang references in InstalledDir
+ lib.optionalString (hasFeature "gnuradio-runtime" && stdenv.hostPlatform.isDarwin) ''
remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
'';
# NOTE: Outputs are disabled due to upstream not using GNU InstallDIrs cmake
# module. It's not that bad since it's a development package for most
# purposes. If closure size needs to be reduced, features should be disabled
# via an override.
passthru = {
inherit
hasFeature
versionAttr
features
featuresInfo
python
;
gnuradioOlder = lib.versionOlder versionAttr.major;
gnuradioAtLeast = lib.versionAtLeast versionAttr.major;
}
// lib.optionalAttrs (hasFeature "gr-qtgui") {
inherit qt;
}
// lib.optionalAttrs (hasFeature "gnuradio-companion") {
inherit gtk;
};
# Wrapping is done with an external wrapper
dontWrapPythonPrograms = true;
dontWrapQtApps = true;
# On darwin, it requires playing with DYLD_FALLBACK_LIBRARY_PATH to make if
# find libgnuradio-runtim.3.*.dylib .
doCheck = !stdenv.hostPlatform.isDarwin;
preCheck = ''
export HOME=$(mktemp -d)
export QT_QPA_PLATFORM=offscreen
''
+ lib.optionalString (hasFeature "gr-qtgui") ''
export QT_PLUGIN_PATH="${qt.qtbase.bin}/${qt.qtbase.qtPluginPrefix}"
'';
meta = {
description = "Software Defined Radio (SDR) software";
mainProgram = "gnuradio-config-info";
longDescription = ''
GNU Radio is a free & open-source software development toolkit that
provides signal processing blocks to implement software radios. It can be
used with readily-available low-cost external RF hardware to create
software-defined radios, or without hardware in a simulation-like
environment. It is widely used in hobbyist, academic and commercial
environments to support both wireless communications research and
real-world radio systems.
'';
homepage = "https://www.gnuradio.org";
license = lib.licenses.gpl3;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
doronbehar
bjornfor
fpletz
jiegec
];
};
}

View File

@@ -0,0 +1,255 @@
{
lib,
stdenv,
# The unwrapped gnuradio derivation
unwrapped,
# If it's a minimal build, we don't want to wrap it with lndir and
# wrapProgram..
doWrap ? true,
# For the wrapper
makeWrapper,
# For lndir
xorg,
# To define a the gnuradio.pkgs scope
newScope,
# For Emulating wrapGAppsHook3
gsettings-desktop-schemas,
glib,
hicolor-icon-theme,
pango,
json-glib,
dconf,
gobject-introspection,
librsvg,
gdk-pixbuf,
harfbuzz,
at-spi2-core,
atk,
# For Adding additional GRC blocks
extraPackages ? [ ],
# For Adding additional python packaages
extraPythonPackages ? [ ],
soapysdr, # For it's passthru.searchPath
# soapysdr plugins we add by default. Ideally, we should have a
# soapysdrPackages = soapysdr.pkgs attribute set, but until now this wasn't
# crucial.
soapyairspy,
soapyaudio,
soapybladerf,
soapyhackrf,
soapyplutosdr,
soapyremote,
soapyrtlsdr,
soapyuhd,
# For adding / changing soapysdr packages, like soapsdr-with-plugins does
extraSoapySdrPackages ? [
soapyairspy
soapyaudio
soapybladerf
soapyhackrf
soapyplutosdr
soapyremote
soapyrtlsdr
soapyuhd
],
# Allow to add whatever you want to the wrapper
extraMakeWrapperArgs ? [ ],
}:
let
# We don't check if `python-support` feature is on, as it's unlikely someone
# may wish to wrap GR without python support.
pythonPkgs =
extraPythonPackages
++ [ (unwrapped.python.pkgs.toPythonModule unwrapped) ]
++ unwrapped.passthru.uhd.pythonPath
++ lib.optionals (unwrapped.passthru.uhd.pythonPath != [ ]) [
(unwrapped.python.pkgs.toPythonModule unwrapped.passthru.uhd)
]
# Add the extraPackages as python modules as well
++ (map unwrapped.python.pkgs.toPythonModule extraPackages)
++ lib.flatten (
lib.mapAttrsToList (
feat: info:
(lib.optionals (
(unwrapped.hasFeature feat) && (builtins.hasAttr "pythonRuntime" info)
) info.pythonRuntime)
) unwrapped.featuresInfo
);
pythonEnv = unwrapped.python.withPackages (ps: pythonPkgs);
pname = unwrapped.pname + "-wrapped";
inherit (unwrapped) version;
makeWrapperArgs = builtins.concatStringsSep " " (
[
]
# Emulating wrapGAppsHook3 & wrapQtAppsHook working together
++
lib.optionals ((unwrapped.hasFeature "gnuradio-companion") || (unwrapped.hasFeature "gr-qtgui"))
[
"--prefix"
"XDG_DATA_DIRS"
":"
"$out/share"
"--prefix"
"XDG_DATA_DIRS"
":"
"$out/share/gsettings-schemas/${pname}"
"--prefix"
"XDG_DATA_DIRS"
":"
"${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}"
"--prefix"
"XDG_DATA_DIRS"
":"
"${hicolor-icon-theme}/share"
# Needs to run `gsettings` on startup, see:
# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1764890.html
"--prefix"
"PATH"
":"
"${lib.getBin glib}/bin"
]
++ lib.optionals (unwrapped.hasFeature "gnuradio-companion") [
"--set"
"GDK_PIXBUF_MODULE_FILE"
"${librsvg}/${gdk-pixbuf.moduleDir}.cache"
"--prefix"
"GIO_EXTRA_MODULES"
":"
"${lib.getLib dconf}/lib/gio/modules"
"--prefix"
"XDG_DATA_DIRS"
":"
"${unwrapped.gtk}/share"
"--prefix"
"XDG_DATA_DIRS"
":"
"${unwrapped.gtk}/share/gsettings-schemas/${unwrapped.gtk.name}"
"--prefix"
"GI_TYPELIB_PATH"
":"
"${lib.makeSearchPath "lib/girepository-1.0" [
(lib.getLib glib)
unwrapped.gtk
gsettings-desktop-schemas
atk
# From some reason, if .out is not used, .bin is used, and we want
# what's in `.out`.
pango.out
gdk-pixbuf
json-glib
harfbuzz
librsvg
gobject-introspection
at-spi2-core
]}"
]
++ lib.optionals (extraPackages != [ ]) [
"--prefix"
"GRC_BLOCKS_PATH"
":"
"${lib.makeSearchPath "share/gnuradio/grc/blocks" extraPackages}"
]
++ lib.optionals (extraSoapySdrPackages != [ ]) [
"--prefix"
"SOAPY_SDR_PLUGIN_PATH"
":"
"${lib.makeSearchPath soapysdr.passthru.searchPath extraSoapySdrPackages}"
]
++
lib.optionals (unwrapped.hasFeature "gr-qtgui")
# 3.7 builds with qt4
(
if lib.versionAtLeast unwrapped.versionAttr.major "3.8" then
[
"--prefix"
"QT_PLUGIN_PATH"
":"
"${lib.makeSearchPath unwrapped.qt.qtbase.qtPluginPrefix (
map lib.getBin (
[
unwrapped.qt.qtbase
]
++ lib.optionals stdenv.hostPlatform.isLinux [
unwrapped.qt.qtwayland
]
)
)}"
"--prefix"
"QML2_IMPORT_PATH"
":"
"${lib.makeSearchPath unwrapped.qt.qtbase.qtQmlPrefix (
map lib.getBin (
[
unwrapped.qt.qtbase
]
++ lib.optionals stdenv.hostPlatform.isLinux [
unwrapped.qt.qtwayland
]
)
)}"
]
else
# Add here qt4 related environment for 3.7?
[
]
)
++ extraMakeWrapperArgs
);
packages = import ../../../top-level/gnuradio-packages.nix {
inherit lib stdenv newScope;
gnuradio = unwrapped;
};
passthru = unwrapped.passthru // {
inherit
pythonEnv
pythonPkgs
unwrapped
;
pkgs = packages;
};
self =
if doWrap then
stdenv.mkDerivation {
inherit pname version passthru;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
xorg.lndir
];
buildCommand = ''
mkdir $out
cd $out
lndir -silent ${unwrapped}
${lib.optionalString (extraPackages != [ ]) (
builtins.concatStringsSep "\n" (
map (pkg: ''
if [[ -d ${lib.getBin pkg}/bin/ ]]; then
lndir -silent ${pkg}/bin ./bin
fi
'') extraPackages
)
)}
for i in $out/bin/*; do
if [[ ! -x "$i" ]]; then
continue
fi
cp -L "$i" "$i".tmp
mv -f "$i".tmp "$i"
if head -1 "$i" | grep -q ${unwrapped.python}; then
substituteInPlace "$i" \
--replace ${unwrapped.python} ${pythonEnv}
fi
wrapProgram "$i" ${makeWrapperArgs}
done
'';
inherit (unwrapped) meta;
}
else
unwrapped.overrideAttrs (_: {
inherit passthru;
});
in
self

View File

@@ -0,0 +1,64 @@
{
lib,
mkDerivation,
fetchFromGitHub,
cmake,
pkg-config,
airspy,
rtl-sdr,
fdk_aac,
faad2,
fftwFloat,
libsndfile,
libsamplerate,
portaudio,
qtmultimedia,
qwt,
}:
mkDerivation rec {
pname = "guglielmo";
version = "0.5";
src = fetchFromGitHub {
owner = "marcogrecopriolo";
repo = "guglielmo";
rev = "v${version}";
sha256 = "sha256-W+KTwtxbTDrtONmkw95gXT28n3k9KS364WOzLLJdGLM=";
};
postInstall = ''
mv $out/linux-bin $out/bin
'';
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
airspy
rtl-sdr
fdk_aac
faad2
fftwFloat
libsndfile
libsamplerate
portaudio
qtmultimedia
qwt
];
postFixup = ''
# guglielmo opens SDR libraries at run time
patchelf --add-rpath "${airspy}/lib:${rtl-sdr}/lib" $out/bin/.guglielmo-wrapped
'';
meta = with lib; {
description = "Qt based FM / Dab tuner";
mainProgram = "guglielmo";
homepage = "https://github.com/marcogrecopriolo/guglielmo";
license = licenses.gpl2Only;
maintainers = [ maintainers.markuskowa ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
hamlib_4,
libusb1,
cmake,
fftw,
fftwFloat,
qt6,
boost,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "js8call";
version = "2.3.1";
src = fetchFromGitHub {
owner = "js8call";
repo = "js8call";
rev = "v${finalAttrs.version}";
sha256 = "sha256-rYXjcmQRRfizJVriZo9yX8x2yYfWpL94Cprx9eFC3ss=";
};
nativeBuildInputs = [
qt6.wrapQtAppsHook
pkg-config
cmake
];
buildInputs = [
hamlib_4
libusb1
fftw
fftwFloat
qt6.qtbase
qt6.qtmultimedia
qt6.qtserialport
boost
];
prePatch = ''
substituteInPlace CMakeLists.txt \
--replace "/usr/share/applications" "$out/share/applications" \
--replace "/usr/share/pixmaps" "$out/share/pixmaps" \
--replace "/usr/bin/" "$out/bin"
'';
meta = with lib; {
description = "Weak-signal keyboard messaging for amateur radio";
longDescription = ''
JS8Call is software using the JS8 Digital Mode providing weak signal
keyboard to keyboard messaging to Amateur Radio Operators.
'';
homepage = "http://js8call.com/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [
melling
sarcasticadmin
];
};
})

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchurl,
hamlib,
pkg-config,
qtbase,
qttools,
qtserialport,
qtcharts,
qmake,
wrapQtAppsHook,
}:
stdenv.mkDerivation rec {
pname = "klog";
version = "1.3.2";
src = fetchurl {
url = "mirror://savannah/${pname}/${pname}-${version}.tar.gz";
sha256 = "1d5x7rq0mgfrqws3q1y4z8wh2qa3gvsmd0ssf2yqgkyq3fhdrb5c";
};
nativeBuildInputs = [
pkg-config
wrapQtAppsHook
qmake
qttools
];
buildInputs = [
hamlib
qtbase
qtserialport
qtcharts
];
qmakeFlags = [ "KLog.pro" ];
meta = with lib; {
description = "Multiplatform free hamradio logger";
mainProgram = "klog";
longDescription = ''
KLog provides QSO management, useful QSL management DX-Cluster client, DXCC management,
ClubLog integration, WSJT-X, DX-Marathon support and much more.
'';
homepage = "https://www.klog.xyz/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ pulsation ];
};
}

View File

@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
sqlite,
wxGTK32,
libusb1,
soapysdr,
mesa_glu,
libX11,
gnuplot,
fltk,
withGui ? false,
}:
stdenv.mkDerivation rec {
pname = "limesuite";
version = "23.11.0";
src = fetchFromGitHub {
owner = "myriadrf";
repo = "LimeSuite";
rev = "v${version}";
sha256 = "sha256-f1cXrkVCIc1MqTvlCUBFqzHLhIVueybVxipNZRlF2gE=";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [
"-DOpenGL_GL_PREFERENCE=GLVND"
]
++ lib.optional (!withGui) "-DENABLE_GUI=OFF";
buildInputs = [
libusb1
sqlite
gnuplot
libusb1
soapysdr
]
++ lib.optionals withGui [
fltk
libX11
mesa_glu
wxGTK32
];
doInstallCheck = true;
postInstall = ''
install -Dm444 -t $out/lib/udev/rules.d ../udev-rules/64-limesuite.rules
install -Dm444 -t $out/share/limesuite bin/Release/lms7suite_mcu/*
'';
meta = with lib; {
description = "Driver and GUI for LMS7002M-based SDR platforms";
homepage = "https://github.com/myriadrf/LimeSuite";
license = licenses.asl20;
maintainers = with maintainers; [ markuskowa ];
platforms = platforms.unix;
badPlatforms = lib.optionals withGui platforms.darwin; # withGui transitively depends on mesa, which is broken on darwin
};
}

View File

@@ -0,0 +1,50 @@
Submodule blocks contains modified content
diff --git a/blocks/file/BinaryFileSink.cpp b/blocks/file/BinaryFileSink.cpp
index 31c9a41..0083b0d 100644
--- a/blocks/file/BinaryFileSink.cpp
+++ b/blocks/file/BinaryFileSink.cpp
@@ -13,6 +13,7 @@
#endif //_MSC_VER
#include <stdio.h>
#include <cerrno>
+#include <cstring>
#ifndef O_BINARY
#define O_BINARY 0
diff --git a/blocks/file/BinaryFileSource.cpp b/blocks/file/BinaryFileSource.cpp
index 0151231..379d383 100644
--- a/blocks/file/BinaryFileSource.cpp
+++ b/blocks/file/BinaryFileSource.cpp
@@ -13,6 +13,7 @@
#endif //_MSC_VER
#include <stdio.h>
#include <cerrno>
+#include <cstring>
#ifndef O_BINARY
#define O_BINARY 0
diff --git a/blocks/file/TextFileSink.cpp b/blocks/file/TextFileSink.cpp
index b4b2f08..2be66e2 100644
--- a/blocks/file/TextFileSink.cpp
+++ b/blocks/file/TextFileSink.cpp
@@ -6,6 +6,7 @@
#include <complex>
#include <fstream>
#include <cerrno>
+#include <cstring>
/***********************************************************************
* |PothosDoc Text File Sink
Submodule soapy contains modified content
diff --git a/soapy/DemoController.cpp b/soapy/DemoController.cpp
index 4ce8ead..9a4e742 100644
--- a/soapy/DemoController.cpp
+++ b/soapy/DemoController.cpp
@@ -6,6 +6,7 @@
#include <iostream>
#include <chrono>
#include <algorithm> //min/max
+#include <cstring>
/***********************************************************************
* |PothosDoc SDR Demo Controller

View File

@@ -0,0 +1,102 @@
{
lib,
mkDerivation,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
doxygen,
wrapQtAppsHook,
pcre,
poco,
qtbase,
qtsvg,
qwt6_1,
nlohmann_json,
soapysdr-with-plugins,
portaudio,
alsa-lib,
muparserx,
python3,
}:
mkDerivation rec {
pname = "pothos";
version = "0.7.1";
src = fetchFromGitHub {
owner = "pothosware";
repo = "PothosCore";
rev = "pothos-${version}";
sha256 = "038c3ipvf4sgj0zhm3vcj07ymsva4ds6v89y43f5d3p4n8zc2rsg";
fetchSubmodules = true;
};
patches = [
# spuce's CMakeLists.txt uses QT5_USE_Modules, which does not seem to work on Nix
./spuce.patch
# Poco had some breaking API changes in 1.12
(fetchpatch {
name = "poco-1.12-compat.patch";
url = "https://github.com/pothosware/PothosCore/commit/092d1209b0fd0aa8a1733706c994fa95e66fd017.patch";
hash = "sha256-bZXG8kD4+1LgDV8viZrJ/DMjg8UvW7b5keJQDXurfkA=";
})
# various source files are missing imports of <cstring>
# https://github.com/pothosware/PothosBlocks/issues/80
./cstring.patch
];
# poco 1.14 requires c++17
NIX_CFLAGS_COMPILE = [ "-std=gnu++17" ];
nativeBuildInputs = [
cmake
pkg-config
doxygen
wrapQtAppsHook
];
buildInputs = [
pcre
poco
qtbase
qtsvg
qwt6_1
nlohmann_json
soapysdr-with-plugins
portaudio
alsa-lib
muparserx
python3
];
postInstall = ''
install -Dm644 $out/share/Pothos/Desktop/pothos-flow.desktop $out/share/applications/pothos-flow.desktop
install -Dm644 $out/share/Pothos/Desktop/pothos-flow-16.png $out/share/icons/hicolor/16x16/apps/pothos-flow.png
install -Dm644 $out/share/Pothos/Desktop/pothos-flow-22.png $out/share/icons/hicolor/22x22/apps/pothos-flow.png
install -Dm644 $out/share/Pothos/Desktop/pothos-flow-32.png $out/share/icons/hicolor/32x32/apps/pothos-flow.png
install -Dm644 $out/share/Pothos/Desktop/pothos-flow-48.png $out/share/icons/hicolor/48x48/apps/pothos-flow.png
install -Dm644 $out/share/Pothos/Desktop/pothos-flow-64.png $out/share/icons/hicolor/64x64/apps/pothos-flow.png
install -Dm644 $out/share/Pothos/Desktop/pothos-flow-128.png $out/share/icons/hicolor/128x128/apps/pothos-flow.png
install -Dm644 $out/share/Pothos/Desktop/pothos-flow.xml $out/share/mime/application/pothos-flow.xml
rm -r $out/share/Pothos/Desktop
'';
dontWrapQtApps = true;
preFixup = ''
# PothosUtil does not need to be wrapped
wrapQtApp $out/bin/PothosFlow
wrapQtApp $out/bin/spuce_fir_plot
wrapQtApp $out/bin/spuce_iir_plot
wrapQtApp $out/bin/spuce_other_plot
wrapQtApp $out/bin/spuce_window_plot
'';
meta = with lib; {
description = "Pothos data-flow framework";
homepage = "https://github.com/pothosware/PothosCore/wiki";
license = licenses.boost;
platforms = platforms.linux;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,101 @@
diff --git a/spuce/qt_fir/CMakeLists.txt b/spuce/qt_fir/CMakeLists.txt
index fa2e580..e32113c 100644
--- a/spuce/qt_fir/CMakeLists.txt
+++ b/spuce/qt_fir/CMakeLists.txt
@@ -6,7 +6,7 @@ Message("Project spuce fir_plot")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
-FIND_PACKAGE(Qt5 REQUIRED Gui Core Widgets)
+FIND_PACKAGE(Qt5 REQUIRED Gui Core Widgets PrintSupport)
set(SOURCES
make_filter.cpp
@@ -27,11 +27,7 @@ set_property(TARGET spuce_fir PROPERTY POSITION_INDEPENDENT_CODE TRUE)
set_property(TARGET spuce_fir_plot PROPERTY POSITION_INDEPENDENT_CODE TRUE)
set_property(TARGET spuce_fir_plot PROPERTY CXX_STANDARD 11)
-TARGET_LINK_LIBRARIES(spuce_fir_plot spuce_fir ${QT_LIBRARIES} spuce)
-QT5_USE_Modules(spuce_fir_plot Gui)
-QT5_USE_Modules(spuce_fir_plot Core)
-QT5_USE_Modules(spuce_fir_plot Widgets)
-QT5_USE_Modules(spuce_fir_plot PrintSupport)
+TARGET_LINK_LIBRARIES(spuce_fir_plot spuce_fir ${QT_LIBRARIES} spuce Qt::Gui Qt::Core Qt::Widgets Qt::PrintSupport)
INSTALL(TARGETS spuce_fir_plot DESTINATION bin)
diff --git a/spuce/qt_iir/CMakeLists.txt b/spuce/qt_iir/CMakeLists.txt
index 4717226..debb5f9 100644
--- a/spuce/qt_iir/CMakeLists.txt
+++ b/spuce/qt_iir/CMakeLists.txt
@@ -6,7 +6,7 @@ Message("Project spuce iir_plot")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
-FIND_PACKAGE(Qt5 REQUIRED Gui Core Widgets)
+FIND_PACKAGE(Qt5 REQUIRED Gui Core Widgets PrintSupport)
set(SOURCES
make_filter.cpp
@@ -27,10 +27,6 @@ set_property(TARGET spuce_iir PROPERTY POSITION_INDEPENDENT_CODE TRUE)
set_property(TARGET spuce_iir_plot PROPERTY CXX_STANDARD 11)
set_property(TARGET spuce_iir_plot PROPERTY POSITION_INDEPENDENT_CODE TRUE)
-TARGET_LINK_LIBRARIES(spuce_iir_plot spuce_iir ${QT_LIBRARIES} spuce)
-QT5_USE_Modules(spuce_iir_plot Gui)
-QT5_USE_Modules(spuce_iir_plot Core)
-QT5_USE_Modules(spuce_iir_plot Widgets)
-QT5_USE_Modules(spuce_iir_plot PrintSupport)
+TARGET_LINK_LIBRARIES(spuce_iir_plot spuce_iir ${QT_LIBRARIES} spuce Qt::Gui Qt::Core Qt::Widgets Qt::PrintSupport)
INSTALL(TARGETS spuce_iir_plot DESTINATION bin)
diff --git a/spuce/qt_other/CMakeLists.txt b/spuce/qt_other/CMakeLists.txt
index 29c270d..e1ed778 100644
--- a/spuce/qt_other/CMakeLists.txt
+++ b/spuce/qt_other/CMakeLists.txt
@@ -6,7 +6,7 @@ Message("Project spuce window_plot")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
-FIND_PACKAGE(Qt5 REQUIRED Gui Core Widgets)
+FIND_PACKAGE(Qt5 REQUIRED Gui Core Widgets PrintSupport)
set(SOURCES make_filter.cpp)
ADD_LIBRARY(spuce_other STATIC ${SOURCES})
@@ -23,10 +23,6 @@ ADD_EXECUTABLE(spuce_other_plot ${other_plot_SOURCES} ${other_plot_HEADERS_MOC})
set_property(TARGET spuce_other_plot PROPERTY CXX_STANDARD 11)
set_property(TARGET spuce_other_plot PROPERTY POSITION_INDEPENDENT_CODE TRUE)
-TARGET_LINK_LIBRARIES(spuce_other_plot spuce_other ${QT_LIBRARIES} spuce)
-QT5_USE_Modules(spuce_other_plot Gui)
-QT5_USE_Modules(spuce_other_plot Core)
-QT5_USE_Modules(spuce_other_plot Widgets)
-QT5_USE_Modules(spuce_other_plot PrintSupport)
+TARGET_LINK_LIBRARIES(spuce_other_plot spuce_other ${QT_LIBRARIES} spuce Qt::Gui Qt::Core Qt::Widgets Qt::PrintSupport)
INSTALL(TARGETS spuce_other_plot DESTINATION bin)
diff --git a/spuce/qt_window/CMakeLists.txt b/spuce/qt_window/CMakeLists.txt
index e95c85b..4a77ab8 100644
--- a/spuce/qt_window/CMakeLists.txt
+++ b/spuce/qt_window/CMakeLists.txt
@@ -6,7 +6,7 @@ Message("Project spuce window_plot")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
-FIND_PACKAGE(Qt5 REQUIRED Gui Core Widgets)
+FIND_PACKAGE(Qt5 REQUIRED Gui Core Widgets PrintSupport)
set(SOURCES make_filter.cpp)
@@ -25,10 +25,6 @@ set_property(TARGET spuce_window_plot PROPERTY CXX_STANDARD 11)
set_property(TARGET spuce_win PROPERTY POSITION_INDEPENDENT_CODE TRUE)
set_property(TARGET spuce_window_plot PROPERTY POSITION_INDEPENDENT_CODE TRUE)
-TARGET_LINK_LIBRARIES(spuce_window_plot spuce_win ${QT_LIBRARIES} spuce)
-QT5_USE_Modules(spuce_window_plot Gui)
-QT5_USE_Modules(spuce_window_plot Core)
-QT5_USE_Modules(spuce_window_plot Widgets)
-QT5_USE_Modules(spuce_window_plot PrintSupport)
+TARGET_LINK_LIBRARIES(spuce_window_plot spuce_win ${QT_LIBRARIES} spuce Qt::Gui Qt::Core Qt::Widgets Qt::PrintSupport)
INSTALL(TARGETS spuce_window_plot DESTINATION bin)

View File

@@ -0,0 +1,56 @@
{
mkDerivation,
lib,
fetchurl,
qtbase,
qmake,
openjpeg,
pkg-config,
fftw,
libpulseaudio,
alsa-lib,
hamlib,
libv4l,
fftwFloat,
}:
mkDerivation rec {
version = "9.5.8";
pname = "qsstv";
src = fetchurl {
url = "https://www.qsl.net/o/on4qz/qsstv/downloads/qsstv_${version}.tar.gz";
sha256 = "0s3sivc0xan6amibdiwfnknrl3248wzgy98w6gyxikl0qsjpygy0";
};
nativeBuildInputs = [
qmake
pkg-config
];
buildInputs = [
qtbase
openjpeg
fftw
libpulseaudio
alsa-lib
hamlib
libv4l
fftwFloat
];
postInstall = ''
# Install desktop icon
install -D icons/qsstv.png $out/share/pixmaps/qsstv.png
install -D qsstv.desktop $out/share/applications/qsstv.desktop
'';
meta = with lib; {
description = "Qt-based slow-scan TV and fax";
mainProgram = "qsstv";
homepage = "https://www.qsl.net/on4qz/";
platforms = platforms.linux;
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ hax404 ];
};
}

View File

@@ -0,0 +1,112 @@
{
lib,
stdenv,
fetchFromGitea,
fetchFromGitHub,
cmake,
pkg-config,
libusb1,
}:
let
generic =
{
version,
pname,
src,
meta,
}:
stdenv.mkDerivation {
inherit version pname src;
nativeBuildInputs = [
pkg-config
cmake
];
propagatedBuildInputs = [ libusb1 ];
cmakeFlags = lib.optionals stdenv.hostPlatform.isLinux [
"-DINSTALL_UDEV_RULES=ON"
"-DWITH_RPC=ON"
];
doInstallCheck = true;
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '/etc/udev/rules.d' "$out/etc/udev/rules.d" \
--replace "VERSION_INFO_PATCH_VERSION git" "VERSION_INFO_PATCH_VERSION ${lib.versions.patch version}"
substituteInPlace rtl-sdr.rules \
--replace 'MODE:="0666"' 'ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"'
'';
meta = with lib; {
inherit (meta) longDescription homepage;
description = "Software to turn the RTL2832U into a SDR receiver";
license = licenses.gpl2Plus;
maintainers = with maintainers; [
bjornfor
skovati
Tungsten842
];
platforms = platforms.unix;
mainProgram = "rtl_sdr";
};
};
in
{
rtl-sdr-osmocom = generic rec {
pname = "rtl-sdr-osmocom";
version = "2.0.1";
src = fetchFromGitea {
domain = "gitea.osmocom.org";
owner = "sdr";
repo = "rtl-sdr";
rev = "v${version}";
hash = "sha256-+RYSCn+wAkb9e7NRI5kLY8a6OXtJu7QcSUht1R6wDX0=";
};
meta = {
longDescription = "Rtl-sdr library by the Osmocom project";
homepage = "https://gitea.osmocom.org/sdr/rtl-sdr";
};
};
rtl-sdr-librtlsdr = generic rec {
pname = "rtl-sdr-librtlsdr";
version = "0.9.0";
src = fetchFromGitHub {
owner = "librtlsdr";
repo = "librtlsdr";
rev = "v${version}";
hash = "sha256-I1rbywQ0ZBw26wZdtMBkfpj7+kv09XKrrcoDuhIkRmw=";
};
meta = {
longDescription = ''
Fork of the rtl-sdr library by the Osmocom project. A list of differences
can be found here: https://github.com/librtlsdr/librtlsdr/blob/master/README_improvements.md
'';
homepage = "https://github.com/librtlsdr/librtlsdr";
};
};
rtl-sdr-blog = generic rec {
pname = "rtl-sdr-blog";
version = "1.3.5";
src = fetchFromGitHub {
owner = "rtlsdrblog";
repo = "rtl-sdr-blog";
rev = version;
hash = "sha256-7FpT+BoQ2U8KiKwX4NfEwrO3lMBti7RX8uKtT5dFH8M=";
};
meta = {
longDescription = ''
Fork of the rtl-sdr library by the Osmocom project. A list of differences
can be found here: https://github.com/rtlsdrblog/rtl-sdr-blog/blob/master/README
'';
homepage = "https://github.com/rtlsdrblog/rtl-sdr-blog";
};
};
}

View File

@@ -0,0 +1,78 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
wrapQtAppsHook,
pkg-config,
qtbase,
qwt6_1,
fftwFloat,
libsamplerate,
portaudio,
libusb1,
libsndfile,
featuresOverride ? { },
}:
stdenv.mkDerivation (finalAttrs: {
pname = "sdr-j-fm";
# The stable release doen't include the commit the came after 3.16 which
# added support for cmake options instead of using cmake set() commands. See
# also: https://github.com/JvanKatwijk/sdr-j-fm/pull/25
version = "3.16-unstable-2023-12-07";
src = fetchFromGitHub {
owner = "JvanKatwijk";
repo = "sdr-j-fm";
rev = "8e3a67f8fbf72dd6968cbeb2e3d7d513fd107c71";
hash = "sha256-l9WqfhDp2V01lhleYZqRpmyL1Ww+tJj10bjkMMlvyA0=";
};
nativeBuildInputs = [
cmake
wrapQtAppsHook
pkg-config
];
buildInputs = [
qtbase
qwt6_1
fftwFloat
libsamplerate
portaudio
libusb1
libsndfile
];
cmakeFlags = lib.mapAttrsToList lib.cmakeBool finalAttrs.passthru.features;
passthru = {
features = {
# All of these features don't require an external dependencies, although it
# may be implied - upstraem bundles everything they need in their repo.
AIRSPY = true;
SDRPLAY = true;
SDRPLAY_V3 = true;
HACKRF = true;
PLUTO = true;
# Some more cmake flags are mentioned in upstream's CMakeLists.txt file
# but they don't actually make a difference.
}
// featuresOverride;
};
postInstall = ''
# Weird default of upstream
mv $out/linux-bin $out/bin
'';
meta = with lib; {
description = "SDR based FM radio receiver software";
homepage = "https://github.com/JvanKatwijk/sdr-j-fm";
license = licenses.gpl2Only;
maintainers = with maintainers; [ doronbehar ];
# Upstream doesn't find libusb1 on Darwin. Upstream probably doesn't
# support it officially.
platforms = platforms.linux;
};
})

View File

@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchFromGitHub,
qmake,
qtbase,
pkg-config,
sigutils,
fftwSinglePrec,
suwidgets,
wrapQtAppsHook,
suscan,
libsndfile,
soapysdr-with-plugins,
libxml2,
volk,
}:
stdenv.mkDerivation rec {
pname = "sigdigger";
version = "0.3.0";
src = fetchFromGitHub {
owner = "BatchDrake";
repo = "SigDigger";
rev = "v${version}";
sha256 = "sha256-dS+Fc0iQz7GIlGaR556Ur/EQh3Uzhqm9uBW42IuEqoE=";
};
nativeBuildInputs = [
qmake
pkg-config
wrapQtAppsHook
];
buildInputs = [
qtbase
sigutils
fftwSinglePrec
suwidgets
suscan
libsndfile
libxml2
volk
soapysdr-with-plugins
];
qmakeFlags = [
"SUWIDGETS_PREFIX=${suwidgets}"
"SigDigger.pro"
];
meta = with lib; {
description = "Qt-based digital signal analyzer, using Suscan core and Sigutils DSP library";
mainProgram = "SigDigger";
homepage = "https://github.com/BatchDrake/SigDigger";
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [
polygon
oxapentane
];
};
}

View File

@@ -0,0 +1,85 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
pkg-config,
makeWrapper,
libusb-compat-0_1,
ncurses,
usePython ? false,
python ? null,
swig,
extraPackages ? [ ],
buildPackages,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "soapysdr";
# Don't forget to change passthru.abiVersion
version = "0.8.1-unstable-2025-10-05-03";
src = fetchFromGitHub {
owner = "pothosware";
repo = "SoapySDR";
# update to include latest patch for newer cmake support
rev = "1667b4e6301d7ad47b340dcdcd6e9969bf57d843";
hash = "sha256-UCpYBUb2k1bHy1z2Mvmv+1ZX1BloSsPrTydFV3Ga3Os=";
};
nativeBuildInputs = [
cmake
pkg-config
makeWrapper
];
buildInputs = [
libusb-compat-0_1
ncurses
]
++ lib.optionals usePython [
python
swig
];
propagatedBuildInputs = lib.optionals usePython [ python.pkgs.numpy ];
cmakeFlags = lib.optionals usePython [ "-DUSE_PYTHON_CONFIG=ON" ];
postFixup = lib.optionalString (extraPackages != [ ]) (
# Join all plugins via symlinking
lib.pipe extraPackages [
(map (pkg: ''
${buildPackages.xorg.lndir}/bin/lndir -silent ${pkg} $out
''))
lib.concatStrings
]
+ ''
# Needed for at least the remote plugin server
for file in $out/bin/*; do
wrapProgram "$file" --prefix SOAPY_SDR_PLUGIN_PATH : ${lib.escapeShellArg (lib.makeSearchPath finalAttrs.passthru.searchPath extraPackages)}
done
''
);
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
# SOAPY_SDR_ABI_VERSION defined in include/SoapySDR/Version.h
abiVersion = "0.8-3";
searchPath = "lib/SoapySDR/modules${finalAttrs.passthru.abiVersion}";
};
meta = with lib; {
homepage = "https://github.com/pothosware/SoapySDR";
description = "Vendor and platform neutral SDR support library";
license = licenses.boost;
maintainers = with maintainers; [
markuskowa
numinit
];
mainProgram = "SoapySDRUtil";
pkgConfigModules = [ "SoapySDR" ];
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchFromGitHub,
qmake,
qtbase,
pkg-config,
sigutils,
fftwSinglePrec,
}:
stdenv.mkDerivation {
pname = "suwidgets";
version = "unstable-2022-04-03";
src = fetchFromGitHub {
owner = "BatchDrake";
repo = "SuWidgets";
rev = "826b3eeae5b682dc063f53b427caa9c7c48131ea";
sha256 = "sha256-cyFLsP+8GbALdlgEnVX4201Qq/KAxb/Vv+sJqbFpvUk=";
};
dontWrapQtApps = true;
postPatch = ''
substituteInPlace SuWidgets.pri \
--replace "PKGCONFIG += sigutils fftw3" "PKGCONFIG += sigutils fftw3f"
'';
nativeBuildInputs = [
qmake
pkg-config
];
buildInputs = [
qtbase
sigutils
fftwSinglePrec
];
qmakeFlags = [
"SuWidgetsLib.pro"
];
meta = with lib; {
description = "Sigutils-related widgets";
homepage = "https://github.com/BatchDrake/SuWidgets";
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [
polygon
oxapentane
];
};
}

View File

@@ -0,0 +1,102 @@
{
lib,
stdenv,
cmake,
pkg-config,
fetchFromGitHub,
makeDesktopItem,
alsa-lib,
speex,
libopus,
curl,
gsm,
libgcrypt,
libsigcxx,
popt,
qtbase,
qttools,
wrapQtAppsHook,
rtl-sdr,
tcl,
doxygen,
groff,
jsoncpp,
}:
let
desktopItem = makeDesktopItem rec {
name = "Qtel";
exec = "qtel";
icon = "qtel";
desktopName = name;
genericName = "EchoLink Client";
categories = [
"HamRadio"
"Qt"
"Network"
];
};
in
stdenv.mkDerivation rec {
pname = "svxlink";
version = "25.05.1";
src = fetchFromGitHub {
owner = "sm0svx";
repo = "svxlink";
tag = version;
hash = "sha256-OyAR/6heGX6J53p6x+ZPXY6nzSv22umMTg0ISlWcjp8=";
};
cmakeFlags = [
"-DDO_INSTALL_CHOWN=NO"
"-DRTLSDR_LIBRARIES=${rtl-sdr}/lib/librtlsdr.so"
"-DRTLSDR_INCLUDE_DIRS=${rtl-sdr}/include"
"../src"
];
dontWrapQtApps = true;
nativeBuildInputs = [
cmake
pkg-config
doxygen
groff
wrapQtAppsHook
];
buildInputs = [
alsa-lib
curl
gsm
libgcrypt
libsigcxx
libopus
popt
qtbase
qttools
rtl-sdr
speex
tcl
jsoncpp
];
postInstall = ''
rm -rf $out/share/applications
ln -s ${desktopItem}/share/applications $out/share/applications
wrapQtApp $out/bin/qtel
'';
meta = {
description = "Advanced repeater controller and EchoLink software";
longDescription = ''
Advanced repeater controller and EchoLink software for Linux including a
GUI, Qtel - The Qt EchoLink client
'';
homepage = "http://www.svxlink.org/";
license = with lib.licenses; [ gpl2 ];
maintainers = with lib.maintainers; [ zaninime ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,77 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
wrapQtAppsHook,
qtbase,
qtcharts,
qtmultimedia,
qt5compat,
faad2,
rtl-sdr,
soapysdr-with-plugins,
libusb-compat-0_1,
fftwSinglePrec,
lame,
mpg123,
unixtools,
withFlac ? true,
flac,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "welle-io";
version = "2.7";
src = fetchFromGitHub {
owner = "AlbrechtL";
repo = "welle.io";
tag = "v${finalAttrs.version}";
hash = "sha256-+xjwvxFrv++XF6Uhm/ZwkseuToz3LtqCfTD18GiwNyw=";
};
nativeBuildInputs = [
cmake
pkg-config
wrapQtAppsHook
unixtools.xxd
];
buildInputs = [
faad2
fftwSinglePrec
lame
libusb-compat-0_1
mpg123
qtbase
qtcharts
qtmultimedia
qt5compat
rtl-sdr
soapysdr-with-plugins
]
++ lib.optional withFlac flac;
cmakeFlags = [
"-DRTLSDR=true"
"-DSOAPYSDR=true"
]
++ lib.optional withFlac "-DFLAC=true";
meta = {
description = "DAB/DAB+ Software Radio";
homepage = "https://www.welle.io/";
maintainers = with lib.maintainers; [
ck3d
markuskowa
];
license = lib.licenses.gpl2Only;
platforms = [
"x86_64-linux"
"i686-linux"
]
++ lib.platforms.darwin;
};
})

View File

@@ -0,0 +1,77 @@
{
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.7.0";
src = fetchgit {
url = "http://git.code.sf.net/p/wsjt/wsjtx";
rev = "wsjtx-${version}";
hash = "sha256-AAPZTJUhz3x/28B9rk2uwFs1bkcEvaj+hOzAjpsFALQ=";
};
nativeBuildInputs = [
asciidoc
asciidoctor
cmake
gfortran
hamlib_4 # rigctl
libtool
pkg-config
qttools
texinfo
wrapQtAppsHook
];
buildInputs = [
fftw
fftwFloat
hamlib_4
libusb1
qtbase
qtmultimedia
qtserialport
boost
];
strictDeps = true;
meta = with lib; {
description = "Weak-signal digital communication modes for amateur radio";
longDescription = ''
WSJT-X implements communication protocols or "modes" called FT4, FT8, JT4,
JT9, JT65, QRA64, ISCAT, MSK144, and WSPR, as well as one called Echo for
detecting and measuring your own radio signals reflected from the Moon.
These modes were all designed for making reliable, confirmed ham radio
contacts under extreme weak-signal conditions.
'';
homepage = "https://wsjt.sourceforge.io";
license = with licenses; [ gpl3Plus ];
platforms = platforms.linux;
maintainers = with maintainers; [
lasandell
numinit
melling
];
};
}