Merge pull request #145257 from astro/openwebrx
This commit is contained in:
commit
312a3af375
5 changed files with 171 additions and 0 deletions
|
@ -1016,6 +1016,7 @@
|
|||
./services/web-apps/pgpkeyserver-lite.nix
|
||||
./services/web-apps/matomo.nix
|
||||
./services/web-apps/moinmoin.nix
|
||||
./services/web-apps/openwebrx.nix
|
||||
./services/web-apps/restya-board.nix
|
||||
./services/web-apps/sogo.nix
|
||||
./services/web-apps/rss-bridge.nix
|
||||
|
|
33
nixos/modules/services/web-apps/openwebrx.nix
Normal file
33
nixos/modules/services/web-apps/openwebrx.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.openwebrx;
|
||||
in
|
||||
{
|
||||
options.services.openwebrx = with lib; {
|
||||
enable = mkEnableOption "OpenWebRX Web interface for Software-Defined Radios on http://localhost:8073";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.openwebrx;
|
||||
description = "OpenWebRX package to use for the service";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services.openwebrx = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = with pkgs; [
|
||||
csdr
|
||||
alsaUtils
|
||||
netcat
|
||||
];
|
||||
serviceConfig = {
|
||||
ExecStart = "${cfg.package}/bin/openwebrx";
|
||||
Restart = "always";
|
||||
DynamicUser = true;
|
||||
# openwebrx uses /var/lib/openwebrx by default
|
||||
StateDirectory = [ "openwebrx" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
38
pkgs/applications/radio/csdr/default.nix
Normal file
38
pkgs/applications/radio/csdr/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ 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; {
|
||||
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 ];
|
||||
};
|
||||
}
|
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 ];
|
||||
};
|
||||
}
|
|
@ -15896,6 +15896,8 @@ with pkgs;
|
|||
|
||||
cryptominisat = callPackage ../applications/science/logic/cryptominisat { };
|
||||
|
||||
csdr = callPackage ../applications/radio/csdr { };
|
||||
|
||||
ctypes_sh = callPackage ../development/libraries/ctypes_sh { };
|
||||
|
||||
curlcpp = callPackage ../development/libraries/curlcpp { };
|
||||
|
@ -18914,6 +18916,11 @@ with pkgs;
|
|||
|
||||
openrct2 = callPackage ../games/openrct2 { };
|
||||
|
||||
openwebrx = callPackage ../applications/radio/openwebrx {
|
||||
inherit (python3Packages)
|
||||
buildPythonPackage buildPythonApplication setuptools;
|
||||
};
|
||||
|
||||
optparse-bash = callPackage ../development/libraries/optparse-bash { };
|
||||
|
||||
orcania = callPackage ../development/libraries/orcania { };
|
||||
|
|
Loading…
Reference in a new issue