uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
33
pkgs/applications/radio/airspy/default.nix
Normal file
33
pkgs/applications/radio/airspy/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ stdenv, lib, fetchFromGitHub
|
||||
, cmake , pkg-config, libusb1
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "airspy";
|
||||
version = "1.0.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "airspy";
|
||||
repo = "airspyone_host";
|
||||
rev = "v${version}";
|
||||
sha256 = "1v7sfkkxc6f8ny1p9xrax1agkl6q583mjx8k0lrrwdz31rf9qgw9";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace airspy-tools/CMakeLists.txt --replace "/etc/udev/rules.d" "$out/etc/udev/rules.d"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ libusb1 ];
|
||||
|
||||
cmakeFlags =
|
||||
lib.optionals stdenv.isLinux [ "-DINSTALL_UDEV_RULES=ON" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/airspy/airspyone_host";
|
||||
description = "Host tools and driver library for the AirSpy SDR";
|
||||
license = licenses.bsd3;
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
};
|
||||
}
|
||||
25
pkgs/applications/radio/airspyhf/default.nix
Normal file
25
pkgs/applications/radio/airspyhf/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libusb1 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "airspyhf";
|
||||
version = "1.6.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "airspy";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-RKTMEDPeKcerJZtXTn8eAShxDcZUMgeQg/+7pEpMyVg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [ libusb1 ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "User mode driver for Airspy HF+";
|
||||
homepage = "https://github.com/airspy/airspyhf";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ sikmir ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
26
pkgs/applications/radio/aldo/default.nix
Normal file
26
pkgs/applications/radio/aldo/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchgit, libao, autoreconfHook }:
|
||||
|
||||
let
|
||||
pname = "aldo";
|
||||
version = "0.7.8";
|
||||
in stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.savannah.gnu.org/${pname}.git";
|
||||
rev = "v${version}";
|
||||
sha256 = "0swvdq0pw1msy40qkpn1ar9kacqjyrw2azvf2fy38y0svyac8z2i";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
buildInputs = [ libao ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Morse code training program";
|
||||
homepage = "http://aldo.nongnu.org/";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ etu ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
26
pkgs/applications/radio/btlejack/default.nix
Normal file
26
pkgs/applications/radio/btlejack/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, buildPythonApplication, fetchFromGitHub, pyserial, halo }:
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "btlejack";
|
||||
version = "2.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "virtualabs";
|
||||
repo = "btlejack";
|
||||
rev = "v${version}";
|
||||
sha256 = "1r17079kx7dvsrbmw5sgvz3vj5m3pn2543gxj2xmw4s0lcihy378";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i "s|^.*'argparse',$||" setup.py
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ pyserial halo ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/virtualabs/btlejack";
|
||||
description = "Bluetooth Low Energy Swiss-army knife";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ oxzi ];
|
||||
};
|
||||
}
|
||||
24
pkgs/applications/radio/chirp/default.nix
Normal file
24
pkgs/applications/radio/chirp/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib
|
||||
, fetchurl
|
||||
, python2
|
||||
}:
|
||||
python2.pkgs.buildPythonApplication rec {
|
||||
pname = "chirp-daily";
|
||||
version = "20211016";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://trac.chirp.danplanet.com/chirp_daily/daily-${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "13xzqnhvnw6yipv4izkq0s9ykyl9pc5ifpr1ii8xfp28ch706qyw";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python2.pkgs; [
|
||||
pygtk pyserial libxml2 future
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A free, open-source tool for programming your amateur radio";
|
||||
homepage = "https://chirp.danplanet.com/";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
101
pkgs/applications/radio/cqrlog/default.nix
Normal file
101
pkgs/applications/radio/cqrlog/default.nix
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fpc
|
||||
, lazarus
|
||||
, atk
|
||||
, cairo
|
||||
, gdk-pixbuf
|
||||
, glib
|
||||
, gtk2-x11
|
||||
, libX11
|
||||
, pango
|
||||
, hamlib
|
||||
, mysql57
|
||||
, tqsl
|
||||
, xdg-utils
|
||||
, xplanet
|
||||
, autoPatchelfHook
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cqrlog";
|
||||
version = "2.5.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ok2cqr";
|
||||
repo = "cqrlog";
|
||||
rev = "v${version}";
|
||||
sha256 = "0zzcg0bl6mq4wfifj998x9x09w8sigbh46synpqx034fpr0swyhb";
|
||||
};
|
||||
|
||||
# Adds the possiblity 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" "${mysql57}/bin/mysqld_safe" \
|
||||
--replace "/usr/bin/mysqld" "${mysql57}/bin/mysqld"
|
||||
|
||||
# To be fail when I need to patch a new hardcoded binary
|
||||
! grep -C src -RC0 "/usr"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ lazarus fpc autoPatchelfHook wrapGAppsHook ];
|
||||
buildInputs = [
|
||||
atk
|
||||
cairo
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk2-x11
|
||||
libX11
|
||||
pango
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
hamlib
|
||||
mysql57
|
||||
tqsl
|
||||
xdg-utils
|
||||
xplanet
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"FPC=fpc"
|
||||
"PP=fpc"
|
||||
"DESTDIR=$(out)"
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
libmysqlclient=$(find "${mysql57}/lib" -name "libmysqlclient.so.*" | tail -n1)
|
||||
patchelf --add-needed "$libmysqlclient" "$out/bin/.cqrlog-wrapped"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Linux logging program for amateur radio operators";
|
||||
homepage = "https://www.cqrlog.com/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ shamilton ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
13
pkgs/applications/radio/cqrlog/fix-makefile-lazarusdir.patch
Normal file
13
pkgs/applications/radio/cqrlog/fix-makefile-lazarusdir.patch
Normal 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
|
||||
|
||||
39
pkgs/applications/radio/csdr/default.nix
Normal file
39
pkgs/applications/radio/csdr/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ stdenv, lib, fetchFromGitHub
|
||||
, autoreconfHook, pkg-config, fftwFloat, libsamplerate
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "csdr";
|
||||
version = "0.17.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jketterl";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1vip5a3xgskcwba3xi66zfr986xrsch9na7my818cm8vw345y57b";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace configure.ac \
|
||||
--replace -Wformat=0 ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
fftwFloat
|
||||
libsamplerate
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
homepage = "https://github.com/jketterl/csdr";
|
||||
description = "A simple DSP library and command-line tool for Software Defined Radio";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ astro ];
|
||||
};
|
||||
}
|
||||
29
pkgs/applications/radio/cubicsdr/default.nix
Normal file
29
pkgs/applications/radio/cubicsdr/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, fftw, hamlib, libpulseaudio, libGL, libX11, liquid-dsp,
|
||||
pkg-config, soapysdr-with-plugins, wxGTK31-gtk3, enableDigitalLab ? false }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cubicsdr";
|
||||
version = "0.2.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cjcliffe";
|
||||
repo = "CubicSDR";
|
||||
rev = version;
|
||||
sha256 = "0cyv1vk97x4i3h3hhh7dx8mv6d1ad0fypdbx5fl26bz661sr8j2n";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [ fftw hamlib libpulseaudio libGL libX11 liquid-dsp soapysdr-with-plugins wxGTK31-gtk3 ];
|
||||
|
||||
cmakeFlags = [ "-DUSE_HAMLIB=ON" ]
|
||||
++ lib.optional enableDigitalLab "-DENABLE_DIGITAL_LAB=ON";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://cubicsdr.com";
|
||||
description = "Software Defined Radio application";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ lasandell ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
28
pkgs/applications/radio/dablin/default.nix
Normal file
28
pkgs/applications/radio/dablin/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
||||
, mpg123, SDL2, gtkmm3, faad2, pcre
|
||||
} :
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dablin";
|
||||
version = "1.14.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Opendigitalradio";
|
||||
repo = "dablin";
|
||||
rev = version;
|
||||
sha256 = "02mhxaqpj0094sbb3c28r5xznw9z8ayvlkczknizlk75ag895zz2";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [ faad2 mpg123 SDL2 gtkmm3 pcre ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Play DAB/DAB+ from ETI-NI aligned stream";
|
||||
homepage = "https://github.com/Opendigitalradio/dablin";
|
||||
license = with licenses; [ gpl3 lgpl21 ];
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.markuskowa ];
|
||||
};
|
||||
}
|
||||
|
||||
27
pkgs/applications/radio/dabtools/default.nix
Normal file
27
pkgs/applications/radio/dabtools/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
||||
, libusb1, rtl-sdr, fftw
|
||||
} :
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "dabtools";
|
||||
version = "20180405";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Opendigitalradio";
|
||||
repo = "dabtools";
|
||||
rev = "8b0b2258b02020d314efd4d0d33a56c8097de0d1";
|
||||
sha256 = "18nkdybgg2w6zh56g6xwmg49sifalvraz4rynw8w5d8cqi3dm9sm";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ rtl-sdr fftw libusb1 ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Commandline tools for DAB and DAB+ digital radio broadcasts";
|
||||
homepage = "https://github.com/Opendigitalradio/dabtools";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.markuskowa ];
|
||||
};
|
||||
}
|
||||
|
||||
51
pkgs/applications/radio/direwolf/default.nix
Normal file
51
pkgs/applications/radio/direwolf/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, alsa-lib, espeak, glibc, gpsd
|
||||
, hamlib, perl, python3, udev }:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "direwolf";
|
||||
version = "1.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wb2osz";
|
||||
repo = "direwolf";
|
||||
rev = version;
|
||||
sha256 = "0xmz64m02knbrpasfij4rrq53ksxna5idxwgabcw4n2b1ig7pyx5";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
buildInputs = [
|
||||
espeak gpsd hamlib perl python3
|
||||
] ++ (optionals stdenv.isLinux [alsa-lib udev]);
|
||||
|
||||
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
|
||||
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 > 12'
|
||||
'';
|
||||
|
||||
meta = {
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
51
pkgs/applications/radio/dmrconfig/default.nix
Normal file
51
pkgs/applications/radio/dmrconfig/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchpatch
|
||||
, libusb1, systemd }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dmrconfig";
|
||||
version = "1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sergev";
|
||||
repo = "dmrconfig";
|
||||
rev = version;
|
||||
sha256 = "1qwix75z749628w583fwp7m7kxbj0k3g159sxb7vgqxbadqqz1ab";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Pull upstream fix for -fno-common toolchains.
|
||||
(fetchpatch {
|
||||
name = "fno-common.patch";
|
||||
url = "https://github.com/OpenRTX/dmrconfig/commit/1a6901488db26262a6b69f80b0e795864e9e8d0a.patch";
|
||||
sha256 = "03px1y95a8aspd251i1jj8ggqfjvkqby4lhn5pb7l5c1lzh6h762";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libusb1 systemd
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace /usr/local/bin/dmrconfig $out/bin/dmrconfig
|
||||
'';
|
||||
|
||||
makeFlags = [ "VERSION=${version}" "GITCOUNT=0" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/lib/udev/rules.d
|
||||
make install
|
||||
install 99-dmr.rules $out/lib/udev/rules.d/99-dmr.rules
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Configuration utility for DMR radios";
|
||||
longDescription = ''
|
||||
DMRconfig is a utility for programming digital radios via USB programming cable.
|
||||
'';
|
||||
homepage = "https://github.com/sergev/dmrconfig";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.etu ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
42
pkgs/applications/radio/dsd/default.nix
Normal file
42
pkgs/applications/radio/dsd/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake
|
||||
, mbelib, libsndfile, itpp
|
||||
, portaudioSupport ? true, portaudio ? null
|
||||
}:
|
||||
|
||||
assert portaudioSupport -> portaudio != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dsd";
|
||||
version = "2022-03-14";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "szechyjs";
|
||||
repo = "dsd";
|
||||
rev = "59423fa46be8b41ef0bd2f3d2b45590600be29f0";
|
||||
sha256 = "128gvgkanvh4n5bjnzkfk419hf5fdbad94fb8d8lv67h94vfchyd";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [
|
||||
mbelib libsndfile itpp
|
||||
] ++ lib.optionals portaudioSupport [ portaudio ];
|
||||
|
||||
doCheck = true;
|
||||
preCheck = ''
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD
|
||||
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Digital Speech Decoder";
|
||||
longDescription = ''
|
||||
DSD is able to decode several digital voice formats from discriminator
|
||||
tap audio and synthesize the decoded speech. Speech synthesis requires
|
||||
mbelib, which is a separate package.
|
||||
'';
|
||||
homepage = "https://github.com/szechyjs/dsd";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ andrew-d ];
|
||||
};
|
||||
}
|
||||
58
pkgs/applications/radio/dump1090/default.nix
Normal file
58
pkgs/applications/radio/dump1090/default.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, libbladeRF
|
||||
, libusb1
|
||||
, ncurses
|
||||
, rtl-sdr
|
||||
, hackrf
|
||||
, limesuite
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dump1090";
|
||||
version = "7.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "flightaware";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-1fD8ZMkTS/r+p1rrOfJhH2sz3sJCapQcvk8f8crGApw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
libbladeRF
|
||||
libusb1
|
||||
ncurses
|
||||
rtl-sdr
|
||||
hackrf
|
||||
] ++ lib.optional stdenv.isLinux limesuite;
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
|
||||
"-Wno-implicit-function-declaration -Wno-int-conversion";
|
||||
|
||||
buildFlags = [ "dump1090" "view1090" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin $out/share
|
||||
cp -v dump1090 view1090 $out/bin
|
||||
cp -vr public_html $out/share/dump1090
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
description = "A simple Mode S decoder for RTLSDR devices";
|
||||
homepage = "https://github.com/flightaware/dump1090";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ earldouglas ];
|
||||
};
|
||||
}
|
||||
32
pkgs/applications/radio/ebook2cw/default.nix
Normal file
32
pkgs/applications/radio/ebook2cw/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchgit, fetchpatch, lame, libvorbis, gettext }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ebook2cw";
|
||||
version = "0.8.4";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://git.fkurz.net/dj1yfk/ebook2cw.git";
|
||||
rev = "${pname}-${version}";
|
||||
sha256 = "0h7lg59m3dcydzkc8szipnwzag8fqwwvppa9fspn5xqd4blpcjd5";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fixes non-GCC compilers and a missing directory in the install phase.
|
||||
(fetchpatch {
|
||||
url = "https://git.fkurz.net/dj1yfk/ebook2cw/commit/eb5742e70b042cf98a04440395c34390b171c035.patch";
|
||||
sha256 = "1m5f819cj3fj1piss0a5ciib3jqrqdc14lp3i3dszw4bg9v1pgyd";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [ lame libvorbis gettext ];
|
||||
|
||||
makeFlags = [ "DESTDIR=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Convert ebooks to Morse MP3s/OGGs";
|
||||
homepage = "http://fkurz.net/ham/ebook2cw.html";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ earldouglas ];
|
||||
};
|
||||
}
|
||||
54
pkgs/applications/radio/fldigi/default.nix
Normal file
54
pkgs/applications/radio/fldigi/default.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{ 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.1.20";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "0f64pqijl3jlfmv00hkdxvn1wy5yy3zl33p6vf3fn1b91w590c2h";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
libXinerama
|
||||
gettext
|
||||
hamlib
|
||||
fltk13
|
||||
libjpeg
|
||||
libpng
|
||||
portaudio
|
||||
libsndfile
|
||||
libsamplerate
|
||||
] ++ lib.optionals (stdenv.isLinux) [ libpulseaudio alsa-lib udev ];
|
||||
|
||||
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;
|
||||
# unable to execute command: posix_spawn failed: Argument list too long
|
||||
# Builds fine on aarch64-darwin
|
||||
broken = stdenv.system == "x86_64-darwin";
|
||||
};
|
||||
}
|
||||
23
pkgs/applications/radio/flex-ncat/default.nix
Normal file
23
pkgs/applications/radio/flex-ncat/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "flex-ncat";
|
||||
version = "0.1-20211223.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kc2g-flex-tools";
|
||||
repo = "nCAT";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-l5IH6EtWqxMLqUfIYpaKgZE9Jq8q4+WgZIazQ2scyxg=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-OzYlpC8DZQc3qo7mnl5jHlxaCNxMW+Z3VG535e+G/1o=";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/kc2g-flex-tools/nCAT";
|
||||
description = "FlexRadio remote control (CAT) via hamlib/rigctl protocol";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mvs ];
|
||||
mainProgram = "nCAT";
|
||||
};
|
||||
}
|
||||
25
pkgs/applications/radio/flex-ndax/default.nix
Normal file
25
pkgs/applications/radio/flex-ndax/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ stdenv, lib, buildGoModule, fetchFromGitHub, libpulseaudio }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "flex-ndax";
|
||||
version = "0.2-20220427";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kc2g-flex-tools";
|
||||
repo = "nDAX";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-KmvTLfGC6xzXcWYAzmBYiYSF65lqMdsdMQjUEk3siqc=";
|
||||
};
|
||||
|
||||
buildInputs = [ libpulseaudio ];
|
||||
|
||||
vendorSha256 = "sha256-u/5LiVo/ZOefprEKr/L1+3+OfYb0a4wq+CWoUjYNvzg=";
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
homepage = "https://github.com/kc2g-flex-tools/nDAX";
|
||||
description = "FlexRadio digital audio transport (DAX) connector for PulseAudio";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mvs ];
|
||||
};
|
||||
}
|
||||
34
pkgs/applications/radio/fllog/default.nix
Normal file
34
pkgs/applications/radio/fllog/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fltk13
|
||||
, libjpeg
|
||||
, pkg-config
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.2.7";
|
||||
pname = "fllog";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/fldigi/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-HxToZ+f1IJgDKGPHBeVuS7rRkh3+KfpyoYPBwfyqsC8=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
fltk13
|
||||
libjpeg
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Digital modem log program";
|
||||
homepage = "https://sourceforge.net/projects/fldigi/";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ dysinger ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
34
pkgs/applications/radio/flmsg/default.nix
Normal file
34
pkgs/applications/radio/flmsg/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fltk13
|
||||
, libjpeg
|
||||
, pkg-config
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "4.0.19";
|
||||
pname = "flmsg";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/fldigi/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-Pm5qAUNbenkX9V3OSQWW09iIRR/WB1jB4ioyRCZmjqs=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
fltk13
|
||||
libjpeg
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Digital modem message program";
|
||||
homepage = "https://sourceforge.net/projects/fldigi/";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ dysinger ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
36
pkgs/applications/radio/flrig/default.nix
Normal file
36
pkgs/applications/radio/flrig/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fltk13
|
||||
, libjpeg
|
||||
, eudev
|
||||
, pkg-config
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.4.5";
|
||||
pname = "flrig";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/fldigi/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-Zj/LkP1nSm1zLKLxuGfaKuVuP8jaVlvK/TzX504VKHk=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
fltk13
|
||||
libjpeg
|
||||
eudev
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Digital modem rig control program";
|
||||
homepage = "https://sourceforge.net/projects/fldigi/";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ dysinger ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
34
pkgs/applications/radio/flwrap/default.nix
Normal file
34
pkgs/applications/radio/flwrap/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fltk13
|
||||
, libjpeg
|
||||
, pkg-config
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.3.5";
|
||||
pname = "flwrap";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/fldigi/${pname}-${version}.tar.gz";
|
||||
sha256 = "0qqivqkkravcg7j45740xfky2q3k7czqpkj6y364qff424q2pppg";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
fltk13
|
||||
libjpeg
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Digital modem file transfer program";
|
||||
homepage = "https://sourceforge.net/projects/fldigi/";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ dysinger ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
53
pkgs/applications/radio/freedv/default.nix
Normal file
53
pkgs/applications/radio/freedv/default.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ config
|
||||
, lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, codec2
|
||||
, libpulseaudio
|
||||
, libsamplerate
|
||||
, libsndfile
|
||||
, lpcnetfreedv
|
||||
, portaudio
|
||||
, speexdsp
|
||||
, hamlib
|
||||
, wxGTK31-gtk3
|
||||
, pulseSupport ? config.pulseaudio or stdenv.isLinux
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "freedv";
|
||||
version = "1.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "drowe67";
|
||||
repo = "freedv-gui";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-0E7r/7+AQRPIFAcE6O1WE0NYiKzAlBR0jKbssqWvRMU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [
|
||||
codec2
|
||||
libsamplerate
|
||||
libsndfile
|
||||
lpcnetfreedv
|
||||
speexdsp
|
||||
hamlib
|
||||
wxGTK31-gtk3
|
||||
] ++ (if pulseSupport then [ libpulseaudio ] else [ portaudio ]);
|
||||
|
||||
cmakeFlags = [
|
||||
"-DUSE_INTERNAL_CODEC2:BOOL=FALSE"
|
||||
"-DUSE_STATIC_DEPS:BOOL=FALSE"
|
||||
] ++ lib.optionals pulseSupport [ "-DUSE_PULSEAUDIO:BOOL=TRUE" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://freedv.org/";
|
||||
description = "Digital voice for HF radio";
|
||||
license = licenses.lgpl21;
|
||||
maintainers = with maintainers; [ mvs ];
|
||||
platforms = platforms.unix;
|
||||
broken = stdenv.isDarwin; # see https://github.com/NixOS/nixpkgs/issues/165422
|
||||
};
|
||||
}
|
||||
110
pkgs/applications/radio/gnss-sdr/default.nix
Normal file
110
pkgs/applications/radio/gnss-sdr/default.nix
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, armadillo
|
||||
, cmake
|
||||
, gmp
|
||||
, glog
|
||||
, gtest
|
||||
, openssl
|
||||
, gflags
|
||||
, gnuradio
|
||||
, thrift
|
||||
, enableRawUdp ? true, libpcap
|
||||
, orc
|
||||
, pkg-config
|
||||
, blas, lapack
|
||||
, matio
|
||||
, pugixml
|
||||
, protobuf
|
||||
}:
|
||||
|
||||
gnuradio.pkgs.mkDerivation rec {
|
||||
pname = "gnss-sdr";
|
||||
version = "0.0.17";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gnss-sdr";
|
||||
repo = "gnss-sdr";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-0aAjkrVAswoRL/KANBSZ5Jq4Y9VwOHZKUKLpXDdKtk8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Use the relative install location for volk_gnsssdr_module and
|
||||
# cpu_features which is bundled in the source. NOTE: Perhaps this patch
|
||||
# should be sent upstream.
|
||||
./fix_libcpu_features_install_path.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
gnuradio.unwrapped.python
|
||||
gnuradio.unwrapped.python.pkgs.Mako
|
||||
gnuradio.unwrapped.python.pkgs.six
|
||||
];
|
||||
checkInputs = [
|
||||
gtest
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gmp
|
||||
armadillo
|
||||
glog
|
||||
gflags
|
||||
openssl
|
||||
orc
|
||||
blas lapack
|
||||
matio
|
||||
pugixml
|
||||
protobuf
|
||||
gnuradio.unwrapped.boost
|
||||
] ++ lib.optionals (gnuradio.hasFeature "gr-uhd") [
|
||||
gnuradio.unwrapped.uhd
|
||||
] ++ (if (lib.versionAtLeast gnuradio.unwrapped.versionAttr.major "3.10") then [
|
||||
gnuradio.unwrapped.spdlog
|
||||
] else [
|
||||
gnuradio.unwrapped.log4cpp
|
||||
]) ++ lib.optionals (enableRawUdp) [
|
||||
libpcap
|
||||
] ++ lib.optionals (gnuradio.hasFeature "gr-ctrlport") [
|
||||
thrift
|
||||
gnuradio.unwrapped.python.pkgs.thrift
|
||||
] ++ lib.optionals (gnuradio.hasFeature "gr-pdu" || gnuradio.hasFeature "gr-iio") [
|
||||
gnuradio.unwrapped.libiio
|
||||
] ++ lib.optionals (gnuradio.hasFeature "gr-pdu") [
|
||||
gnuradio.unwrapped.libad9361
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DGFlags_INCLUDE_DIRS=${gflags}/include"
|
||||
"-DGLOG_INCLUDE_DIR=${glog}/include"
|
||||
# Should use .dylib if darwin support is requested
|
||||
"-DGFlags_LIBS=${gflags}/lib/libgflags.so"
|
||||
"-DGLOG_LIBRARIES=${glog}/lib/libglog.so"
|
||||
# Use our dependencies glog, gflags and armadillo dependencies
|
||||
"-DENABLE_OWN_GLOG=OFF"
|
||||
"-DENABLE_OWN_ARMADILLO=OFF"
|
||||
"-DENABLE_ORC=ON"
|
||||
"-DENABLE_LOG=ON"
|
||||
"-DENABLE_RAW_UDP=${if enableRawUdp then "ON" else "OFF"}"
|
||||
"-DENABLE_UHD=${if (gnuradio.hasFeature "gr-uhd") then "ON" else "OFF"}"
|
||||
"-DENABLE_FMCOMMS2=${if (gnuradio.hasFeature "gr-iio" && gnuradio.hasFeature "gr-pdu") then "ON" else "OFF"}"
|
||||
"-DENABLE_PLUTOSDR=${if (gnuradio.hasFeature "gr-iio") then "ON" else "OFF"}"
|
||||
"-DENABLE_AD9361=${if (gnuradio.hasFeature "gr-pdu") then "ON" else "OFF"}"
|
||||
"-DENABLE_UNIT_TESTING=OFF"
|
||||
|
||||
# gnss-sdr doesn't truly depend on BLAS or LAPACK, as long as
|
||||
# armadillo is built using both, so skip checking for them.
|
||||
"-DBLAS_LIBRARIES=-lblas"
|
||||
"-DLAPACK_LIBRARIES=-llapack"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An open source Global Navigation Satellite Systems software-defined receiver";
|
||||
homepage = "https://gnss-sdr.org/";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
--- i/CMakeLists.txt
|
||||
+++ w/CMakeLists.txt
|
||||
@@ -1210,7 +1210,7 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build
|
||||
CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS}
|
||||
-DCMAKE_BUILD_TYPE=$<$<CONFIG:None>:None>$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:NoOptWithASM>$<$<CONFIG:Coverage>:Coverage>$<$<CONFIG:O2WithASM>:O2WithASM>$<$<CONFIG:O3WithASM>:O3WithASM>$<$<CONFIG:ASAN>:ASAN>
|
||||
- -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
|
||||
+ -DCMAKE_INSTALL_LIBDIR=lib
|
||||
DOWNLOAD_COMMAND ""
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
@@ -1248,7 +1248,7 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
)
|
||||
set(VOLK_GNSSSDR_BUILD_BYPRODUCTS
|
||||
${VOLK_GNSSSDR_BUILD_BYPRODUCTS}
|
||||
- ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
+ ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -1261,7 +1261,7 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build
|
||||
CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS}
|
||||
-DCMAKE_BUILD_TYPE=$<$<CONFIG:None>:None>$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:NoOptWithASM>$<$<CONFIG:Coverage>:Coverage>$<$<CONFIG:O2WithASM>:O2WithASM>$<$<CONFIG:O3WithASM>:O3WithASM>$<$<CONFIG:ASAN>:ASAN>
|
||||
- -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
|
||||
+ -DCMAKE_INSTALL_LIBDIR=lib
|
||||
DOWNLOAD_COMMAND ""
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
@@ -1280,7 +1280,7 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build
|
||||
CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS}
|
||||
-DCMAKE_BUILD_TYPE=$<$<CONFIG:None>:None>$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:NoOptWithASM>$<$<CONFIG:Coverage>:Coverage>$<$<CONFIG:O2WithASM>:O2WithASM>$<$<CONFIG:O3WithASM>:O3WithASM>$<$<CONFIG:ASAN>:ASAN>
|
||||
- -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
|
||||
+ -DCMAKE_INSTALL_LIBDIR=lib
|
||||
DOWNLOAD_COMMAND ""
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
@@ -1319,7 +1319,7 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
if(CMAKE_VERSION VERSION_GREATER 3.0 AND SUPPORTED_CPU_FEATURES_ARCH)
|
||||
if(NOT CPUFEATURES_FOUND AND ENABLE_CPUFEATURES)
|
||||
set_target_properties(Volkgnsssdr::volkgnsssdr PROPERTIES
|
||||
- INTERFACE_LINK_LIBRARIES ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
+ INTERFACE_LINK_LIBRARIES ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
293
pkgs/applications/radio/gnuradio/3.8.nix
Normal file
293
pkgs/applications/radio/gnuradio/3.8.nix
Normal file
|
|
@ -0,0 +1,293 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, cmake
|
||||
# Remove gcc and python references
|
||||
, removeReferencesTo
|
||||
, pkg-config
|
||||
, volk
|
||||
, cppunit
|
||||
, swig
|
||||
, orc
|
||||
, boost
|
||||
, log4cpp
|
||||
, mpir
|
||||
, doxygen
|
||||
, python
|
||||
, codec2
|
||||
, gsm
|
||||
, thrift
|
||||
, fftwFloat
|
||||
, alsa-lib
|
||||
, libjack2
|
||||
, CoreAudio
|
||||
, uhd
|
||||
, SDL
|
||||
, gsl
|
||||
, cppzmq
|
||||
, zeromq
|
||||
# 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"
|
||||
, versionAttr ? {
|
||||
major = "3.8";
|
||||
minor = "5";
|
||||
patch = "0";
|
||||
}
|
||||
}:
|
||||
|
||||
let
|
||||
sourceSha256 = "sha256-p4VFjTE0GXmdA7QGhWSUzO/WxJ+8Dq3JEnOABtQtJUU=";
|
||||
featuresInfo = {
|
||||
# Needed always
|
||||
basic = {
|
||||
native = [
|
||||
cmake
|
||||
pkg-config
|
||||
orc
|
||||
];
|
||||
runtime = [
|
||||
boost
|
||||
log4cpp
|
||||
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.pkgs; [
|
||||
Mako
|
||||
six
|
||||
];
|
||||
};
|
||||
volk = {
|
||||
cmakeEnableFlag = "VOLK";
|
||||
runtime = [
|
||||
volk
|
||||
];
|
||||
};
|
||||
doxygen = {
|
||||
native = [ doxygen ];
|
||||
cmakeEnableFlag = "DOXYGEN";
|
||||
};
|
||||
sphinx = {
|
||||
pythonNative = with python.pkgs; [ sphinx ];
|
||||
cmakeEnableFlag = "SPHINX";
|
||||
};
|
||||
python-support = {
|
||||
pythonRuntime = [ python.pkgs.six ];
|
||||
native = [
|
||||
swig
|
||||
python
|
||||
];
|
||||
cmakeEnableFlag = "PYTHON";
|
||||
};
|
||||
testing-support = {
|
||||
native = [ cppunit ];
|
||||
cmakeEnableFlag = "TESTING";
|
||||
};
|
||||
gnuradio-runtime = {
|
||||
cmakeEnableFlag = "GNURADIO_RUNTIME";
|
||||
};
|
||||
gr-ctrlport = {
|
||||
cmakeEnableFlag = "GR_CTRLPORT";
|
||||
native = [
|
||||
swig
|
||||
];
|
||||
runtime = [
|
||||
thrift
|
||||
];
|
||||
pythonRuntime = with python.pkgs; [
|
||||
python.pkgs.thrift
|
||||
# For gr-perf-monitorx
|
||||
matplotlib
|
||||
networkx
|
||||
];
|
||||
};
|
||||
gnuradio-companion = {
|
||||
pythonRuntime = with python.pkgs; [
|
||||
pyyaml
|
||||
Mako
|
||||
numpy
|
||||
pygobject3
|
||||
];
|
||||
runtime = [
|
||||
gtk3
|
||||
pango
|
||||
gobject-introspection
|
||||
cairo
|
||||
];
|
||||
cmakeEnableFlag = "GRC";
|
||||
};
|
||||
gr-blocks = {
|
||||
cmakeEnableFlag = "GR_BLOCKS";
|
||||
};
|
||||
gr-fec = {
|
||||
cmakeEnableFlag = "GR_FEC";
|
||||
};
|
||||
gr-fft = {
|
||||
runtime = [ fftwFloat ];
|
||||
cmakeEnableFlag = "GR_FFT";
|
||||
};
|
||||
gr-filter = {
|
||||
runtime = [ fftwFloat ];
|
||||
cmakeEnableFlag = "GR_FILTER";
|
||||
};
|
||||
gr-analog = {
|
||||
cmakeEnableFlag = "GR_ANALOG";
|
||||
};
|
||||
gr-digital = {
|
||||
cmakeEnableFlag = "GR_DIGITAL";
|
||||
};
|
||||
gr-dtv = {
|
||||
cmakeEnableFlag = "GR_DTV";
|
||||
};
|
||||
gr-audio = {
|
||||
runtime = []
|
||||
++ lib.optionals stdenv.isLinux [ alsa-lib libjack2 ]
|
||||
++ lib.optionals stdenv.isDarwin [ CoreAudio ]
|
||||
;
|
||||
cmakeEnableFlag = "GR_AUDIO";
|
||||
};
|
||||
gr-channels = {
|
||||
cmakeEnableFlag = "GR_CHANNELS";
|
||||
};
|
||||
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-utils = {
|
||||
cmakeEnableFlag = "GR_UTILS";
|
||||
pythonRuntime = with python.pkgs; [
|
||||
# For gr_plot
|
||||
matplotlib
|
||||
];
|
||||
};
|
||||
gr-modtool = {
|
||||
pythonRuntime = with python.pkgs; [
|
||||
setuptools
|
||||
click
|
||||
click-plugins
|
||||
];
|
||||
cmakeEnableFlag = "GR_MODTOOL";
|
||||
};
|
||||
gr-video-sdl = {
|
||||
runtime = [ SDL ];
|
||||
cmakeEnableFlag = "GR_VIDEO_SDL";
|
||||
};
|
||||
gr-vocoder = {
|
||||
runtime = [ codec2 gsm ];
|
||||
cmakeEnableFlag = "GR_VOCODER";
|
||||
};
|
||||
gr-wavelet = {
|
||||
cmakeEnableFlag = "GR_WAVELET";
|
||||
runtime = [ gsl ];
|
||||
};
|
||||
gr-zeromq = {
|
||||
runtime = [ cppzmq zeromq ];
|
||||
cmakeEnableFlag = "GR_ZEROMQ";
|
||||
};
|
||||
};
|
||||
shared = (import ./shared.nix {
|
||||
inherit
|
||||
stdenv
|
||||
lib
|
||||
python
|
||||
removeReferencesTo
|
||||
featuresInfo
|
||||
features
|
||||
versionAttr
|
||||
sourceSha256
|
||||
overrideSrc
|
||||
fetchFromGitHub
|
||||
;
|
||||
qt = qt5;
|
||||
gtk = gtk3;
|
||||
});
|
||||
inherit (shared) hasFeature; # function
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit pname;
|
||||
inherit (shared)
|
||||
version
|
||||
src
|
||||
nativeBuildInputs
|
||||
buildInputs
|
||||
disallowedReferences
|
||||
stripDebugList
|
||||
doCheck
|
||||
dontWrapPythonPrograms
|
||||
dontWrapQtApps
|
||||
meta
|
||||
;
|
||||
patches = [
|
||||
# Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
|
||||
./modtool-newmod-permissions.3_8.patch
|
||||
# Fix compilation with boost 177
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gnuradio/gnuradio/commit/2c767bb260a25b415e8c9c4b3ea37280b2127cec.patch";
|
||||
sha256 = "sha256-l4dSzkXb5s3vcCeuKMMwiKfv83hFI9Yg+EMEX+sl+Uo=";
|
||||
})
|
||||
];
|
||||
passthru = shared.passthru // {
|
||||
# Deps that are potentially overriden and are used inside GR plugins - the same version must
|
||||
inherit
|
||||
boost
|
||||
volk
|
||||
log4cpp
|
||||
;
|
||||
} // lib.optionalAttrs (hasFeature "gr-uhd") {
|
||||
inherit uhd;
|
||||
} // lib.optionalAttrs (hasFeature "gr-qtgui") {
|
||||
inherit (libsForQt5) qwt;
|
||||
};
|
||||
cmakeFlags = shared.cmakeFlags
|
||||
# From some reason, if these are not set, libcodec2 and gsm are not
|
||||
# detected properly. The issue is reported upstream:
|
||||
# https://github.com/gnuradio/gnuradio/issues/4278
|
||||
# The above issue was fixed for GR3.9 without a backporting patch.
|
||||
#
|
||||
# NOTE: qradiolink needs libcodec2 to be detected in
|
||||
# order to build, see https://github.com/qradiolink/qradiolink/issues/67
|
||||
++ lib.optionals (hasFeature "gr-vocoder") [
|
||||
"-DLIBCODEC2_FOUND=TRUE"
|
||||
"-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so"
|
||||
"-DLIBCODEC2_INCLUDE_DIRS=${codec2}/include"
|
||||
"-DLIBCODEC2_HAS_FREEDV_API=ON"
|
||||
"-DLIBGSM_FOUND=TRUE"
|
||||
"-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so"
|
||||
"-DLIBGSM_INCLUDE_DIRS=${gsm}/include/gsm"
|
||||
]
|
||||
++ lib.optionals (hasFeature "volk" && volk != null) [
|
||||
"-DENABLE_INTERNAL_VOLK=OFF"
|
||||
]
|
||||
;
|
||||
|
||||
postInstall = shared.postInstall
|
||||
# This is the only python reference worth removing, if needed (3.7 doesn't
|
||||
# set that reference).
|
||||
+ lib.optionalString (!hasFeature "python-support") ''
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
|
||||
''
|
||||
;
|
||||
}
|
||||
303
pkgs/applications/radio/gnuradio/3.9.nix
Normal file
303
pkgs/applications/radio/gnuradio/3.9.nix
Normal file
|
|
@ -0,0 +1,303 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, cmake
|
||||
# Remove gcc and python references
|
||||
, removeReferencesTo
|
||||
, pkg-config
|
||||
, volk
|
||||
, cppunit
|
||||
, orc
|
||||
, boost
|
||||
, log4cpp
|
||||
, mpir
|
||||
, doxygen
|
||||
, python
|
||||
, codec2
|
||||
, gsm
|
||||
, fftwFloat
|
||||
, alsa-lib
|
||||
, libjack2
|
||||
, CoreAudio
|
||||
, uhd
|
||||
, SDL
|
||||
, gsl
|
||||
, soapysdr
|
||||
, libsodium
|
||||
, libsndfile
|
||||
, libunwind
|
||||
, thrift
|
||||
, cppzmq
|
||||
, zeromq
|
||||
# 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"
|
||||
, versionAttr ? {
|
||||
major = "3.9";
|
||||
minor = "6";
|
||||
patch = "0";
|
||||
}
|
||||
}:
|
||||
|
||||
let
|
||||
sourceSha256 = "sha256-0JODgv9MNOkHDQYTVCZMzjr/G542+NvGP9wlH9iwLeg=";
|
||||
featuresInfo = {
|
||||
# Needed always
|
||||
basic = {
|
||||
native = [
|
||||
cmake
|
||||
pkg-config
|
||||
orc
|
||||
];
|
||||
runtime = [
|
||||
volk
|
||||
boost
|
||||
log4cpp
|
||||
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.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 = with python.pkgs; [
|
||||
python.pkgs.thrift
|
||||
# For gr-perf-monitorx
|
||||
matplotlib
|
||||
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";
|
||||
};
|
||||
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
|
||||
];
|
||||
};
|
||||
gr-analog = {
|
||||
cmakeEnableFlag = "GR_ANALOG";
|
||||
};
|
||||
gr-digital = {
|
||||
cmakeEnableFlag = "GR_DIGITAL";
|
||||
};
|
||||
gr-dtv = {
|
||||
cmakeEnableFlag = "GR_DTV";
|
||||
};
|
||||
gr-audio = {
|
||||
runtime = []
|
||||
++ lib.optionals stdenv.isLinux [ alsa-lib libjack2 ]
|
||||
++ lib.optionals stdenv.isDarwin [ CoreAudio ]
|
||||
;
|
||||
cmakeEnableFlag = "GR_AUDIO";
|
||||
};
|
||||
gr-channels = {
|
||||
cmakeEnableFlag = "GR_CHANNELS";
|
||||
};
|
||||
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
|
||||
];
|
||||
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 zeromq ];
|
||||
cmakeEnableFlag = "GR_ZEROMQ";
|
||||
};
|
||||
gr-network = {
|
||||
cmakeEnableFlag = "GR_NETWORK";
|
||||
};
|
||||
gr-soapy = {
|
||||
cmakeEnableFlag = "GR_SOAPY";
|
||||
runtime = [
|
||||
soapysdr
|
||||
];
|
||||
};
|
||||
};
|
||||
shared = (import ./shared.nix {
|
||||
inherit
|
||||
stdenv
|
||||
lib
|
||||
python
|
||||
removeReferencesTo
|
||||
featuresInfo
|
||||
features
|
||||
versionAttr
|
||||
sourceSha256
|
||||
overrideSrc
|
||||
fetchFromGitHub
|
||||
;
|
||||
qt = qt5;
|
||||
gtk = gtk3;
|
||||
});
|
||||
inherit (shared) hasFeature; # function
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit pname;
|
||||
inherit (shared)
|
||||
version
|
||||
src
|
||||
nativeBuildInputs
|
||||
buildInputs
|
||||
cmakeFlags
|
||||
disallowedReferences
|
||||
stripDebugList
|
||||
doCheck
|
||||
dontWrapPythonPrograms
|
||||
dontWrapQtApps
|
||||
meta
|
||||
;
|
||||
patches = [
|
||||
# Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
|
||||
./modtool-newmod-permissions.patch
|
||||
];
|
||||
passthru = shared.passthru // {
|
||||
# Deps that are potentially overriden and are used inside GR plugins - the same version must
|
||||
inherit
|
||||
boost
|
||||
volk
|
||||
log4cpp
|
||||
;
|
||||
} // lib.optionalAttrs (hasFeature "gr-uhd") {
|
||||
inherit uhd;
|
||||
} // 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") ''
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python} $(readlink -f $out/lib/libgnuradio-runtime.so)
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
|
||||
''
|
||||
;
|
||||
}
|
||||
324
pkgs/applications/radio/gnuradio/default.nix
Normal file
324
pkgs/applications/radio/gnuradio/default.nix
Normal file
|
|
@ -0,0 +1,324 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, 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
|
||||
, CoreAudio
|
||||
, uhd
|
||||
, SDL
|
||||
, gsl
|
||||
, soapysdr
|
||||
, libsodium
|
||||
, libsndfile
|
||||
, libunwind
|
||||
, thrift
|
||||
, cppzmq
|
||||
, zeromq
|
||||
# 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"
|
||||
, versionAttr ? {
|
||||
major = "3.10";
|
||||
minor = "2";
|
||||
patch = "0";
|
||||
}
|
||||
}:
|
||||
|
||||
let
|
||||
sourceSha256 = "sha256-WcfmW39wHhFdpbdBSjOfuDkxL8/fuMjjJoLUyCUud/o=";
|
||||
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.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 = with python.pkgs; [
|
||||
python.pkgs.thrift
|
||||
# For gr-perf-monitorx
|
||||
matplotlib
|
||||
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";
|
||||
};
|
||||
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
|
||||
];
|
||||
};
|
||||
gr-analog = {
|
||||
cmakeEnableFlag = "GR_ANALOG";
|
||||
};
|
||||
gr-digital = {
|
||||
cmakeEnableFlag = "GR_DIGITAL";
|
||||
};
|
||||
gr-dtv = {
|
||||
cmakeEnableFlag = "GR_DTV";
|
||||
};
|
||||
gr-audio = {
|
||||
runtime = []
|
||||
++ lib.optionals stdenv.isLinux [ alsa-lib libjack2 ]
|
||||
++ lib.optionals stdenv.isDarwin [ CoreAudio ]
|
||||
;
|
||||
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 zeromq ];
|
||||
cmakeEnableFlag = "GR_ZEROMQ";
|
||||
};
|
||||
gr-network = {
|
||||
cmakeEnableFlag = "GR_NETWORK";
|
||||
};
|
||||
gr-soapy = {
|
||||
cmakeEnableFlag = "GR_SOAPY";
|
||||
runtime = [
|
||||
soapysdr
|
||||
];
|
||||
};
|
||||
};
|
||||
shared = (import ./shared.nix {
|
||||
inherit
|
||||
stdenv
|
||||
lib
|
||||
python
|
||||
removeReferencesTo
|
||||
featuresInfo
|
||||
features
|
||||
versionAttr
|
||||
sourceSha256
|
||||
overrideSrc
|
||||
fetchFromGitHub
|
||||
;
|
||||
qt = qt5;
|
||||
gtk = gtk3;
|
||||
});
|
||||
inherit (shared) hasFeature; # function
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit pname;
|
||||
inherit (shared)
|
||||
version
|
||||
src
|
||||
nativeBuildInputs
|
||||
buildInputs
|
||||
cmakeFlags
|
||||
disallowedReferences
|
||||
stripDebugList
|
||||
doCheck
|
||||
dontWrapPythonPrograms
|
||||
dontWrapQtApps
|
||||
meta
|
||||
;
|
||||
patches = [
|
||||
# Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
|
||||
./modtool-newmod-permissions.patch
|
||||
];
|
||||
passthru = shared.passthru // {
|
||||
# Deps that are potentially overriden and are used inside GR plugins - the same version must
|
||||
inherit
|
||||
boost
|
||||
volk
|
||||
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") ''
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python} $(readlink -f $out/lib/libgnuradio-runtime.so)
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
|
||||
''
|
||||
;
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
commit bf870157e0a9c3d19e968afb276b4e7d96b4df30
|
||||
Author: Doron Behar <doron.behar@gmail.com>
|
||||
Date: Thu Oct 21 13:10:42 2021 +0300
|
||||
|
||||
gr-modtool: Don't copy source permissions
|
||||
|
||||
This is needed for systems such as NixOS, where the build tree isn't
|
||||
writable and the files copied should be.
|
||||
|
||||
Signed-off-by: Doron Behar <doron.behar@gmail.com>
|
||||
|
||||
diff --git a/gr-utils/python/modtool/core/newmod.py b/gr-utils/python/modtool/core/newmod.py
|
||||
index 123059907..0c734e7ae 100644
|
||||
--- a/gr-utils/python/modtool/core/newmod.py
|
||||
+++ b/gr-utils/python/modtool/core/newmod.py
|
||||
@@ -78,7 +78,9 @@ class ModToolNewModule(ModTool):
|
||||
self._setup_scm(mode='new')
|
||||
logger.info("Creating out-of-tree module in {}...".format(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)
|
||||
os.chdir(self.dir)
|
||||
except OSError:
|
||||
raise ModToolException('Could not create directory {}.'.format(self.dir))
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
diff --git c/gr-utils/modtool/core/newmod.py w/gr-utils/modtool/core/newmod.py
|
||||
index babebfcde..9a02f663e 100644
|
||||
--- c/gr-utils/modtool/core/newmod.py
|
||||
+++ w/gr-utils/modtool/core/newmod.py
|
||||
@@ -62,7 +62,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)
|
||||
try:
|
||||
shutil.copyfile(os.path.join(gr.prefix(), 'share', 'gnuradio', 'clang-format.conf'),
|
||||
os.path.join(self.dir, '.clang-format'))
|
||||
131
pkgs/applications/radio/gnuradio/shared.nix
Normal file
131
pkgs/applications/radio/gnuradio/shared.nix
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
{ lib, stdenv
|
||||
, python
|
||||
, qt
|
||||
, gtk
|
||||
, removeReferencesTo
|
||||
, featuresInfo
|
||||
, features
|
||||
, versionAttr
|
||||
, sourceSha256
|
||||
# If overriden. No need to set default values, as they are given defaults in
|
||||
# the main expressions
|
||||
, overrideSrc
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
rec {
|
||||
version = builtins.concatStringsSep "." (
|
||||
lib.attrVals [ "major" "minor" "patch" ] versionAttr
|
||||
);
|
||||
src = if overrideSrc != {} then
|
||||
overrideSrc
|
||||
else
|
||||
fetchFromGitHub {
|
||||
repo = "gnuradio";
|
||||
owner = "gnuradio";
|
||||
rev = "v${version}";
|
||||
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: (
|
||||
if hasFeature feat then
|
||||
(if builtins.hasAttr "native" info then info.native else []) ++
|
||||
(if builtins.hasAttr "pythonNative" info then info.pythonNative else [])
|
||||
else
|
||||
[]
|
||||
)
|
||||
) featuresInfo);
|
||||
buildInputs = lib.flatten (lib.mapAttrsToList (
|
||||
feat: info: (
|
||||
if hasFeature feat then
|
||||
(if builtins.hasAttr "runtime" info then info.runtime else []) ++
|
||||
(if builtins.hasAttr "pythonRuntime" info then info.pythonRuntime else [])
|
||||
else
|
||||
[]
|
||||
)
|
||||
) featuresInfo);
|
||||
cmakeFlags = 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.
|
||||
"-DENABLE_DEFAULT=OFF"
|
||||
else
|
||||
if hasFeature feat then
|
||||
"-DENABLE_${info.cmakeEnableFlag}=ON"
|
||||
else
|
||||
"-DENABLE_${info.cmakeEnableFlag}=OFF"
|
||||
)) featuresInfo
|
||||
;
|
||||
disallowedReferences = [
|
||||
# TODO: Should this be conditional?
|
||||
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") ''
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libgnuradio-runtime.so)
|
||||
''
|
||||
;
|
||||
# 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
|
||||
;
|
||||
} // 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;
|
||||
# Tests should succeed, but it's hard to get LD_LIBRARY_PATH right in order
|
||||
# for it to happen.
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
description = "Software Defined Radio (SDR) software";
|
||||
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 = licenses.gpl3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ doronbehar bjornfor fpletz ];
|
||||
};
|
||||
}
|
||||
178
pkgs/applications/radio/gnuradio/wrapper.nix
Normal file
178
pkgs/applications/radio/gnuradio/wrapper.nix
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
{ 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 wrapGAppsHook
|
||||
, 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 ? []
|
||||
# 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) ]
|
||||
# Add the extraPackages as python modules as well
|
||||
++ (builtins.map unwrapped.python.pkgs.toPythonModule extraPackages)
|
||||
++ lib.flatten (lib.mapAttrsToList (
|
||||
feat: info: (
|
||||
if unwrapped.hasFeature feat then
|
||||
(if builtins.hasAttr "pythonRuntime" info then info.pythonRuntime else [])
|
||||
else
|
||||
[]
|
||||
)
|
||||
) unwrapped.featuresInfo)
|
||||
;
|
||||
pythonEnv = unwrapped.python.withPackages(ps: pythonPkgs);
|
||||
|
||||
pname = unwrapped.pname + "-wrapped";
|
||||
inherit (unwrapped) version;
|
||||
makeWrapperArgs = builtins.concatStringsSep " " ([
|
||||
]
|
||||
# Emulating wrapGAppsHook & 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" [
|
||||
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 (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
|
||||
(builtins.map lib.getBin [
|
||||
unwrapped.qt.qtbase
|
||||
unwrapped.qt.qtwayland
|
||||
])
|
||||
}"
|
||||
"--prefix" "QML2_IMPORT_PATH" ":"
|
||||
"${
|
||||
lib.makeSearchPath
|
||||
unwrapped.qt.qtbase.qtQmlPrefix
|
||||
(builtins.map lib.getBin [
|
||||
unwrapped.qt.qtbase
|
||||
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"
|
||||
(builtins.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
|
||||
93
pkgs/applications/radio/gqrx/default.nix
Normal file
93
pkgs/applications/radio/gqrx/default.nix
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, qt5
|
||||
, gnuradio3_8Minimal
|
||||
, thrift
|
||||
, mpir
|
||||
, fftwFloat
|
||||
, alsa-lib
|
||||
, libjack2
|
||||
, wrapGAppsHook
|
||||
# drivers (optional):
|
||||
, rtl-sdr
|
||||
, hackrf
|
||||
, pulseaudioSupport ? true, libpulseaudio
|
||||
, portaudioSupport ? false, portaudio
|
||||
}:
|
||||
|
||||
assert pulseaudioSupport -> libpulseaudio != null;
|
||||
assert portaudioSupport -> portaudio != null;
|
||||
# audio backends are mutually exclusive
|
||||
assert !(pulseaudioSupport && portaudioSupport);
|
||||
|
||||
gnuradio3_8Minimal.pkgs.mkDerivation rec {
|
||||
pname = "gqrx";
|
||||
version = "2.15.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gqrx-sdr";
|
||||
repo = "gqrx";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-KQBtYVEfOXpzfxNMgTu6Hup7XpjubrpvZazcFlml4Kg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
qt5.wrapQtAppsHook
|
||||
wrapGAppsHook
|
||||
];
|
||||
buildInputs = [
|
||||
gnuradio3_8Minimal.unwrapped.log4cpp
|
||||
mpir
|
||||
fftwFloat
|
||||
alsa-lib
|
||||
libjack2
|
||||
gnuradio3_8Minimal.unwrapped.boost
|
||||
qt5.qtbase
|
||||
qt5.qtsvg
|
||||
gnuradio3_8Minimal.pkgs.osmosdr
|
||||
rtl-sdr
|
||||
hackrf
|
||||
] ++ lib.optionals (gnuradio3_8Minimal.hasFeature "gr-ctrlport") [
|
||||
thrift
|
||||
gnuradio3_8Minimal.unwrapped.python.pkgs.thrift
|
||||
] ++ lib.optionals pulseaudioSupport [ libpulseaudio ]
|
||||
++ lib.optionals portaudioSupport [ portaudio ];
|
||||
|
||||
cmakeFlags =
|
||||
let
|
||||
audioBackend =
|
||||
if pulseaudioSupport
|
||||
then "Pulseaudio"
|
||||
else if portaudioSupport
|
||||
then "Portaudio"
|
||||
else "Gr-audio";
|
||||
in [
|
||||
"-DLINUX_AUDIO_BACKEND=${audioBackend}"
|
||||
];
|
||||
|
||||
# Prevent double-wrapping, inject wrapper args manually instead.
|
||||
dontWrapGApps = true;
|
||||
preFixup = ''
|
||||
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Software defined radio (SDR) receiver";
|
||||
longDescription = ''
|
||||
Gqrx is a software defined radio receiver powered by GNU Radio and the Qt
|
||||
GUI toolkit. It can process I/Q data from many types of input devices,
|
||||
including Funcube Dongle Pro/Pro+, rtl-sdr, HackRF, and Universal
|
||||
Software Radio Peripheral (USRP) devices.
|
||||
'';
|
||||
homepage = "https://gqrx.dk/";
|
||||
# Some of the code comes from the Cutesdr project, with a BSD license, but
|
||||
# it's currently unknown which version of the BSD license that is.
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux; # should work on Darwin / macOS too
|
||||
maintainers = with maintainers; [ bjornfor fpletz ];
|
||||
};
|
||||
}
|
||||
55
pkgs/applications/radio/guglielmo/default.nix
Normal file
55
pkgs/applications/radio/guglielmo/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib, mkDerivation, fetchFromGitHub, cmake, pkg-config
|
||||
, airspy
|
||||
, librtlsdr
|
||||
, fdk_aac
|
||||
, faad2
|
||||
, fftwFloat
|
||||
, libsndfile
|
||||
, libsamplerate
|
||||
, portaudio
|
||||
, qtmultimedia
|
||||
, qwt
|
||||
} :
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "guglielmo";
|
||||
version = "0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "marcogrecopriolo";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0s1iz9s0k897jayiwl3yr9ylpclw6bzcpmzhxqn0mkd7jhgfl4vx";
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
mv $out/linux-bin $out/bin
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [
|
||||
airspy
|
||||
librtlsdr
|
||||
fdk_aac
|
||||
faad2
|
||||
fftwFloat
|
||||
libsndfile
|
||||
libsamplerate
|
||||
portaudio
|
||||
qtmultimedia
|
||||
qwt
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
# guglielmo opens SDR libraries at run time
|
||||
patchelf --add-rpath "${airspy}/lib:${librtlsdr}/lib" $out/bin/.guglielmo-wrapped
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Qt based FM / Dab tuner";
|
||||
homepage = "https://github.com/marcogrecopriolo/guglielmo";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = [ maintainers.markuskowa ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
42
pkgs/applications/radio/hackrf/default.nix
Normal file
42
pkgs/applications/radio/hackrf/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libusb1, fftwSinglePrec }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hackrf";
|
||||
version = "2021.03.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "greatscottgadgets";
|
||||
repo = "hackrf";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-2kEfTco95I9YLz/18nfjJSd7U/HE5sBCEioWL2t804k=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libusb1
|
||||
fftwSinglePrec
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DUDEV_RULES_GROUP=plugdev" "-DUDEV_RULES_PATH=lib/udev/rules.d" ];
|
||||
|
||||
preConfigure = ''
|
||||
cd host
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace host/cmake/modules/FindFFTW.cmake \
|
||||
--replace "find_library (FFTW_LIBRARIES NAMES fftw3)" "find_library (FFTW_LIBRARIES NAMES fftw3f)"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An open source SDR platform";
|
||||
homepage = "https://greatscottgadgets.com/hackrf/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ sjmackenzie ];
|
||||
};
|
||||
}
|
||||
44
pkgs/applications/radio/inspectrum/default.nix
Normal file
44
pkgs/applications/radio/inspectrum/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ lib
|
||||
, gnuradio3_8Minimal
|
||||
, thrift
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, cmake
|
||||
, fftwFloat
|
||||
, qt5
|
||||
, liquid-dsp
|
||||
}:
|
||||
|
||||
gnuradio3_8Minimal.pkgs.mkDerivation rec {
|
||||
pname = "inspectrum";
|
||||
version = "0.2.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "miek";
|
||||
repo = "inspectrum";
|
||||
rev = "v${version}";
|
||||
sha256 = "1x6nyn429pk0f7lqzskrgsbq09mq5787xd4piic95add6n1cc355";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
qt5.wrapQtAppsHook
|
||||
pkg-config
|
||||
];
|
||||
buildInputs = [
|
||||
fftwFloat
|
||||
liquid-dsp
|
||||
qt5.qtbase
|
||||
] ++ lib.optionals (gnuradio3_8Minimal.hasFeature "gr-ctrlport") [
|
||||
thrift
|
||||
gnuradio3_8Minimal.unwrapped.python.pkgs.thrift
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tool for analysing captured signals from sdr receivers";
|
||||
homepage = "https://github.com/miek/inspectrum";
|
||||
maintainers = with maintainers; [ mog ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3Plus;
|
||||
};
|
||||
}
|
||||
38
pkgs/applications/radio/kalibrate-hackrf/default.nix
Normal file
38
pkgs/applications/radio/kalibrate-hackrf/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, fftw, hackrf, libusb1 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "kalibrate-hackrf";
|
||||
version = "unstable-2016-08-27";
|
||||
|
||||
# There are no tags/releases, so use the latest commit from git master.
|
||||
# Currently, the latest commit is from 2016-07-03.
|
||||
src = fetchFromGitHub {
|
||||
owner = "scateu";
|
||||
repo = "kalibrate-hackrf";
|
||||
rev = "2492c20822ca6a49dce97967caf394b1d4b2c43e";
|
||||
sha256 = "1jvn1qx7csgycxpx1k804sm9gk5a0c65z9gh8ybp9awq3pziv0nx";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
|
||||
buildInputs = [ fftw hackrf libusb1 ];
|
||||
|
||||
postInstall = ''
|
||||
mv $out/bin/kal $out/bin/kal-hackrf
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Calculate local oscillator frequency offset in hackrf devices";
|
||||
longDescription = ''
|
||||
Kalibrate, or kal, can scan for GSM base stations in a given frequency
|
||||
band and can use those GSM base stations to calculate the local
|
||||
oscillator frequency offset.
|
||||
|
||||
This package is for hackrf devices.
|
||||
'';
|
||||
homepage = "https://github.com/scateu/kalibrate-hackrf";
|
||||
license = licenses.bsd2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.mog ];
|
||||
};
|
||||
}
|
||||
33
pkgs/applications/radio/kalibrate-rtl/default.nix
Normal file
33
pkgs/applications/radio/kalibrate-rtl/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, fftw, rtl-sdr, libusb1 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "kalibrate-rtl";
|
||||
version = "unstable-2022-02-02";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "steve-m";
|
||||
repo = "kalibrate-rtl";
|
||||
rev = "340003eb0846b069c3edef19ed3363b8ac7b5215";
|
||||
sha256 = "n9mfu8H2OS8dKPNhtJxBfMDp8aHEIcxg/R+kcRNOBpk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
|
||||
buildInputs = [ fftw rtl-sdr libusb1 ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Calculate local oscillator frequency offset in RTL-SDR devices";
|
||||
longDescription = ''
|
||||
Kalibrate, or kal, can scan for GSM base stations in a given frequency
|
||||
band and can use those GSM base stations to calculate the local
|
||||
oscillator frequency offset.
|
||||
|
||||
This package is for RTL-SDR devices.
|
||||
'';
|
||||
homepage = "https://github.com/steve-m/kalibrate-rtl";
|
||||
license = licenses.bsd2;
|
||||
maintainers = with maintainers; [ bjornfor viraptor ];
|
||||
mainProgram = "kal";
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
25
pkgs/applications/radio/kappanhang/default.nix
Normal file
25
pkgs/applications/radio/kappanhang/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub, pkg-config, pulseaudio }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "kappanhang";
|
||||
version = "1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nonoo";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1ycy8avq5s7zspfi0d9klqcwwkpmcaz742cigd7pmcnbbhspcicp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ pulseaudio ];
|
||||
|
||||
vendorSha256 = "1srjngcis42wfskwfqxxj101y9xyzrans1smy53bh1c9zm856xha";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/nonoo/kappanhang";
|
||||
description = "Remote control for Icom radio transceivers";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mvs ];
|
||||
};
|
||||
}
|
||||
28
pkgs/applications/radio/klog/default.nix
Normal file
28
pkgs/applications/radio/klog/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchurl, hamlib, pkg-config, qt5, qtbase, qttools, qtserialport, qtcharts, qmake, wrapQtAppsHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "klog";
|
||||
version = "1.3.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.savannah.nongnu.org/releases/klog/${pname}-${version}.tar.gz";
|
||||
sha256 = "1d5x7rq0mgfrqws3q1y4z8wh2qa3gvsmd0ssf2yqgkyq3fhdrb5c";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config wrapQtAppsHook qmake qttools ];
|
||||
buildInputs = [ hamlib qtbase qtserialport qtcharts ];
|
||||
|
||||
qmakeFlags = [ "KLog.pro" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A multiplatform free hamradio logger";
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
48
pkgs/applications/radio/limesuite/default.nix
Normal file
48
pkgs/applications/radio/limesuite/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake
|
||||
, sqlite, wxGTK30-gtk3, libusb1, soapysdr
|
||||
, mesa_glu, libX11, gnuplot, fltk
|
||||
} :
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "limesuite";
|
||||
version = "20.10.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "myriadrf";
|
||||
repo = "LimeSuite";
|
||||
rev = "v${version}";
|
||||
sha256 = "04wzfhzqmxjsa6bgcr4zd518fln9rbwnbabf48kha84d70vzkdlx";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DOpenGL_GL_PREFERENCE=GLVND"
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libusb1
|
||||
sqlite
|
||||
wxGTK30-gtk3
|
||||
fltk
|
||||
gnuplot
|
||||
libusb1
|
||||
soapysdr
|
||||
mesa_glu
|
||||
libX11
|
||||
];
|
||||
|
||||
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.linux;
|
||||
};
|
||||
}
|
||||
|
||||
41
pkgs/applications/radio/minimodem/default.nix
Normal file
41
pkgs/applications/radio/minimodem/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, autoconf, automake, libtool
|
||||
, fftw, fftwSinglePrec, alsa-lib, libsndfile, libpulseaudio
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.24-1";
|
||||
pname = "minimodem";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kamalmostafa";
|
||||
repo = "minimodem";
|
||||
rev = "${pname}-${version}";
|
||||
sha256 = "1b5xy36fjcp7vkp115dpx4mlmqg2fc7xvxdy648fb8im953bw7ql";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config autoconf automake libtool ];
|
||||
buildInputs = [ fftw fftwSinglePrec alsa-lib libsndfile libpulseaudio ];
|
||||
|
||||
preConfigure = ''
|
||||
aclocal \
|
||||
&& autoheader \
|
||||
&& automake --gnu --add-missing \
|
||||
&& autoconf
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "General-purpose software audio FSK modem";
|
||||
longDescription = ''
|
||||
Minimodem is a command-line program which decodes (or generates) audio
|
||||
modem tones at any specified baud rate, using various framing protocols. It
|
||||
acts a general-purpose software FSK modem, and includes support for various
|
||||
standard FSK protocols such as Bell103, Bell202, RTTY, NOAA SAME, and
|
||||
Caller-ID.
|
||||
'';
|
||||
homepage = "http://www.whence.com/minimodem/";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = with lib.platforms; linux;
|
||||
maintainers = with lib.maintainers; [ relrod ];
|
||||
};
|
||||
}
|
||||
|
||||
35
pkgs/applications/radio/multimon-ng/default.nix
Normal file
35
pkgs/applications/radio/multimon-ng/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, libpulseaudio, libX11 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "multimon-ng";
|
||||
version = "1.1.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "EliasOenal";
|
||||
repo = "multimon-ng";
|
||||
rev = version;
|
||||
sha256 = "01716cfhxfzsab9zjply9giaa4nn4b7rm3p3vizrwi7n253yiwm2";
|
||||
};
|
||||
|
||||
buildInputs = lib.optionals stdenv.isLinux [ libpulseaudio libX11 ];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Multimon is a digital baseband audio protocol decoder";
|
||||
longDescription = ''
|
||||
multimon-ng a fork of multimon, a digital baseband audio
|
||||
protocol decoder for common signaling modes in commercial and
|
||||
amateur radio data services. It decodes the following digital
|
||||
transmission modes:
|
||||
|
||||
POCSAG512 POCSAG1200 POCSAG2400 EAS UFSK1200 CLIPFSK AFSK1200
|
||||
AFSK2400 AFSK2400_2 AFSK2400_3 HAPN4800 FSK9600 DTMF ZVEI1 ZVEI2
|
||||
ZVEI3 DZVEI PZVEI EEA EIA CCIR MORSE CW
|
||||
'';
|
||||
homepage = "https://github.com/EliasOenal/multimon-ng";
|
||||
license = licenses.gpl2Only;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
};
|
||||
}
|
||||
65
pkgs/applications/radio/noaa-apt/default.nix
Normal file
65
pkgs/applications/radio/noaa-apt/default.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, atk
|
||||
, cairo
|
||||
, gdk-pixbuf
|
||||
, glib
|
||||
, gtk3
|
||||
, openssl
|
||||
, pango
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "noaa-apt";
|
||||
version = "1.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "martinber";
|
||||
repo = "noaa-apt";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-A78O5HkD/LyfvjLJjf7PpJDuftkNbaxq7Zs5kNUaULk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
atk
|
||||
cairo
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
openssl
|
||||
pango
|
||||
];
|
||||
|
||||
cargoSha256 = "sha256-o39RvJkaJ8ZPOfLWDqykCLadwHhgBbmOWGQ4hZ6/6BI=";
|
||||
|
||||
preBuild = ''
|
||||
# Used by macro pointing to resource location at compile time.
|
||||
export NOAA_APT_RES_DIR=$out/share/noaa-apt
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# Resources.
|
||||
mkdir -p $out/share/noaa-apt
|
||||
cp -R $src/res/* $out/share/noaa-apt/
|
||||
|
||||
# Desktop icon.
|
||||
install -Dm644 -t $out/share/applications $src/debian/ar.com.mbernardi.noaa-apt.desktop
|
||||
install -Dm644 -t $out/share/icons/hicolor/48x48/apps $src/debian/noaa-apt.png
|
||||
install -Dm644 -t $out/share/icons/hicolor/scalable/apps $src/debian/noaa-apt.svg
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "NOAA APT image decoder";
|
||||
homepage = "https://noaa-apt.mbernardi.com.ar/";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ trepetti ];
|
||||
platforms = platforms.all;
|
||||
changelog = "https://github.com/martinber/noaa-apt/releases/tag/v${version}";
|
||||
};
|
||||
}
|
||||
92
pkgs/applications/radio/openwebrx/default.nix
Normal file
92
pkgs/applications/radio/openwebrx/default.nix
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
{ stdenv, lib, buildPythonPackage, buildPythonApplication, fetchFromGitHub
|
||||
, pkg-config, cmake, setuptools
|
||||
, rtl-sdr, soapysdr-with-plugins, csdr, direwolf
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
js8py = buildPythonPackage rec {
|
||||
pname = "js8py";
|
||||
version = "0.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jketterl";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1j80zclg1cl5clqd00qqa16prz7cyc32bvxqz2mh540cirygq24w";
|
||||
};
|
||||
|
||||
pythonImportsCheck = [ "js8py" "test" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/jketterl/js8py";
|
||||
description = "A library to decode the output of the js8 binary of JS8Call";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ astro ];
|
||||
};
|
||||
};
|
||||
|
||||
owrx_connector = stdenv.mkDerivation rec {
|
||||
pname = "owrx_connector";
|
||||
version = "0.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jketterl";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0gz4nf2frrkx1mpjfjpz2j919fkc99g5lxd8lhva3lgqyisvf4yj";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
rtl-sdr
|
||||
soapysdr-with-plugins
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/jketterl/owrx_connector";
|
||||
description = "A set of connectors that are used by OpenWebRX to interface with SDR hardware";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ astro ];
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
buildPythonApplication rec {
|
||||
pname = "openwebrx";
|
||||
version = "1.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jketterl";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0maxs07yx235xknvkbmhi2zds3vfkd66l6wz6kspz3jzl4c0v1f9";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
setuptools
|
||||
csdr
|
||||
js8py
|
||||
soapysdr-with-plugins
|
||||
owrx_connector
|
||||
direwolf
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "csdr" "owrx" "test" ];
|
||||
|
||||
passthru = {
|
||||
inherit js8py owrx_connector;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/jketterl/openwebrx";
|
||||
description = "A simple DSP library and command-line tool for Software Defined Radio";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ astro ];
|
||||
};
|
||||
}
|
||||
74
pkgs/applications/radio/pothos/default.nix
Normal file
74
pkgs/applications/radio/pothos/default.nix
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
{ lib
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, 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
|
||||
];
|
||||
|
||||
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 = "The Pothos data-flow framework";
|
||||
homepage = "https://github.com/pothosware/PothosCore/wiki";
|
||||
license = licenses.boost;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
101
pkgs/applications/radio/pothos/spuce.patch
Normal file
101
pkgs/applications/radio/pothos/spuce.patch
Normal 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)
|
||||
83
pkgs/applications/radio/qradiolink/default.nix
Normal file
83
pkgs/applications/radio/qradiolink/default.nix
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, libpulseaudio
|
||||
, libconfig
|
||||
# Needs a gnuradio built with qt gui support
|
||||
, gnuradio3_8
|
||||
, thrift
|
||||
# Not gnuradioPackages'
|
||||
, codec2
|
||||
, gmp
|
||||
, gsm
|
||||
, libopus
|
||||
, libjpeg
|
||||
, libsndfile
|
||||
, libftdi
|
||||
, limesuite
|
||||
, protobuf
|
||||
, speex
|
||||
, speexdsp
|
||||
}:
|
||||
|
||||
gnuradio3_8.pkgs.mkDerivation rec {
|
||||
pname = "qradiolink";
|
||||
version = "0.8.6-2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "qradiolink";
|
||||
repo = "qradiolink";
|
||||
rev = version;
|
||||
sha256 = "1694yyw0vc77m5pbc5rwl6khd8000dbrliz3q4vsa9dqnfnz1777";
|
||||
};
|
||||
|
||||
preBuild = ''
|
||||
cd src/ext
|
||||
protoc --cpp_out=. Mumble.proto
|
||||
protoc --cpp_out=. QRadioLink.proto
|
||||
cd ../..
|
||||
qmake
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -D qradiolink $out/bin/qradiolink
|
||||
install -Dm644 src/res/icon.png $out/share/pixmaps/qradiolink.png
|
||||
install -Dm644 qradiolink.desktop $out/share/applications/qradiolink.desktop
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
gnuradio3_8.unwrapped.boost
|
||||
codec2
|
||||
gnuradio3_8.unwrapped.log4cpp
|
||||
gmp
|
||||
libpulseaudio
|
||||
libconfig
|
||||
gsm
|
||||
gnuradio3_8.pkgs.osmosdr
|
||||
libopus
|
||||
libjpeg
|
||||
limesuite
|
||||
speex
|
||||
speexdsp
|
||||
gnuradio3_8.qt.qtbase
|
||||
gnuradio3_8.qt.qtmultimedia
|
||||
libftdi
|
||||
libsndfile
|
||||
gnuradio3_8.qwt
|
||||
] ++ lib.optionals (gnuradio3_8.hasFeature "gr-ctrlport") [
|
||||
thrift
|
||||
gnuradio3_8.unwrapped.python.pkgs.thrift
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
protobuf
|
||||
gnuradio3_8.qt.qmake
|
||||
gnuradio3_8.qt.wrapQtAppsHook
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "SDR transceiver application for analog and digital modes";
|
||||
homepage = "http://qradiolink.org/";
|
||||
license = licenses.agpl3;
|
||||
maintainers = [ maintainers.markuskowa ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
34
pkgs/applications/radio/qsstv/default.nix
Normal file
34
pkgs/applications/radio/qsstv/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ 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 = "http://users.telenet.be/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";
|
||||
homepage = "http://users.telenet.be/on4qz/";
|
||||
platforms = platforms.linux;
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = with lib.maintainers; [ hax404 ];
|
||||
};
|
||||
}
|
||||
39
pkgs/applications/radio/quisk/default.nix
Normal file
39
pkgs/applications/radio/quisk/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, python38Packages, fetchPypi
|
||||
, fftw, alsa-lib, pulseaudio, wxPython_4_0 }:
|
||||
|
||||
python38Packages.buildPythonApplication rec {
|
||||
pname = "quisk";
|
||||
version = "4.1.73";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "37dfb02a32341025c086b07d66ddf1608d4ee1ae1c62fb51f87c97662f13e0d8";
|
||||
};
|
||||
|
||||
buildInputs = [ fftw alsa-lib pulseaudio ];
|
||||
|
||||
propagatedBuildInputs = [ wxPython_4_0 ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A SDR transceiver for radios that use the Hermes protocol";
|
||||
longDescription = ''
|
||||
QUISK is a Software Defined Radio (SDR) transceiver. You supply radio
|
||||
hardware that converts signals at the antenna to complex (I/Q) data at an
|
||||
intermediate frequency (IF). Data can come from a sound card, Ethernet or
|
||||
USB. Quisk then filters and demodulates the data and sends the audio to
|
||||
your speakers or headphones. For transmit, Quisk takes the microphone
|
||||
signal, converts it to I/Q data and sends it to the hardware.
|
||||
|
||||
Quisk can be used with SoftRock, Hermes Lite 2, HiQSDR, Odyssey and many
|
||||
radios that use the Hermes protocol. Quisk can connect to digital
|
||||
programs like Fldigi and WSJT-X. Quisk can be connected to other software
|
||||
like N1MM+ and software that uses Hamlib.
|
||||
'';
|
||||
license = licenses.gpl2Plus;
|
||||
homepage = "https://james.ahlstrom.name/quisk/";
|
||||
maintainers = with maintainers; [ pulsation ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
25
pkgs/applications/radio/rtl-ais/default.nix
Normal file
25
pkgs/applications/radio/rtl-ais/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, libusb1, rtl-sdr }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "rtl-ais";
|
||||
version = "0.8.1";
|
||||
buildInputs = [ pkg-config rtl-sdr libusb1 ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dgiardini";
|
||||
repo = "rtl-ais";
|
||||
rev = "0e85f4e5f9ce7378834c3129bc894580efc24291";
|
||||
sha256 = "0wm4zai1vs89mf0zgz52q5w5rj8f3i3v6zg42hfb7aqabi25r3jf";
|
||||
};
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple AIS tuner and generic dual-frequency FM demodulator";
|
||||
homepage = "https://github.com/dgiardini/rtl-ais";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ mgdm ];
|
||||
mainProgram = "rtl_ais";
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
44
pkgs/applications/radio/rtl-sdr/default.nix
Normal file
44
pkgs/applications/radio/rtl-sdr/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, libusb1
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rtl-sdr";
|
||||
version = "0.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "librtlsdr";
|
||||
repo = "librtlsdr";
|
||||
rev = "v${version}";
|
||||
sha256 = "1fgxlkgmdchbrf0nn98ivjr6css5hak3608nr4xrf2qzf7xy2kdk";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace '/etc/udev/rules.d' "$out/etc/udev/rules.d"
|
||||
|
||||
substituteInPlace rtl-sdr.rules \
|
||||
--replace 'MODE:="0666"' 'ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config cmake ];
|
||||
|
||||
buildInputs = [ libusb1 ];
|
||||
|
||||
cmakeFlags = lib.optional stdenv.isLinux [
|
||||
"-DINSTALL_UDEV_RULES=ON"
|
||||
"-DWITH_RPC=ON"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Turns your Realtek RTL2832 based DVB dongle into a SDR receiver";
|
||||
homepage = "https://github.com/librtlsdr/librtlsdr";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ bjornfor ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
36
pkgs/applications/radio/rtl_433/default.nix
Normal file
36
pkgs/applications/radio/rtl_433/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, fetchpatch
|
||||
, libusb1, rtl-sdr, soapysdr-with-plugins
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "21.12";
|
||||
pname = "rtl_433";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "merbanan";
|
||||
repo = "rtl_433";
|
||||
rev = version;
|
||||
sha256 = "sha256-KoDKyI7KDdGSe79ZTuL9ObKnOJsqTN4wrMq+/cvQ/Xk=";
|
||||
};
|
||||
|
||||
patches = [( fetchpatch {
|
||||
name = "CVE-2022-27419";
|
||||
url = "https://github.com/merbanan/rtl_433/commit/37455483889bd1c641bdaafc493d1cc236b74904.patch";
|
||||
sha256 = "172jndh8x5nlcbx2jp5y8fgfxsawwfz95037pcjp170gf93ijy88";
|
||||
})];
|
||||
|
||||
nativeBuildInputs = [ pkg-config cmake ];
|
||||
|
||||
buildInputs = [ libusb1 rtl-sdr soapysdr-with-plugins ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Decode traffic from devices that broadcast on 433.9 MHz, 868 MHz, 315 MHz, 345 MHz and 915 MHz";
|
||||
homepage = "https://github.com/merbanan/rtl_433";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ earldouglas markuskowa ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
|
||||
}
|
||||
95
pkgs/applications/radio/sdrangel/default.nix
Normal file
95
pkgs/applications/radio/sdrangel/default.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
{ airspy
|
||||
, boost
|
||||
, cm256cc
|
||||
, cmake
|
||||
, codec2
|
||||
, fetchFromGitHub
|
||||
, fftwFloat
|
||||
, glew
|
||||
, hackrf
|
||||
, lib
|
||||
, ffmpeg
|
||||
, libiio
|
||||
, libopus
|
||||
, libpulseaudio
|
||||
, libusb1
|
||||
, limesuite
|
||||
, libbladeRF
|
||||
, mkDerivation
|
||||
, ocl-icd
|
||||
, opencv3
|
||||
, pkg-config
|
||||
, qtcharts
|
||||
, qtlocation
|
||||
, qtmultimedia
|
||||
, qtserialport
|
||||
, qtspeech
|
||||
, qtwebsockets
|
||||
, rtl-sdr
|
||||
, serialdv
|
||||
, soapysdr-with-plugins
|
||||
, uhd
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "sdrangel";
|
||||
version = "6.18.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "f4exb";
|
||||
repo = "sdrangel";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-gf+RUOcki0pi3UH4NHFsmbTV04HUG16UC4jcUjyeip4=";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
airspy
|
||||
boost
|
||||
cm256cc
|
||||
codec2
|
||||
ffmpeg
|
||||
fftwFloat
|
||||
glew
|
||||
hackrf
|
||||
libbladeRF
|
||||
libiio
|
||||
libopus
|
||||
libpulseaudio
|
||||
libusb1
|
||||
limesuite
|
||||
opencv3
|
||||
qtcharts
|
||||
qtlocation
|
||||
qtmultimedia
|
||||
qtserialport
|
||||
qtspeech
|
||||
qtwebsockets
|
||||
rtl-sdr
|
||||
serialdv
|
||||
soapysdr-with-plugins
|
||||
uhd
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DLIBSERIALDV_INCLUDE_DIR:PATH=${serialdv}/include/serialdv"
|
||||
"-DLIMESUITE_INCLUDE_DIR:PATH=${limesuite}/include"
|
||||
"-DLIMESUITE_LIBRARY:FILEPATH=${limesuite}/lib/libLimeSuite.so"
|
||||
"-DSOAPYSDR_DIR=${soapysdr-with-plugins}"
|
||||
];
|
||||
|
||||
LD_LIBRARY_PATH = "${ocl-icd}/lib";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Software defined radio (SDR) software";
|
||||
longDescription = ''
|
||||
SDRangel is an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
|
||||
'';
|
||||
homepage = "https://github.com/f4exb/sdrangel";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ alkeryn ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
51
pkgs/applications/radio/sdrplay/default.nix
Normal file
51
pkgs/applications/radio/sdrplay/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ stdenv, lib, fetchurl, autoPatchelfHook, udev }:
|
||||
let
|
||||
arch = if stdenv.isx86_64 then "x86_64"
|
||||
else if stdenv.isi686 then "i686"
|
||||
else throw "unsupported architecture";
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "sdrplay";
|
||||
version = "3.07.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.sdrplay.com/software/SDRplay_RSP_API-Linux-${version}.run";
|
||||
sha256 = "1a25c7rsdkcjxr7ffvx2lwj7fxdbslg9qhr8ghaq1r53rcrqgzmf";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
|
||||
buildInputs = [ udev stdenv.cc.cc.lib ];
|
||||
|
||||
unpackPhase = ''
|
||||
sh "$src" --noexec --target source
|
||||
'';
|
||||
|
||||
sourceRoot = "source";
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,lib,include,lib/udev/rules.d}
|
||||
majorVersion="${lib.concatStringsSep "." (lib.take 1 (builtins.splitVersion version))}"
|
||||
majorMinorVersion="${lib.concatStringsSep "." (lib.take 2 (builtins.splitVersion version))}"
|
||||
libName="libsdrplay_api"
|
||||
cp "${arch}/$libName.so.$majorMinorVersion" $out/lib/
|
||||
ln -s "$out/lib/$libName.so.$majorMinorVersion" "$out/lib/$libName.so.$majorVersion"
|
||||
ln -s "$out/lib/$libName.so.$majorVersion" "$out/lib/$libName.so"
|
||||
cp "${arch}/sdrplay_apiService" $out/bin/
|
||||
cp -r inc/* $out/include/
|
||||
cp 66-mirics.rules $out/lib/udev/rules.d/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "SDRplay API";
|
||||
longDescription = ''
|
||||
Proprietary library and api service for working with SDRplay devices. For documentation and licensing details see
|
||||
https://www.sdrplay.com/docs/SDRplay_API_Specification_v${lib.concatStringsSep "." (lib.take 2 (builtins.splitVersion version))}.pdf
|
||||
'';
|
||||
homepage = "https://www.sdrplay.com/downloads/";
|
||||
license = licenses.unfree;
|
||||
maintainers = [ maintainers.pmenke ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
113
pkgs/applications/radio/sdrpp/default.nix
Normal file
113
pkgs/applications/radio/sdrpp/default.nix
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config
|
||||
, libX11, glfw, glew, fftwFloat, volk, AppKit
|
||||
# Sources
|
||||
, airspy_source ? true, airspy
|
||||
, airspyhf_source ? true, airspyhf
|
||||
, bladerf_source ? false, libbladeRF
|
||||
, file_source ? true
|
||||
, hackrf_source ? true, hackrf
|
||||
, limesdr_source ? false, limesuite
|
||||
, sddc_source ? false
|
||||
, rtl_sdr_source ? true, librtlsdr, libusb1
|
||||
, rtl_tcp_source ? true
|
||||
, sdrplay_source ? false, sdrplay
|
||||
, soapy_source ? true, soapysdr
|
||||
, spyserver_source ? true
|
||||
, plutosdr_source ? stdenv.isLinux, libiio, libad9361
|
||||
# Sinks
|
||||
, audio_sink ? true, rtaudio
|
||||
, portaudio_sink ? false, portaudio
|
||||
, network_sink ? true
|
||||
# Decoders
|
||||
, falcon9_decoder ? false
|
||||
, m17_decoder ? false, codec2
|
||||
, meteor_demodulator ? true
|
||||
, radio ? true
|
||||
, weather_sat_decoder ? true
|
||||
# Misc
|
||||
, discord_presence ? true
|
||||
, frequency_manager ? true
|
||||
, recorder ? true
|
||||
, rigctl_server ? true
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sdrpp";
|
||||
version = "1.0.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AlexandreRouma";
|
||||
repo = "SDRPlusPlus";
|
||||
rev = version;
|
||||
hash = "sha256-g9tpWvVRMXRhPfgvOeJhX6IMouF9+tLUr9wo5r35i/c=";
|
||||
};
|
||||
|
||||
patches = [ ./runtime-prefix.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "/usr/share" "share" \
|
||||
--replace "set(CMAKE_INSTALL_PREFIX" "#set(CMAKE_INSTALL_PREFIX"
|
||||
substituteInPlace decoder_modules/m17_decoder/src/m17dsp.h \
|
||||
--replace "codec2.h" "codec2/codec2.h"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [ glfw glew fftwFloat volk ]
|
||||
++ lib.optional stdenv.isDarwin AppKit
|
||||
++ lib.optional stdenv.isLinux libX11
|
||||
++ lib.optional airspy_source airspy
|
||||
++ lib.optional airspyhf_source airspyhf
|
||||
++ lib.optional bladerf_source libbladeRF
|
||||
++ lib.optional hackrf_source hackrf
|
||||
++ lib.optional limesdr_source limesuite
|
||||
++ lib.optionals rtl_sdr_source [ librtlsdr libusb1 ]
|
||||
++ lib.optional sdrplay_source sdrplay
|
||||
++ lib.optional soapy_source soapysdr
|
||||
++ lib.optionals plutosdr_source [ libiio libad9361 ]
|
||||
++ lib.optional audio_sink rtaudio
|
||||
++ lib.optional portaudio_sink portaudio
|
||||
++ lib.optional m17_decoder codec2;
|
||||
|
||||
cmakeFlags = lib.mapAttrsToList (k: v: "-D${k}=${if v then "ON" else "OFF"}") {
|
||||
OPT_BUILD_AIRSPY_SOURCE = airspy_source;
|
||||
OPT_BUILD_AIRSPYHF_SOURCE = airspyhf_source;
|
||||
OPT_BUILD_BLADERF_SOURCE = bladerf_source;
|
||||
OPT_BUILD_FILE_SOURCE = file_source;
|
||||
OPT_BUILD_HACKRF_SOURCE = hackrf_source;
|
||||
OPT_BUILD_LIMESDR_SOURCE = limesdr_source;
|
||||
OPT_BUILD_SDDC_SOURCE = sddc_source;
|
||||
OPT_BUILD_RTL_SDR_SOURCE = rtl_sdr_source;
|
||||
OPT_BUILD_RTL_TCP_SOURCE = rtl_tcp_source;
|
||||
OPT_BUILD_SDRPLAY_SOURCE = sdrplay_source;
|
||||
OPT_BUILD_SOAPY_SOURCE = soapy_source;
|
||||
OPT_BUILD_SPYSERVER_SOURCE = spyserver_source;
|
||||
OPT_BUILD_PLUTOSDR_SOURCE = plutosdr_source;
|
||||
OPT_BUILD_AUDIO_SINK = audio_sink;
|
||||
OPT_BUILD_PORTAUDIO_SINK = portaudio_sink;
|
||||
OPT_BUILD_NETWORK_SINK = network_sink;
|
||||
OPT_BUILD_NEW_PORTAUDIO_SINK = portaudio_sink;
|
||||
OPT_BUILD_FALCON9_DECODER = falcon9_decoder;
|
||||
OPT_BUILD_M17_DECODER = m17_decoder;
|
||||
OPT_BUILD_METEOR_DEMODULATOR = meteor_demodulator;
|
||||
OPT_BUILD_RADIO = radio;
|
||||
OPT_BUILD_WEATHER_SAT_DECODER = weather_sat_decoder;
|
||||
OPT_BUILD_DISCORD_PRESENCE = discord_presence;
|
||||
OPT_BUILD_FREQUENCY_MANAGER = frequency_manager;
|
||||
OPT_BUILD_RECORDER = recorder;
|
||||
OPT_BUILD_RIGCTL_SERVER = rigctl_server;
|
||||
};
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-fpermissive";
|
||||
|
||||
hardeningDisable = lib.optional stdenv.cc.isClang "format";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cross-Platform SDR Software";
|
||||
homepage = "https://github.com/AlexandreRouma/SDRPlusPlus";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ sikmir ];
|
||||
};
|
||||
}
|
||||
60
pkgs/applications/radio/sdrpp/runtime-prefix.patch
Normal file
60
pkgs/applications/radio/sdrpp/runtime-prefix.patch
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
From a80a739163d2013ec400223a68a387f4f9297b2a Mon Sep 17 00:00:00 2001
|
||||
From: Nikolay Korotkiy <sikmir@gmail.com>
|
||||
Date: Fri, 29 Oct 2021 01:38:21 +0300
|
||||
Subject: [PATCH] Fix sdrpp breaking every time the package is rebuilt.
|
||||
|
||||
On NixOS, the INSTALL_PREFIX changes on every rebuild to the package, but sdrpp
|
||||
fills it in as part of the default config and then installs that config
|
||||
to the users home folder. Fix this by not substituting @INSTALL_PREFIX@ in the
|
||||
default config until runtime.
|
||||
---
|
||||
core/src/core.cpp | 8 ++++++--
|
||||
core/src/gui/main_window.cpp | 6 ++++++
|
||||
2 files changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/core/src/core.cpp b/core/src/core.cpp
|
||||
index 9546e60..98d6065 100644
|
||||
--- a/core/src/core.cpp
|
||||
+++ b/core/src/core.cpp
|
||||
@@ -242,8 +242,8 @@ int sdrpp_main(int argc, char *argv[]) {
|
||||
defConfig["modulesDirectory"] = "./modules";
|
||||
defConfig["resourcesDirectory"] = "./res";
|
||||
#else
|
||||
- defConfig["modulesDirectory"] = INSTALL_PREFIX "/lib/sdrpp/plugins";
|
||||
- defConfig["resourcesDirectory"] = INSTALL_PREFIX "/share/sdrpp";
|
||||
+ defConfig["modulesDirectory"] = "@prefix@/lib/sdrpp/plugins";
|
||||
+ defConfig["resourcesDirectory"] = "@prefix@/share/sdrpp";
|
||||
#endif
|
||||
|
||||
// Load config
|
||||
@@ -290,6 +290,10 @@ int sdrpp_main(int argc, char *argv[]) {
|
||||
int winHeight = core::configManager.conf["windowSize"]["h"];
|
||||
maximized = core::configManager.conf["maximized"];
|
||||
std::string resDir = core::configManager.conf["resourcesDirectory"];
|
||||
+ {
|
||||
+ std::size_t pos = resDir.find("@prefix@");
|
||||
+ if (pos != std::string::npos) resDir.replace(pos, 8, INSTALL_PREFIX);
|
||||
+ }
|
||||
json bandColors = core::configManager.conf["bandColors"];
|
||||
core::configManager.release();
|
||||
|
||||
diff --git a/core/src/gui/main_window.cpp b/core/src/gui/main_window.cpp
|
||||
index 954dbd6..52f0eed 100644
|
||||
--- a/core/src/gui/main_window.cpp
|
||||
+++ b/core/src/gui/main_window.cpp
|
||||
@@ -44,6 +44,12 @@ void MainWindow::init() {
|
||||
json menuElements = core::configManager.conf["menuElements"];
|
||||
std::string modulesDir = core::configManager.conf["modulesDirectory"];
|
||||
std::string resourcesDir = core::configManager.conf["resourcesDirectory"];
|
||||
+ {
|
||||
+ std::size_t pos = modulesDir.find("@prefix@");
|
||||
+ if (pos != std::string::npos) modulesDir.replace(pos, 8, INSTALL_PREFIX);
|
||||
+ pos = resourcesDir.find("@prefix@");
|
||||
+ if (pos != std::string::npos) resourcesDir.replace(pos, 8, INSTALL_PREFIX);
|
||||
+ }
|
||||
core::configManager.release();
|
||||
|
||||
// Load menu elements
|
||||
--
|
||||
2.33.0
|
||||
|
||||
28
pkgs/applications/radio/soapyairspy/default.nix
Normal file
28
pkgs/applications/radio/soapyairspy/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake
|
||||
, airspy, soapysdr
|
||||
} :
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "soapyairspy";
|
||||
version = "0.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pothosware";
|
||||
repo = "SoapyAirspy";
|
||||
rev = "soapy-airspy-${version}";
|
||||
sha256 = "0g23yybnmq0pg2m8m7dbhif8lw0hdsmnnjym93fdyxfk5iln7fsc";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ airspy soapysdr ];
|
||||
|
||||
cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/pothosware/SoapyAirspy";
|
||||
description = "SoapySDR plugin for Airspy devices";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
31
pkgs/applications/radio/soapyaudio/default.nix
Normal file
31
pkgs/applications/radio/soapyaudio/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
||||
, hamlib, rtaudio, alsa-lib, libpulseaudio, libjack2, libusb1, soapysdr
|
||||
} :
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "soapyaudio";
|
||||
version = "0.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pothosware";
|
||||
repo = "SoapyAudio";
|
||||
rev = "soapy-audio-${version}";
|
||||
sha256 = "0minlsc1lvmqm20vn5hb4im7pz8qwklfy7sbr2xr73xkrbqdahc0";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ hamlib rtaudio alsa-lib libpulseaudio libjack2 libusb1 soapysdr ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/"
|
||||
"-DUSE_HAMLIB=ON"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/pothosware/SoapyAudio";
|
||||
description = "SoapySDR plugin for amateur radio and audio devices";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ numinit ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
32
pkgs/applications/radio/soapybladerf/default.nix
Normal file
32
pkgs/applications/radio/soapybladerf/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
||||
, libbladeRF, soapysdr
|
||||
} :
|
||||
|
||||
let
|
||||
version = "0.4.1";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "soapybladerf";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pothosware";
|
||||
repo = "SoapyBladeRF";
|
||||
rev = "soapy-bladerf-${version}";
|
||||
sha256 = "02wh09850vinqg248fw4lxmx7y857cqmnnb8jm9zhyrsggal0hki";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ libbladeRF soapysdr ];
|
||||
|
||||
cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ];
|
||||
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/pothosware/SoapyBladeRF";
|
||||
description = "SoapySDR plugin for BladeRF devices";
|
||||
license = licenses.lgpl21Only;
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
31
pkgs/applications/radio/soapyhackrf/default.nix
Normal file
31
pkgs/applications/radio/soapyhackrf/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
||||
, hackrf, soapysdr
|
||||
} :
|
||||
|
||||
let
|
||||
version = "0.3.4";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "soapyhackrf";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pothosware";
|
||||
repo = "SoapyHackRF";
|
||||
rev = "soapy-hackrf-${version}";
|
||||
sha256 = "sha256-fzPYHJAPX8FkFxPXpLlUagTd/NoamRX0YnxHwkbV1nI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ hackrf soapysdr ];
|
||||
|
||||
cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/pothosware/SoapyHackRF";
|
||||
description = "SoapySDR plugin for HackRF devices";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
29
pkgs/applications/radio/soapyremote/default.nix
Normal file
29
pkgs/applications/radio/soapyremote/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, soapysdr, avahi }:
|
||||
|
||||
let
|
||||
version = "0.5.2";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "soapyremote";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pothosware";
|
||||
repo = "SoapyRemote";
|
||||
rev = "soapy-remote-${version}";
|
||||
sha256 = "124sy9v08fm51ds1yzrxspychn34y0rl6y48mzariianazvzmfax";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ soapysdr avahi ];
|
||||
|
||||
cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/pothosware/SoapyRemote";
|
||||
description = "SoapySDR plugin for remote access to SDRs";
|
||||
license = licenses.boost;
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
31
pkgs/applications/radio/soapyrtlsdr/default.nix
Normal file
31
pkgs/applications/radio/soapyrtlsdr/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
||||
, rtl-sdr, soapysdr
|
||||
} :
|
||||
|
||||
let
|
||||
version = "0.3.0";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "soapyrtlsdr";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pothosware";
|
||||
repo = "SoapyRTLSDR";
|
||||
rev = "soapy-rtlsdr-${version}";
|
||||
sha256 = "15j0s7apbg9cjr6rcbr058kl0r3szwzf00ixcbykxb77fh7c6r9w";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ rtl-sdr soapysdr ];
|
||||
|
||||
cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/pothosware/SoapyRTLSDR";
|
||||
description = "SoapySDR plugin for RTL-SDR devices";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ragge ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
57
pkgs/applications/radio/soapysdr/default.nix
Normal file
57
pkgs/applications/radio/soapysdr/default.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{ stdenv, lib, lndir, makeWrapper
|
||||
, fetchFromGitHub, cmake
|
||||
, libusb-compat-0_1, pkg-config
|
||||
, usePython ? false
|
||||
, python ? null
|
||||
, ncurses, swig2
|
||||
, extraPackages ? []
|
||||
} :
|
||||
|
||||
let
|
||||
|
||||
version = "0.8.1";
|
||||
modulesVersion = with lib; versions.major version + "." + versions.minor version;
|
||||
modulesPath = "lib/SoapySDR/modules" + modulesVersion;
|
||||
extraPackagesSearchPath = lib.makeSearchPath modulesPath extraPackages;
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "soapysdr";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pothosware";
|
||||
repo = "SoapySDR";
|
||||
rev = "soapy-sdr-${version}";
|
||||
sha256 = "19f2x0pkxvf9figa0pl6xqlcz8fblvqb19mcnj632p0l8vk6qdv2";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake makeWrapper pkg-config ];
|
||||
buildInputs = [ libusb-compat-0_1 ncurses ]
|
||||
++ lib.optionals usePython [ python swig2 ];
|
||||
|
||||
propagatedBuildInputs = lib.optional usePython python.pkgs.numpy;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
] ++ lib.optional usePython "-DUSE_PYTHON_CONFIG=ON";
|
||||
|
||||
postFixup = lib.optionalString (lib.length extraPackages != 0) ''
|
||||
# Join all plugins via symlinking
|
||||
for i in ${toString extraPackages}; do
|
||||
${lndir}/bin/lndir -silent $i $out
|
||||
done
|
||||
# Needed for at least the remote plugin server
|
||||
for file in $out/bin/*; do
|
||||
wrapProgram "$file" --prefix SOAPY_SDR_PLUGIN_PATH : ${lib.escapeShellArg extraPackagesSearchPath}
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/pothosware/SoapySDR";
|
||||
description = "Vendor and platform neutral SDR support library";
|
||||
license = licenses.boost;
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
mainProgram = "SoapySDRUtil";
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
29
pkgs/applications/radio/soapysdrplay/default.nix
Normal file
29
pkgs/applications/radio/soapysdrplay/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, soapysdr, sdrplay }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "soapysdr-sdrplay3";
|
||||
version = "unstable-2021-04-25";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pothosware";
|
||||
repo = "SoapySDRPlay3";
|
||||
rev = "e6fdb719b611b1dfb7f26c56a4df1e241bd10129";
|
||||
sha256 = "0rrylp3ikrva227hjy60v4n6d6yvdavjsad9kszw9s948mwiashi";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [ soapysdr sdrplay ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Soapy SDR module for SDRplay";
|
||||
homepage = "https://github.com/pothosware/SoapySDRPlay3";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.pmenke ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
32
pkgs/applications/radio/soapyuhd/default.nix
Normal file
32
pkgs/applications/radio/soapyuhd/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
||||
, uhd, boost, soapysdr
|
||||
} :
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "soapyuhd";
|
||||
version = "0.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pothosware";
|
||||
repo = "SoapyUHD";
|
||||
rev = "soapy-uhd-${version}";
|
||||
sha256 = "14rk9ap9ayks2ma6mygca08yfds9bgfmip8cvwl87l06hwhnlwhj";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ uhd boost soapysdr ];
|
||||
|
||||
cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i "s:DESTINATION .*uhd/modules:DESTINATION $out/lib/uhd/modules:" CMakeLists.txt
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/pothosware/SoapyAirspy";
|
||||
description = "SoapySDR plugin for UHD devices";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
36
pkgs/applications/radio/soundmodem/default.nix
Normal file
36
pkgs/applications/radio/soundmodem/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, alsa-lib, audiofile, gtk2, libxml2 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "soundmodem";
|
||||
version = "0.20";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://archive.org/download/soundmodem-${version}/soundmodem-${version}.tar.gz";
|
||||
sha256 = "156l3wjnh5rcisxb42kcmlf74swf679v4xnj09zy5j74rd4h721z";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ alsa-lib audiofile gtk2 libxml2 ];
|
||||
|
||||
patches = [ ./matFix.patch ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Audio based modem for ham radio supporting ax.25";
|
||||
longDescription = ''
|
||||
This software allows a standard PC soundcard to be used as a packet radio "modem". The whole processing is done on the main processor CPU.
|
||||
Unlike previous packet radio modem software, this new release offers several new benefits:
|
||||
- Now uses standard operating system sound drivers (OSS/Free under Linux, /dev/audio under Solaris and DirectSound under Windows), thus runs on all soundcards for which drivers for the desired operating system are available.
|
||||
- No fixed relationship between bitrate, sampling rate, and modem parameters. Modems may be parametrized, and multiple modems may even run on the same audio channel!
|
||||
- Usermode solution allows the use of MMX, VIS, Floating point and other media instruction sets to speed up computation.
|
||||
- Cross platform builds from a single source code provides ubiquitous availability.
|
||||
'';
|
||||
#homepage = "http://gna.org/projects/soundmodem"; # official, but "Connection refused"
|
||||
homepage = "http://soundmodem.vk4msl.id.au/";
|
||||
downloadPage = "https://archive.org/download/${pname}-${version}/${pname}-${version}.tar.gz";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ ymarkus ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
11
pkgs/applications/radio/soundmodem/matFix.patch
Normal file
11
pkgs/applications/radio/soundmodem/matFix.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- a/matlib/mat.hh 2003-01-06 23:47:26.000000000 +0100
|
||||
+++ b/matlib/mat.copy.hh 2021-01-06 10:05:34.332415179 +0100
|
||||
@@ -91,7 +91,7 @@
|
||||
memcpy(c, r, d1 * d3 * sizeof(c[0]));
|
||||
}
|
||||
|
||||
-template<typename T> void mdet(const T *c, unsigned int d)
|
||||
+template<typename T> int mdet(const T *c, unsigned int d)
|
||||
{
|
||||
T *c2;
|
||||
unsigned int i, j, k, l;
|
||||
56
pkgs/applications/radio/splat/default.nix
Normal file
56
pkgs/applications/radio/splat/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ lib, stdenv, fetchurl, groff, ncurses, bzip2, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "splat";
|
||||
version = "1.4.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.qsl.net/kd2bd/${pname}-${version}.tar.bz2";
|
||||
hash = "sha256-ObCzFOLpJ73wDR7aS5hl79EouoUDBfmHrsBJxP1Yopw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs =
|
||||
# configure script needs `clear`
|
||||
[ groff ncurses ];
|
||||
|
||||
buildInputs = [ bzip2 zlib ];
|
||||
|
||||
postPatch = "patchShebangs build utils/build";
|
||||
|
||||
configurePhase =
|
||||
# configure for maximum resolution
|
||||
''
|
||||
runHook preConfigure
|
||||
cat > std-params.h << EOF
|
||||
#define HD_MODE 1
|
||||
#define MAXPAGES 64
|
||||
EOF
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
./build all
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dt $out/bin splat
|
||||
find utils -type f -executable -exec install -Dt $out/bin {} \;
|
||||
install -Dt $out/share/man/man1 docs/english/man/*.1
|
||||
install -Dt $out/share/man/es/man1 docs/spanish/man/*.1
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
description =
|
||||
"SPLAT! is an RF Signal Propagation, Loss, And Terrain analysis tool for the electromagnetic spectrum between 20 MHz and 20 GHz";
|
||||
license = licenses.gpl2Only;
|
||||
homepage = "https://www.qsl.net/kd2bd/splat.html";
|
||||
maintainers = with maintainers; [ ehmry ];
|
||||
platforms = platforms.x86_64;
|
||||
};
|
||||
|
||||
}
|
||||
49
pkgs/applications/radio/srsran/default.nix
Normal file
49
pkgs/applications/radio/srsran/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, cmake
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, fftwFloat
|
||||
, mbedtls
|
||||
, boost
|
||||
, lksctp-tools
|
||||
, libconfig
|
||||
, pcsclite
|
||||
, uhd
|
||||
, soapysdr
|
||||
, libbladeRF
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "srsran";
|
||||
version = "21.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "srsran";
|
||||
repo = "srsran";
|
||||
rev = "release_${builtins.replaceStrings ["."] ["_"] version}";
|
||||
sha256 = "sha256-uJv8khevp7g2p4zT6bkrut67kvMu+fuL1VHDDit0viw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
fftwFloat
|
||||
mbedtls
|
||||
boost
|
||||
libconfig
|
||||
lksctp-tools
|
||||
pcsclite
|
||||
uhd
|
||||
soapysdr
|
||||
libbladeRF
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.srslte.com/";
|
||||
description = "Open-source 4G and 5G software radio suite.";
|
||||
license = licenses.agpl3;
|
||||
platforms = with platforms; linux ;
|
||||
maintainers = with maintainers; [ hexagonal-sun ];
|
||||
};
|
||||
}
|
||||
70
pkgs/applications/radio/svxlink/default.nix
Normal file
70
pkgs/applications/radio/svxlink/default.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{ lib, stdenv, cmake, pkg-config, fetchFromGitHub, makeDesktopItem, alsa-lib, speex
|
||||
, libopus, curl, gsm, libgcrypt, libsigcxx, popt, qtbase, qttools
|
||||
, wrapQtAppsHook, rtl-sdr, tcl, doxygen, groff }:
|
||||
|
||||
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 = "19.09.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sm0svx";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-riyFEuEmJ7+jYT3UoTTsMUwFdO3y5mjo4z0fcC3O8gY=";
|
||||
};
|
||||
|
||||
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
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
rm -f $out/share/applications/*
|
||||
cp -v ${desktopItem}/share/applications/* $out/share/applications
|
||||
mv $out/share/icons/link.xpm $out/share/icons/qtel.xpm
|
||||
|
||||
wrapQtApp $out/bin/qtel
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
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 licenses; [ gpl2 ];
|
||||
maintainers = with maintainers; [ zaninime ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
52
pkgs/applications/radio/tlf/default.nix
Normal file
52
pkgs/applications/radio/tlf/default.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, autoconf, automake, pkg-config, glib
|
||||
, perl, ncurses5, hamlib, xmlrpc_c }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tlf";
|
||||
version = "1.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "${pname}-${version}";
|
||||
sha256 = "1xpgs4k27pjd9mianfknknp6mf34365bcp96wrv5xh4dhph573rj";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Pull upstream fix for ncurses-6.3:
|
||||
# https://github.com/Tlf/tlf/pull/282
|
||||
# We use Debian's patch as upstream fixes don't apply as is due to
|
||||
# related code changes. The change will be a part of 1.4.2 release.
|
||||
(fetchpatch {
|
||||
name = "ncurses-6.3.patch";
|
||||
url = "https://salsa.debian.org/debian-hamradio-team/tlf/-/raw/5a2d79fc35bde97f653b1373fd970d41fe01a3ec/debian/patches/warnings-as-errors.patch?inline=false";
|
||||
sha256 = "1zi1dd4vqkgl2pg29lnhj91ralqg58gmkzq9fkcx0dyakbjm6070";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook autoconf automake pkg-config perl ];
|
||||
buildInputs = [ glib ncurses5 hamlib xmlrpc_c ];
|
||||
|
||||
configureFlags = [ "--enable-hamlib" "--enable-fldigi-xmlrpc" ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/lib
|
||||
ln -s ${ncurses5.out}/lib/libtinfo.so.5 $out/lib/libtinfo.so.5
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Advanced ham radio logging and contest program";
|
||||
longDescription = ''
|
||||
TLF is a curses based console mode general logging and contest program for
|
||||
amateur radio.
|
||||
|
||||
It supports the CQWW, the WPX, the ARRL-DX, the ARRL-FD, the PACC and the
|
||||
EU SPRINT shortwave contests (single operator) as well as a LOT MORE basic
|
||||
contests, general QSO and DXpedition mode.
|
||||
'';
|
||||
homepage = "https://tlf.github.io/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ etu ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
29
pkgs/applications/radio/tqsl/default.nix
Normal file
29
pkgs/applications/radio/tqsl/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchurl, makeWrapper, cmake, expat, openssl, zlib, db, curl, wxGTK }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tqsl";
|
||||
version = "2.5.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.arrl.org/files/file/LoTW%20Instructions/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-flv7tI/SYAxxJsHFa3QUgnO0glAAQF87EgP4wyTWnNU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake makeWrapper ];
|
||||
buildInputs = [
|
||||
expat
|
||||
openssl
|
||||
zlib
|
||||
db
|
||||
curl
|
||||
wxGTK
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Software for using the ARRL Logbook of the World";
|
||||
homepage = "https://www.arrl.org/tqsl-download";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.dpflug ];
|
||||
};
|
||||
}
|
||||
34
pkgs/applications/radio/ubertooth/default.nix
Normal file
34
pkgs/applications/radio/ubertooth/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, libbtbb, libpcap , libusb1, bluez
|
||||
, udevGroup ? "ubertooth"
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ubertooth";
|
||||
version = "2020-12-R1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "greatscottgadgets";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "11r5ag2l5xn4pr7ycicm30w9c3ldn9yiqj1sqnjc79csxl2vrcfw";
|
||||
};
|
||||
|
||||
sourceRoot = "source/host";
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ libbtbb libpcap libusb1 bluez ];
|
||||
|
||||
cmakeFlags = lib.optionals stdenv.isLinux [
|
||||
"-DINSTALL_UDEV_RULES=TRUE"
|
||||
"-DUDEV_RULES_PATH=etc/udev/rules.d"
|
||||
"-DUDEV_RULES_GROUP=${udevGroup}"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Open source wireless development platform suitable for Bluetooth experimentation";
|
||||
homepage = "https://github.com/greatscottgadgets/ubertooth";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ oxzi ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
160
pkgs/applications/radio/uhd/3.5.nix
Normal file
160
pkgs/applications/radio/uhd/3.5.nix
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
{ 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 ];
|
||||
};
|
||||
}
|
||||
157
pkgs/applications/radio/uhd/default.nix
Normal file
157
pkgs/applications/radio/uhd/default.nix
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
{ 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
|
||||
, enableCApi ? true
|
||||
# requires numpy
|
||||
, enablePythonApi ? false
|
||||
, python3
|
||||
, enableExamples ? false
|
||||
, enableUtils ? false
|
||||
, enableSim ? false
|
||||
, libusb1
|
||||
, enableDpdk ? false
|
||||
, dpdk
|
||||
# Devices
|
||||
, enableOctoClock ? true
|
||||
, enableMpmd ? true
|
||||
, enableB100 ? true
|
||||
, enableB200 ? true
|
||||
, enableUsrp1 ? true
|
||||
, enableUsrp2 ? true
|
||||
, enableX300 ? 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 = "4.1.0.5";
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "EttusResearch";
|
||||
repo = "uhd";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-XBq4GkLRR2SFunFRvpPOMiIbTuUkMYf8tPAoHCoveRA=";
|
||||
};
|
||||
# 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 = "HctHB90ikOMkrYNyWmjGE/2HvA7xXKCUezdtiqzN+1A=";
|
||||
};
|
||||
|
||||
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_C_API=${onOffBool enableCApi}"
|
||||
"-DENABLE_PYTHON_API=${onOffBool enablePythonApi}"
|
||||
"-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_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 (enablePythonApi) [ 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 (!enablePythonApi && !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 (enablePythonApi || enableUtils) [ pythonEnv ]
|
||||
++ optionals (enableDpdk) [ dpdk ]
|
||||
;
|
||||
|
||||
# many tests fails on darwin, according to ofborg
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
# 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; {
|
||||
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 doronbehar ];
|
||||
};
|
||||
}
|
||||
19
pkgs/applications/radio/uhd/neon.patch
Normal file
19
pkgs/applications/radio/uhd/neon.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Description: When building for armhf, enable NEON
|
||||
NEON is part of the armhf baseline, so this will always be enabled on
|
||||
armhf.
|
||||
Author: Paul Tagliamonte <paultag@debian.org>
|
||||
Bug-Debian: https://bugs.debian.org/873608
|
||||
Origin: vendor
|
||||
Last-Update: 2017-08-29
|
||||
|
||||
--- uhd-3.10.2.0.orig/host/lib/convert/CMakeLists.txt
|
||||
+++ uhd-3.10.2.0/host/lib/convert/CMakeLists.txt
|
||||
@@ -67,6 +67,8 @@ IF(HAVE_ARM_NEON_H AND (${CMAKE_SIZEOF_V
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/convert_with_neon.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/convert_neon.S
|
||||
)
|
||||
+
|
||||
+ SET ( CMAKE_CXX_FLAGS "-mfpu=neon" )
|
||||
ENDIF()
|
||||
|
||||
########################################################################
|
||||
38
pkgs/applications/radio/unixcw/default.nix
Normal file
38
pkgs/applications/radio/unixcw/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, mkDerivation, fetchurl, libpulseaudio, alsa-lib , pkg-config, qtbase }:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "unixcw";
|
||||
version = "3.5.1";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/unixcw/unixcw_${version}.orig.tar.gz";
|
||||
sha256 ="5f3aacd8a26e16e6eff437c7ae1e9b389956fb137eeb3de24670ce05de479e7a";
|
||||
};
|
||||
patches = [
|
||||
./remove-use-of-dlopen.patch
|
||||
];
|
||||
buildInputs = [ libpulseaudio alsa-lib pkg-config qtbase ];
|
||||
CFLAGS ="-lasound -lpulse-simple";
|
||||
|
||||
meta = with lib; {
|
||||
description = "sound characters as Morse code on the soundcard or console speaker";
|
||||
longDescription = ''
|
||||
unixcw is a project providing libcw library and a set of programs
|
||||
using the library: cw, cwgen, cwcp and xcwcp.
|
||||
The programs are intended for people who want to learn receiving
|
||||
and sending Morse code.
|
||||
unixcw is developed and tested primarily on GNU/Linux system.
|
||||
|
||||
cw reads characters from an input file, or from standard input,
|
||||
and sounds each valid character as Morse code on either the system sound card,
|
||||
or the system console speaker.
|
||||
After it sounds a character, cw echoes it to standard output.
|
||||
The input stream can contain embedded command strings.
|
||||
These change the parameters used when sounding the Morse code.
|
||||
cw reports any errors in embedded commands
|
||||
'';
|
||||
homepage = "http://unixcw.sourceforge.net";
|
||||
maintainers = [ maintainers.mafo ];
|
||||
license = licenses.gpl2;
|
||||
platforms=platforms.linux;
|
||||
};
|
||||
}
|
||||
677
pkgs/applications/radio/unixcw/remove-use-of-dlopen.patch
Normal file
677
pkgs/applications/radio/unixcw/remove-use-of-dlopen.patch
Normal file
|
|
@ -0,0 +1,677 @@
|
|||
From e4b91b5a7943a3b54f555ff2e0029b83bd96b131 Mon Sep 17 00:00:00 2001
|
||||
From: MarcFontaine <MarcFontaine@users.noreply.github.com>
|
||||
Date: Sat, 9 Jun 2018 11:02:11 +0200
|
||||
Subject: [PATCH] remove use of dlopen
|
||||
|
||||
---
|
||||
src/libcw/libcw_alsa.c | 215 ++++++++++---------------------------------------
|
||||
src/libcw/libcw_pa.c | 118 ++++-----------------------
|
||||
2 files changed, 56 insertions(+), 277 deletions(-)
|
||||
|
||||
diff --git a/src/libcw/libcw_alsa.c b/src/libcw/libcw_alsa.c
|
||||
index a669c6e..17c306d 100644
|
||||
--- a/src/libcw/libcw_alsa.c
|
||||
+++ b/src/libcw/libcw_alsa.c
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
|
||||
|
||||
-#include <dlfcn.h> /* dlopen() and related symbols */
|
||||
#include <alsa/asoundlib.h>
|
||||
|
||||
|
||||
@@ -65,7 +64,6 @@ static const snd_pcm_format_t CW_ALSA_SAMPLE_FORMAT = SND_PCM_FORMAT_S16; /* "Si
|
||||
|
||||
|
||||
static int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *params);
|
||||
-static int cw_alsa_dlsym_internal(void *handle);
|
||||
static int cw_alsa_write_internal(cw_gen_t *gen);
|
||||
static int cw_alsa_debug_evaluate_write_internal(cw_gen_t *gen, int rv);
|
||||
static int cw_alsa_open_device_internal(cw_gen_t *gen);
|
||||
@@ -80,56 +78,6 @@ static int cw_alsa_print_params_internal(snd_pcm_hw_params_t *hw_params);
|
||||
|
||||
|
||||
|
||||
-static struct {
|
||||
- void *handle;
|
||||
-
|
||||
- int (* snd_pcm_open)(snd_pcm_t **pcm, const char *name, snd_pcm_stream_t stream, int mode);
|
||||
- int (* snd_pcm_close)(snd_pcm_t *pcm);
|
||||
- int (* snd_pcm_prepare)(snd_pcm_t *pcm);
|
||||
- int (* snd_pcm_drop)(snd_pcm_t *pcm);
|
||||
- snd_pcm_sframes_t (* snd_pcm_writei)(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size);
|
||||
-
|
||||
- const char *(* snd_strerror)(int errnum);
|
||||
-
|
||||
- int (* snd_pcm_hw_params_malloc)(snd_pcm_hw_params_t **ptr);
|
||||
- int (* snd_pcm_hw_params_any)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
|
||||
- int (* snd_pcm_hw_params_set_format)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val);
|
||||
- int (* snd_pcm_hw_params_set_rate_near)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
|
||||
- int (* snd_pcm_hw_params_set_access)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t _access);
|
||||
- int (* snd_pcm_hw_params_set_channels)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
|
||||
- int (* snd_pcm_hw_params)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
|
||||
- int (* snd_pcm_hw_params_get_periods)(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
|
||||
- int (* snd_pcm_hw_params_get_period_size)(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir);
|
||||
- int (* snd_pcm_hw_params_get_period_size_min)(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir);
|
||||
- int (* snd_pcm_hw_params_get_buffer_size)(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
|
||||
-} cw_alsa = {
|
||||
- .handle = NULL,
|
||||
-
|
||||
- .snd_pcm_open = NULL,
|
||||
- .snd_pcm_close = NULL,
|
||||
- .snd_pcm_prepare = NULL,
|
||||
- .snd_pcm_drop = NULL,
|
||||
- .snd_pcm_writei = NULL,
|
||||
-
|
||||
- .snd_strerror = NULL,
|
||||
-
|
||||
- .snd_pcm_hw_params_malloc = NULL,
|
||||
- .snd_pcm_hw_params_any = NULL,
|
||||
- .snd_pcm_hw_params_set_format = NULL,
|
||||
- .snd_pcm_hw_params_set_rate_near = NULL,
|
||||
- .snd_pcm_hw_params_set_access = NULL,
|
||||
- .snd_pcm_hw_params_set_channels = NULL,
|
||||
- .snd_pcm_hw_params = NULL,
|
||||
- .snd_pcm_hw_params_get_periods = NULL,
|
||||
- .snd_pcm_hw_params_get_period_size = NULL,
|
||||
- .snd_pcm_hw_params_get_period_size_min = NULL,
|
||||
- .snd_pcm_hw_params_get_buffer_size = NULL
|
||||
-};
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
/**
|
||||
\brief Check if it is possible to open ALSA output
|
||||
@@ -144,34 +92,19 @@ static struct {
|
||||
*/
|
||||
bool cw_is_alsa_possible(const char *device)
|
||||
{
|
||||
- const char *library_name = "libasound.so.2";
|
||||
- if (!cw_dlopen_internal(library_name, &(cw_alsa.handle))) {
|
||||
- cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "cw_alsa: can't access ALSA library \"%s\"", library_name);
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- int rv = cw_alsa_dlsym_internal(cw_alsa.handle);
|
||||
- if (rv < 0) {
|
||||
- cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "cw_alsa: failed to resolve ALSA symbol #%d, can't correctly load ALSA library", rv);
|
||||
- dlclose(cw_alsa.handle);
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- const char *dev = device ? device : CW_DEFAULT_ALSA_DEVICE;
|
||||
+ int rv;
|
||||
+ const char *dev = device ? device : CW_DEFAULT_ALSA_DEVICE;
|
||||
snd_pcm_t *alsa_handle;
|
||||
- rv = cw_alsa.snd_pcm_open(&alsa_handle,
|
||||
+ rv = snd_pcm_open(&alsa_handle,
|
||||
dev, /* name */
|
||||
SND_PCM_STREAM_PLAYBACK, /* stream (playback/capture) */
|
||||
0); /* mode, 0 | SND_PCM_NONBLOCK | SND_PCM_ASYNC */
|
||||
if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
"cw_alsa: can't open ALSA device \"%s\"", dev);
|
||||
- dlclose(cw_alsa.handle);
|
||||
return false;
|
||||
} else {
|
||||
- cw_alsa.snd_pcm_close(alsa_handle);
|
||||
+ snd_pcm_close(alsa_handle);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -204,7 +137,7 @@ int cw_alsa_write_internal(cw_gen_t *gen)
|
||||
/* Send audio buffer to ALSA.
|
||||
Size of correct and current data in the buffer is the same as
|
||||
ALSA's period, so there should be no underruns */
|
||||
- int rv = cw_alsa.snd_pcm_writei(gen->alsa_data.handle, gen->buffer, gen->buffer_n_samples);
|
||||
+ int rv = snd_pcm_writei(gen->alsa_data.handle, gen->buffer, gen->buffer_n_samples);
|
||||
cw_alsa_debug_evaluate_write_internal(gen, rv);
|
||||
/*
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
|
||||
@@ -231,7 +164,7 @@ int cw_alsa_write_internal(cw_gen_t *gen)
|
||||
*/
|
||||
int cw_alsa_open_device_internal(cw_gen_t *gen)
|
||||
{
|
||||
- int rv = cw_alsa.snd_pcm_open(&gen->alsa_data.handle,
|
||||
+ int rv = snd_pcm_open(&gen->alsa_data.handle,
|
||||
gen->audio_device, /* name */
|
||||
SND_PCM_STREAM_PLAYBACK, /* stream (playback/capture) */
|
||||
0); /* mode, 0 | SND_PCM_NONBLOCK | SND_PCM_ASYNC */
|
||||
@@ -251,7 +184,7 @@ int cw_alsa_open_device_internal(cw_gen_t *gen)
|
||||
/* TODO: move this to cw_alsa_set_hw_params_internal(),
|
||||
deallocate hw_params */
|
||||
snd_pcm_hw_params_t *hw_params = NULL;
|
||||
- rv = cw_alsa.snd_pcm_hw_params_malloc(&hw_params);
|
||||
+ rv = snd_pcm_hw_params_malloc(&hw_params);
|
||||
if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
"cw_alsa: can't allocate memory for ALSA hw params");
|
||||
@@ -265,7 +198,7 @@ int cw_alsa_open_device_internal(cw_gen_t *gen)
|
||||
return CW_FAILURE;
|
||||
}
|
||||
|
||||
- rv = cw_alsa.snd_pcm_prepare(gen->alsa_data.handle);
|
||||
+ rv = snd_pcm_prepare(gen->alsa_data.handle);
|
||||
if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
"cw_alsa: can't prepare ALSA handler");
|
||||
@@ -275,7 +208,7 @@ int cw_alsa_open_device_internal(cw_gen_t *gen)
|
||||
/* Get size for data buffer */
|
||||
snd_pcm_uframes_t frames; /* period size in frames */
|
||||
int dir = 1;
|
||||
- rv = cw_alsa.snd_pcm_hw_params_get_period_size_min(hw_params, &frames, &dir);
|
||||
+ rv = snd_pcm_hw_params_get_period_size_min(hw_params, &frames, &dir);
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
|
||||
"cw_alsa: rv = %d, ALSA buffer size would be %u frames", rv, (unsigned int) frames);
|
||||
|
||||
@@ -305,14 +238,11 @@ int cw_alsa_open_device_internal(cw_gen_t *gen)
|
||||
void cw_alsa_close_device_internal(cw_gen_t *gen)
|
||||
{
|
||||
/* "Stop a PCM dropping pending frames. " */
|
||||
- cw_alsa.snd_pcm_drop(gen->alsa_data.handle);
|
||||
- cw_alsa.snd_pcm_close(gen->alsa_data.handle);
|
||||
+ snd_pcm_drop(gen->alsa_data.handle);
|
||||
+ snd_pcm_close(gen->alsa_data.handle);
|
||||
|
||||
gen->audio_device_is_open = false;
|
||||
|
||||
- if (cw_alsa.handle) {
|
||||
- dlclose(cw_alsa.handle);
|
||||
- }
|
||||
|
||||
#if CW_DEV_RAW_SINK
|
||||
if (gen->dev_raw_sink != -1) {
|
||||
@@ -332,11 +262,11 @@ int cw_alsa_debug_evaluate_write_internal(cw_gen_t *gen, int rv)
|
||||
if (rv == -EPIPE) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING,
|
||||
"cw_alsa: underrun");
|
||||
- cw_alsa.snd_pcm_prepare(gen->alsa_data.handle);
|
||||
+ snd_pcm_prepare(gen->alsa_data.handle);
|
||||
} else if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING,
|
||||
- "cw_alsa: writei: %s", cw_alsa.snd_strerror(rv));
|
||||
- cw_alsa.snd_pcm_prepare(gen->alsa_data.handle);
|
||||
+ "cw_alsa: writei: %s", snd_strerror(rv));
|
||||
+ snd_pcm_prepare(gen->alsa_data.handle);
|
||||
} else if (rv != gen->buffer_n_samples) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING,
|
||||
"cw_alsa: short write, %d != %d", rv, gen->buffer_n_samples);
|
||||
@@ -363,19 +293,19 @@ int cw_alsa_debug_evaluate_write_internal(cw_gen_t *gen, int rv)
|
||||
int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params)
|
||||
{
|
||||
/* Get current hw configuration. */
|
||||
- int rv = cw_alsa.snd_pcm_hw_params_any(gen->alsa_data.handle, hw_params);
|
||||
+ int rv = snd_pcm_hw_params_any(gen->alsa_data.handle, hw_params);
|
||||
if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "cw_alsa: get current hw params: %s", cw_alsa.snd_strerror(rv));
|
||||
+ "cw_alsa: get current hw params: %s", snd_strerror(rv));
|
||||
return CW_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
/* Set the sample format */
|
||||
- rv = cw_alsa.snd_pcm_hw_params_set_format(gen->alsa_data.handle, hw_params, CW_ALSA_SAMPLE_FORMAT);
|
||||
+ rv = snd_pcm_hw_params_set_format(gen->alsa_data.handle, hw_params, CW_ALSA_SAMPLE_FORMAT);
|
||||
if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "cw_alsa: can't set sample format: %s", cw_alsa.snd_strerror(rv));
|
||||
+ "cw_alsa: can't set sample format: %s", snd_strerror(rv));
|
||||
return CW_FAILURE;
|
||||
}
|
||||
|
||||
@@ -387,7 +317,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
|
||||
bool success = false;
|
||||
for (int i = 0; cw_supported_sample_rates[i]; i++) {
|
||||
rate = cw_supported_sample_rates[i];
|
||||
- int rv = cw_alsa.snd_pcm_hw_params_set_rate_near(gen->alsa_data.handle, hw_params, &rate, &dir);
|
||||
+ int rv = snd_pcm_hw_params_set_rate_near(gen->alsa_data.handle, hw_params, &rate, &dir);
|
||||
if (!rv) {
|
||||
if (rate != cw_supported_sample_rates[i]) {
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING, "cw_alsa: imprecise sample rate:");
|
||||
@@ -402,7 +332,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
|
||||
|
||||
if (!success) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "cw_alsa: can't get sample rate: %s", cw_alsa.snd_strerror(rv));
|
||||
+ "cw_alsa: can't get sample rate: %s", snd_strerror(rv));
|
||||
return CW_FAILURE;
|
||||
} else {
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
|
||||
@@ -410,18 +340,18 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
|
||||
}
|
||||
|
||||
/* Set PCM access type */
|
||||
- rv = cw_alsa.snd_pcm_hw_params_set_access(gen->alsa_data.handle, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED);
|
||||
+ rv = snd_pcm_hw_params_set_access(gen->alsa_data.handle, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED);
|
||||
if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "cw_alsa: can't set access type: %s", cw_alsa.snd_strerror(rv));
|
||||
+ "cw_alsa: can't set access type: %s", snd_strerror(rv));
|
||||
return CW_FAILURE;
|
||||
}
|
||||
|
||||
/* Set number of channels */
|
||||
- rv = cw_alsa.snd_pcm_hw_params_set_channels(gen->alsa_data.handle, hw_params, CW_AUDIO_CHANNELS);
|
||||
+ rv = snd_pcm_hw_params_set_channels(gen->alsa_data.handle, hw_params, CW_AUDIO_CHANNELS);
|
||||
if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "cw_alsa: can't set number of channels: %s", cw_alsa.snd_strerror(rv));
|
||||
+ "cw_alsa: can't set number of channels: %s", snd_strerror(rv));
|
||||
return CW_FAILURE;
|
||||
}
|
||||
|
||||
@@ -496,7 +426,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
|
||||
snd_pcm_uframes_t accepted = 0; /* buffer size in frames */
|
||||
dir = 0;
|
||||
for (snd_pcm_uframes_t val = 0; val < 10000; val++) {
|
||||
- rv = cw_alsa.snd_pcm_hw_params_test_buffer_size(gen->alsa_data.handle, hw_params, val);
|
||||
+ rv = snd_pcm_hw_params_test_buffer_size(gen->alsa_data.handle, hw_params, val);
|
||||
if (rv == 0) {
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
|
||||
"cw_alsa: accepted buffer size: %u", (unsigned int) accepted);
|
||||
@@ -507,10 +437,10 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
|
||||
}
|
||||
|
||||
if (accepted > 0) {
|
||||
- rv = cw_alsa.snd_pcm_hw_params_set_buffer_size(gen->alsa_data.handle, hw_params, accepted);
|
||||
+ rv = snd_pcm_hw_params_set_buffer_size(gen->alsa_data.handle, hw_params, accepted);
|
||||
if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "cw_alsa: can't set accepted buffer size %u: %s", (unsigned int) accepted, cw_alsa.snd_strerror(rv));
|
||||
+ "cw_alsa: can't set accepted buffer size %u: %s", (unsigned int) accepted, snd_strerror(rv));
|
||||
}
|
||||
} else {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
@@ -526,7 +456,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
|
||||
/* this limit should be enough, "accepted" on my machine is 8 */
|
||||
const unsigned int n_periods_max = 30;
|
||||
for (unsigned int val = 1; val < n_periods_max; val++) {
|
||||
- rv = cw_alsa.snd_pcm_hw_params_test_periods(gen->alsa_data.handle, hw_params, val, dir);
|
||||
+ rv = snd_pcm_hw_params_test_periods(gen->alsa_data.handle, hw_params, val, dir);
|
||||
if (rv == 0) {
|
||||
accepted = val;
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
|
||||
@@ -534,10 +464,10 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
|
||||
}
|
||||
}
|
||||
if (accepted > 0) {
|
||||
- rv = cw_alsa.snd_pcm_hw_params_set_periods(gen->alsa_data.handle, hw_params, accepted, dir);
|
||||
+ rv = snd_pcm_hw_params_set_periods(gen->alsa_data.handle, hw_params, accepted, dir);
|
||||
if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "cw_alsa: can't set accepted number of periods %d: %s", accepted, cw_alsa.snd_strerror(rv));
|
||||
+ "cw_alsa: can't set accepted number of periods %d: %s", accepted, snd_strerror(rv));
|
||||
}
|
||||
} else {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
@@ -549,7 +479,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
|
||||
/* Test period size */
|
||||
dir = 0;
|
||||
for (snd_pcm_uframes_t val = 0; val < 100000; val++) {
|
||||
- rv = cw_alsa.snd_pcm_hw_params_test_period_size(gen->alsa_data.handle, hw_params, val, dir);
|
||||
+ rv = snd_pcm_hw_params_test_period_size(gen->alsa_data.handle, hw_params, val, dir);
|
||||
if (rv == 0) {
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
|
||||
"cw_alsa: accepted period size: %lu", val);
|
||||
@@ -562,7 +492,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
|
||||
/* Test buffer time */
|
||||
dir = 0;
|
||||
for (unsigned int val = 0; val < 100000; val++) {
|
||||
- rv = cw_alsa.snd_pcm_hw_params_test_buffer_time(gen->alsa_data.handle, hw_params, val, dir);
|
||||
+ rv = snd_pcm_hw_params_test_buffer_time(gen->alsa_data.handle, hw_params, val, dir);
|
||||
if (rv == 0) {
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
|
||||
"cw_alsa: accepted buffer time: %d", val);
|
||||
@@ -573,10 +503,10 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
|
||||
#endif /* #if CW_ALSA_HW_BUFFER_CONFIG */
|
||||
|
||||
/* Save hw parameters to device */
|
||||
- rv = cw_alsa.snd_pcm_hw_params(gen->alsa_data.handle, hw_params);
|
||||
+ rv = snd_pcm_hw_params(gen->alsa_data.handle, hw_params);
|
||||
if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "cw_alsa: can't save hw parameters: %s", cw_alsa.snd_strerror(rv));
|
||||
+ "cw_alsa: can't save hw parameters: %s", snd_strerror(rv));
|
||||
return CW_FAILURE;
|
||||
} else {
|
||||
return CW_SUCCESS;
|
||||
@@ -600,30 +530,30 @@ int cw_alsa_print_params_internal(snd_pcm_hw_params_t *hw_params)
|
||||
unsigned int val = 0;
|
||||
int dir = 0;
|
||||
|
||||
- int rv = cw_alsa.snd_pcm_hw_params_get_periods(hw_params, &val, &dir);
|
||||
+ int rv = snd_pcm_hw_params_get_periods(hw_params, &val, &dir);
|
||||
if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "cw_alsa: can't get 'periods': %s", cw_alsa.snd_strerror(rv));
|
||||
+ "cw_alsa: can't get 'periods': %s", snd_strerror(rv));
|
||||
} else {
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
|
||||
"cw_alsa: 'periods' = %u", val);
|
||||
}
|
||||
|
||||
snd_pcm_uframes_t period_size = 0;
|
||||
- rv = cw_alsa.snd_pcm_hw_params_get_period_size(hw_params, &period_size, &dir);
|
||||
+ rv = snd_pcm_hw_params_get_period_size(hw_params, &period_size, &dir);
|
||||
if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "cw_alsa: can't get 'period size': %s", cw_alsa.snd_strerror(rv));
|
||||
+ "cw_alsa: can't get 'period size': %s", snd_strerror(rv));
|
||||
} else {
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
|
||||
"cw_alsa: 'period size' = %u", (unsigned int) period_size);
|
||||
}
|
||||
|
||||
snd_pcm_uframes_t buffer_size;
|
||||
- rv = cw_alsa.snd_pcm_hw_params_get_buffer_size(hw_params, &buffer_size);
|
||||
+ rv = snd_pcm_hw_params_get_buffer_size(hw_params, &buffer_size);
|
||||
if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "cw_alsa: can't get buffer size: %s", cw_alsa.snd_strerror(rv));
|
||||
+ "cw_alsa: can't get buffer size: %s", snd_strerror(rv));
|
||||
} else {
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
|
||||
"cw_alsa: 'buffer size' = %u", (unsigned int) buffer_size);
|
||||
@@ -642,70 +572,9 @@ int cw_alsa_print_params_internal(snd_pcm_hw_params_t *hw_params)
|
||||
|
||||
|
||||
|
||||
-/**
|
||||
- \brief Resolve/get symbols from ALSA library
|
||||
-
|
||||
- Function resolves/gets addresses of few ALSA functions used by
|
||||
- libcw and stores them in cw_alsa global variable.
|
||||
-
|
||||
- On failure the function returns negative value, different for every
|
||||
- symbol that the funciton failed to resolve. Function stops and returns
|
||||
- on first failure.
|
||||
-
|
||||
- \param handle - handle to open ALSA library
|
||||
-
|
||||
- \return 0 on success
|
||||
- \return negative value on failure
|
||||
-*/
|
||||
-static int cw_alsa_dlsym_internal(void *handle)
|
||||
-{
|
||||
- *(void **) &(cw_alsa.snd_pcm_open) = dlsym(handle, "snd_pcm_open");
|
||||
- if (!cw_alsa.snd_pcm_open) return -1;
|
||||
- *(void **) &(cw_alsa.snd_pcm_close) = dlsym(handle, "snd_pcm_close");
|
||||
- if (!cw_alsa.snd_pcm_close) return -2;
|
||||
- *(void **) &(cw_alsa.snd_pcm_prepare) = dlsym(handle, "snd_pcm_prepare");
|
||||
- if (!cw_alsa.snd_pcm_prepare) return -3;
|
||||
- *(void **) &(cw_alsa.snd_pcm_drop) = dlsym(handle, "snd_pcm_drop");
|
||||
- if (!cw_alsa.snd_pcm_drop) return -4;
|
||||
- *(void **) &(cw_alsa.snd_pcm_writei) = dlsym(handle, "snd_pcm_writei");
|
||||
- if (!cw_alsa.snd_pcm_writei) return -5;
|
||||
-
|
||||
- *(void **) &(cw_alsa.snd_strerror) = dlsym(handle, "snd_strerror");
|
||||
- if (!cw_alsa.snd_strerror) return -10;
|
||||
-
|
||||
- *(void **) &(cw_alsa.snd_pcm_hw_params_malloc) = dlsym(handle, "snd_pcm_hw_params_malloc");
|
||||
- if (!cw_alsa.snd_pcm_hw_params_malloc) return -20;
|
||||
- *(void **) &(cw_alsa.snd_pcm_hw_params_any) = dlsym(handle, "snd_pcm_hw_params_any");
|
||||
- if (!cw_alsa.snd_pcm_hw_params_any) return -21;
|
||||
- *(void **) &(cw_alsa.snd_pcm_hw_params_set_format) = dlsym(handle, "snd_pcm_hw_params_set_format");
|
||||
- if (!cw_alsa.snd_pcm_hw_params_set_format) return -22;
|
||||
- *(void **) &(cw_alsa.snd_pcm_hw_params_set_rate_near) = dlsym(handle, "snd_pcm_hw_params_set_rate_near");
|
||||
- if (!cw_alsa.snd_pcm_hw_params_set_rate_near) return -23;
|
||||
- *(void **) &(cw_alsa.snd_pcm_hw_params_set_access) = dlsym(handle, "snd_pcm_hw_params_set_access");
|
||||
- if (!cw_alsa.snd_pcm_hw_params_set_access) return -24;
|
||||
- *(void **) &(cw_alsa.snd_pcm_hw_params_set_channels) = dlsym(handle, "snd_pcm_hw_params_set_channels");
|
||||
- if (!cw_alsa.snd_pcm_hw_params_set_channels) return -25;
|
||||
- *(void **) &(cw_alsa.snd_pcm_hw_params) = dlsym(handle, "snd_pcm_hw_params");
|
||||
- if (!cw_alsa.snd_pcm_hw_params) return -26;
|
||||
- *(void **) &(cw_alsa.snd_pcm_hw_params_get_periods) = dlsym(handle, "snd_pcm_hw_params_get_periods");
|
||||
- if (!cw_alsa.snd_pcm_hw_params_get_periods) return -27;
|
||||
- *(void **) &(cw_alsa.snd_pcm_hw_params_get_period_size) = dlsym(handle, "snd_pcm_hw_params_get_period_size");
|
||||
- if (!cw_alsa.snd_pcm_hw_params_get_period_size) return -28;
|
||||
- *(void **) &(cw_alsa.snd_pcm_hw_params_get_period_size_min) = dlsym(handle, "snd_pcm_hw_params_get_period_size_min");
|
||||
- if (!cw_alsa.snd_pcm_hw_params_get_period_size_min) return -29;
|
||||
- *(void **) &(cw_alsa.snd_pcm_hw_params_get_buffer_size) = dlsym(handle, "snd_pcm_hw_params_get_buffer_size");
|
||||
- if (!cw_alsa.snd_pcm_hw_params_get_buffer_size) return -30;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
void cw_alsa_drop(cw_gen_t *gen)
|
||||
{
|
||||
- cw_alsa.snd_pcm_drop(gen->alsa_data.handle);
|
||||
+ snd_pcm_drop(gen->alsa_data.handle);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -721,7 +590,7 @@ void cw_alsa_drop(cw_gen_t *gen)
|
||||
|
||||
|
||||
#include <stdbool.h>
|
||||
-#include "libcw_alsa.h"
|
||||
+#include "libh"
|
||||
|
||||
|
||||
|
||||
diff --git a/src/libcw/libcw_pa.c b/src/libcw/libcw_pa.c
|
||||
index 8269e9d..e190200 100644
|
||||
--- a/src/libcw/libcw_pa.c
|
||||
+++ b/src/libcw/libcw_pa.c
|
||||
@@ -39,7 +39,6 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
-#include <dlfcn.h> /* dlopen() and related symbols */
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
@@ -63,39 +62,12 @@ extern cw_debug_t cw_debug_object_dev;
|
||||
|
||||
|
||||
static pa_simple *cw_pa_simple_new_internal(pa_sample_spec *ss, pa_buffer_attr *ba, const char *device, const char *stream_name, int *error);
|
||||
-static int cw_pa_dlsym_internal(void *handle);
|
||||
static int cw_pa_open_device_internal(cw_gen_t *gen);
|
||||
static void cw_pa_close_device_internal(cw_gen_t *gen);
|
||||
static int cw_pa_write_internal(cw_gen_t *gen);
|
||||
|
||||
|
||||
|
||||
-static struct {
|
||||
- void *handle;
|
||||
-
|
||||
- pa_simple *(* pa_simple_new)(const char *server, const char *name, pa_stream_direction_t dir, const char *dev, const char *stream_name, const pa_sample_spec *ss, const pa_channel_map *map, const pa_buffer_attr *attr, int *error);
|
||||
- void (* pa_simple_free)(pa_simple *s);
|
||||
- int (* pa_simple_write)(pa_simple *s, const void *data, size_t bytes, int *error);
|
||||
- pa_usec_t (* pa_simple_get_latency)(pa_simple *s, int *error);
|
||||
- int (* pa_simple_drain)(pa_simple *s, int *error);
|
||||
-
|
||||
- size_t (* pa_usec_to_bytes)(pa_usec_t t, const pa_sample_spec *spec);
|
||||
- char *(* pa_strerror)(int error);
|
||||
-} cw_pa = {
|
||||
- .handle = NULL,
|
||||
-
|
||||
- .pa_simple_new = NULL,
|
||||
- .pa_simple_free = NULL,
|
||||
- .pa_simple_write = NULL,
|
||||
- .pa_simple_get_latency = NULL,
|
||||
- .pa_simple_drain = NULL,
|
||||
-
|
||||
- .pa_usec_to_bytes = NULL,
|
||||
- .pa_strerror = NULL
|
||||
-};
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
static const pa_sample_format_t CW_PA_SAMPLE_FORMAT = PA_SAMPLE_S16LE; /* Signed 16 bit, Little Endian */
|
||||
static const int CW_PA_BUFFER_N_SAMPLES = 1024;
|
||||
@@ -117,21 +89,6 @@ static const int CW_PA_BUFFER_N_SAMPLES = 1024;
|
||||
*/
|
||||
bool cw_is_pa_possible(const char *device)
|
||||
{
|
||||
- const char *library_name = "libpulse-simple.so";
|
||||
- if (!cw_dlopen_internal(library_name, &(cw_pa.handle))) {
|
||||
- cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "libcw_pa: can't access PulseAudio library \"%s\"", library_name);
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- int rv = cw_pa_dlsym_internal(cw_pa.handle);
|
||||
- if (rv < 0) {
|
||||
- cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "libcw_pa: failed to resolve PulseAudio symbol #%d, can't correctly load PulseAudio library", rv);
|
||||
- dlclose(cw_pa.handle);
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
const char *dev = (char *) NULL;
|
||||
if (device && strcmp(device, CW_DEFAULT_PA_DEVICE)) {
|
||||
dev = device;
|
||||
@@ -145,13 +102,10 @@ bool cw_is_pa_possible(const char *device)
|
||||
|
||||
if (!s) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "libcw_pa: can't connect to PulseAudio server: %s", cw_pa.pa_strerror(error));
|
||||
- if (cw_pa.handle) {
|
||||
- dlclose(cw_pa.handle);
|
||||
- }
|
||||
+ "libcw_pa: can't connect to PulseAudio server: %s", pa_strerror(error));
|
||||
return false;
|
||||
} else {
|
||||
- cw_pa.pa_simple_free(s);
|
||||
+ pa_simple_free(s);
|
||||
s = NULL;
|
||||
return true;
|
||||
}
|
||||
@@ -186,10 +140,10 @@ int cw_pa_write_internal(cw_gen_t *gen)
|
||||
|
||||
int error = 0;
|
||||
size_t n_bytes = sizeof (gen->buffer[0]) * gen->buffer_n_samples;
|
||||
- int rv = cw_pa.pa_simple_write(gen->pa_data.s, gen->buffer, n_bytes, &error);
|
||||
+ int rv = pa_simple_write(gen->pa_data.s, gen->buffer, n_bytes, &error);
|
||||
if (rv < 0) {
|
||||
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "libcw_pa: pa_simple_write() failed: %s", cw_pa.pa_strerror(error));
|
||||
+ "libcw_pa: pa_simple_write() failed: %s", pa_strerror(error));
|
||||
} else {
|
||||
//cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO, "libcw_pa: written %d samples with PulseAudio", gen->buffer_n_samples);
|
||||
}
|
||||
@@ -237,13 +191,13 @@ pa_simple *cw_pa_simple_new_internal(pa_sample_spec *ss, pa_buffer_attr *ba, con
|
||||
}
|
||||
|
||||
// http://www.mail-archive.com/pulseaudio-tickets@mail.0pointer.de/msg03295.html
|
||||
- ba->tlength = cw_pa.pa_usec_to_bytes(50*1000, ss);
|
||||
- ba->minreq = cw_pa.pa_usec_to_bytes(0, ss);
|
||||
- ba->maxlength = cw_pa.pa_usec_to_bytes(50*1000, ss);
|
||||
+ ba->tlength = pa_usec_to_bytes(50*1000, ss);
|
||||
+ ba->minreq = pa_usec_to_bytes(0, ss);
|
||||
+ ba->maxlength = pa_usec_to_bytes(50*1000, ss);
|
||||
/* ba->prebuf = ; */ /* ? */
|
||||
/* ba->fragsize = sizeof(uint32_t) -1; */ /* not relevant to playback */
|
||||
|
||||
- pa_simple *s = cw_pa.pa_simple_new(NULL, /* server name (NULL for default) */
|
||||
+ pa_simple *s = pa_simple_new(NULL, /* server name (NULL for default) */
|
||||
"libcw", /* descriptive name of client (application name etc.) */
|
||||
PA_STREAM_PLAYBACK, /* stream direction */
|
||||
dev, /* device/sink name (NULL for default) */
|
||||
@@ -258,47 +212,6 @@ pa_simple *cw_pa_simple_new_internal(pa_sample_spec *ss, pa_buffer_attr *ba, con
|
||||
|
||||
|
||||
|
||||
-
|
||||
-
|
||||
-/**
|
||||
- \brief Resolve/get symbols from PulseAudio library
|
||||
-
|
||||
- Function resolves/gets addresses of few PulseAudio functions used by
|
||||
- libcw and stores them in cw_pa global variable.
|
||||
-
|
||||
- On failure the function returns negative value, different for every
|
||||
- symbol that the funciton failed to resolve. Function stops and returns
|
||||
- on first failure.
|
||||
-
|
||||
- \param handle - handle to open PulseAudio library
|
||||
-
|
||||
- \return 0 on success
|
||||
- \return negative value on failure
|
||||
-*/
|
||||
-int cw_pa_dlsym_internal(void *handle)
|
||||
-{
|
||||
- *(void **) &(cw_pa.pa_simple_new) = dlsym(handle, "pa_simple_new");
|
||||
- if (!cw_pa.pa_simple_new) return -1;
|
||||
- *(void **) &(cw_pa.pa_simple_free) = dlsym(handle, "pa_simple_free");
|
||||
- if (!cw_pa.pa_simple_free) return -2;
|
||||
- *(void **) &(cw_pa.pa_simple_write) = dlsym(handle, "pa_simple_write");
|
||||
- if (!cw_pa.pa_simple_write) return -3;
|
||||
- *(void **) &(cw_pa.pa_strerror) = dlsym(handle, "pa_strerror");
|
||||
- if (!cw_pa.pa_strerror) return -4;
|
||||
- *(void **) &(cw_pa.pa_simple_get_latency) = dlsym(handle, "pa_simple_get_latency");
|
||||
- if (!cw_pa.pa_simple_get_latency) return -5;
|
||||
- *(void **) &(cw_pa.pa_simple_drain) = dlsym(handle, "pa_simple_drain");
|
||||
- if (!cw_pa.pa_simple_drain) return -6;
|
||||
- *(void **) &(cw_pa.pa_usec_to_bytes) = dlsym(handle, "pa_usec_to_bytes");
|
||||
- if (!cw_pa.pa_usec_to_bytes) return -7;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
/**
|
||||
\brief Open PulseAudio output, associate it with given generator
|
||||
|
||||
@@ -325,16 +238,16 @@ int cw_pa_open_device_internal(cw_gen_t *gen)
|
||||
|
||||
if (!gen->pa_data.s) {
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "libcw_pa: can't connect to PulseAudio server: %s", cw_pa.pa_strerror(error));
|
||||
+ "libcw_pa: can't connect to PulseAudio server: %s", pa_strerror(error));
|
||||
return false;
|
||||
}
|
||||
|
||||
gen->buffer_n_samples = CW_PA_BUFFER_N_SAMPLES;
|
||||
gen->sample_rate = gen->pa_data.ss.rate;
|
||||
|
||||
- if ((gen->pa_data.latency_usecs = cw_pa.pa_simple_get_latency(gen->pa_data.s, &error)) == (pa_usec_t) -1) {
|
||||
+ if ((gen->pa_data.latency_usecs = pa_simple_get_latency(gen->pa_data.s, &error)) == (pa_usec_t) -1) {
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "libcw_pa: pa_simple_get_latency() failed: %s", cw_pa.pa_strerror(error));
|
||||
+ "libcw_pa: pa_simple_get_latency() failed: %s", pa_strerror(error));
|
||||
}
|
||||
|
||||
#if CW_DEV_RAW_SINK
|
||||
@@ -357,20 +270,17 @@ void cw_pa_close_device_internal(cw_gen_t *gen)
|
||||
if (gen->pa_data.s) {
|
||||
/* Make sure that every single sample was played */
|
||||
int error;
|
||||
- if (cw_pa.pa_simple_drain(gen->pa_data.s, &error) < 0) {
|
||||
+ if (pa_simple_drain(gen->pa_data.s, &error) < 0) {
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
|
||||
- "libcw_pa: pa_simple_drain() failed: %s", cw_pa.pa_strerror(error));
|
||||
+ "libcw_pa: pa_simple_drain() failed: %s", pa_strerror(error));
|
||||
}
|
||||
- cw_pa.pa_simple_free(gen->pa_data.s);
|
||||
+ pa_simple_free(gen->pa_data.s);
|
||||
gen->pa_data.s = NULL;
|
||||
} else {
|
||||
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING,
|
||||
"libcw_pa: called the function for NULL PA sink");
|
||||
}
|
||||
|
||||
- if (cw_pa.handle) {
|
||||
- dlclose(cw_pa.handle);
|
||||
- }
|
||||
|
||||
#if CW_DEV_RAW_SINK
|
||||
if (gen->dev_raw_sink != -1) {
|
||||
--
|
||||
2.16.2
|
||||
|
||||
39
pkgs/applications/radio/urh/default.nix
Normal file
39
pkgs/applications/radio/urh/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, fetchFromGitHub, python3Packages
|
||||
, hackrf, rtl-sdr, airspy, limesuite, libiio
|
||||
, libbladeRF
|
||||
, qt5
|
||||
, USRPSupport ? false, uhd }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "urh";
|
||||
version = "2.9.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jopohl";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-TrvyPcpSMACrbKPVOjxHsVsC28LmruiVO/CyCPh0KZ8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
|
||||
buildInputs = [ hackrf rtl-sdr airspy limesuite libiio libbladeRF ]
|
||||
++ lib.optional USRPSupport uhd;
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
pyqt5 numpy psutil cython pyzmq pyaudio setuptools
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
wrapQtApp $out/bin/urh
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/jopohl/urh";
|
||||
description = "Universal Radio Hacker: investigate wireless protocols like a boss";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ fpletz ];
|
||||
};
|
||||
}
|
||||
46
pkgs/applications/radio/welle-io/default.nix
Normal file
46
pkgs/applications/radio/welle-io/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ mkDerivation, lib, fetchFromGitHub, cmake, pkg-config
|
||||
, qtbase, qtcharts, qtmultimedia, qtquickcontrols, qtquickcontrols2, qtgraphicaleffects
|
||||
, faad2, rtl-sdr, soapysdr-with-plugins, libusb-compat-0_1, fftwSinglePrec, lame, mpg123
|
||||
} :
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "welle-io";
|
||||
version = "2.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AlbrechtL";
|
||||
repo = "welle.io";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-xXiCL/A2SwCSr5SA4AQQEdieRzBksXx9Z78bHtlFiW4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
faad2
|
||||
fftwSinglePrec
|
||||
lame
|
||||
libusb-compat-0_1
|
||||
mpg123
|
||||
qtbase
|
||||
qtcharts
|
||||
qtmultimedia
|
||||
qtquickcontrols
|
||||
qtquickcontrols2
|
||||
qtgraphicaleffects
|
||||
rtl-sdr
|
||||
soapysdr-with-plugins
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DRTLSDR=true" "-DSOAPYSDR=true"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A DAB/DAB+ Software Radio";
|
||||
homepage = "https://www.welle.io/";
|
||||
maintainers = with maintainers; [ ck3d markuskowa ];
|
||||
license = licenses.gpl2Only;
|
||||
platforms = with platforms; [ "x86_64-linux" "i686-linux" ] ++ darwin;
|
||||
};
|
||||
}
|
||||
41
pkgs/applications/radio/wsjtx/default.nix
Normal file
41
pkgs/applications/radio/wsjtx/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib, stdenv, fetchurl, asciidoc, asciidoctor, autoconf, automake, cmake,
|
||||
docbook_xsl, fftw, fftwFloat, gfortran, libtool, libusb1, qtbase,
|
||||
qtmultimedia, qtserialport, qttools, boost, texinfo, wrapQtAppsHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wsjtx";
|
||||
version = "2.5.4";
|
||||
|
||||
# This is a "superbuild" tarball containing both wsjtx and a hamlib fork
|
||||
src = fetchurl {
|
||||
url = "http://physics.princeton.edu/pulsar/k1jt/wsjtx-${version}.tgz";
|
||||
sha256 = "sha256-Gz84Rq0sCl9BAXi2YSdl1Z7mPbJJ62z8MyrOF/CjCJg=";
|
||||
};
|
||||
|
||||
# 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
|
||||
];
|
||||
buildInputs = [ fftw fftwFloat libusb1 qtbase qtmultimedia qtserialport boost ];
|
||||
|
||||
# Remove Git dependency from superbuild since sources are included
|
||||
patches = [ ./super.patch ];
|
||||
|
||||
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://physics.princeton.edu/pulsar/k1jt/wsjtx.html";
|
||||
# Older licenses are for the statically-linked hamlib
|
||||
license = with licenses; [ gpl3Plus gpl2Plus lgpl21Plus ];
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ lasandell numinit ];
|
||||
};
|
||||
}
|
||||
12
pkgs/applications/radio/wsjtx/super.patch
Normal file
12
pkgs/applications/radio/wsjtx/super.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
31
pkgs/applications/radio/xlog/default.nix
Normal file
31
pkgs/applications/radio/xlog/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchurl, glib, gtk2, pkg-config, hamlib }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xlog";
|
||||
version = "2.0.24";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.savannah.gnu.org/releases/xlog/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-jUU6xt3H9bY9CAQRTFQjprlsC77VwjIB/6sSRNzE+Lw=";
|
||||
};
|
||||
|
||||
# glib-2.62 deprecations
|
||||
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
|
||||
|
||||
buildInputs = [ glib pkg-config gtk2 hamlib ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An amateur radio logging program";
|
||||
longDescription =
|
||||
'' Xlog is an amateur radio logging program.
|
||||
It supports cabrillo, ADIF, trlog (format also used by tlf),
|
||||
and EDI (ARRL VHF/UHF contest format) and can import twlog, editest and OH1AA logbook files.
|
||||
Xlog is able to do DXCC lookups and will display country information, CQ and ITU zone,
|
||||
location in latitude and longitude and distance and heading in kilometers or miles,
|
||||
both for short and long path.
|
||||
'';
|
||||
homepage = "https://www.nongnu.org/xlog";
|
||||
maintainers = [ maintainers.mafo ];
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue