sdrweb: remove local openwebrx in favor of nixpkgs PR
This commit is contained in:
parent
55424c98ad
commit
7fb4e4cd2e
17
flake.lock
17
flake.lock
|
@ -118,6 +118,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-openwebrx": {
|
||||
"locked": {
|
||||
"lastModified": 1636560911,
|
||||
"narHash": "sha256-TsyxmINKPni6lkrWhz6PkVjAb0uXyFVjn95vEzHnubE=",
|
||||
"owner": "astro",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "455ba6c08ea042718754db5a1d7b1389fd7d8f02",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "astro",
|
||||
"ref": "openwebrx",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1636267212,
|
||||
|
@ -189,6 +205,7 @@
|
|||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-mobilizon": "nixpkgs-mobilizon",
|
||||
"nixpkgs-openwebrx": "nixpkgs-openwebrx",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"scrapers": "scrapers",
|
||||
"secrets": "secrets",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/release-21.05";
|
||||
nixpkgs-mobilizon.url = "github:minijackson/nixpkgs/init-mobilizon";
|
||||
nixpkgs-openwebrx.url = "github:astro/nixpkgs/openwebrx";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
secrets.url = "git+ssh://gitea@gitea.c3d2.de/c3d2-admins/secrets.git";
|
||||
nixos-hardware.url = "github:nixos/nixos-hardware";
|
||||
|
@ -72,7 +73,7 @@
|
|||
pkgs = self.legacyPackages."${system}";
|
||||
overlayPkgs = self.overlay overlayPkgs pkgs;
|
||||
in {
|
||||
inherit (pkgs) bmxd openwebrx;
|
||||
inherit (pkgs) bmxd;
|
||||
|
||||
list-upgradable = pkgs.writeScriptBin "list-upgradable" ''
|
||||
#! ${pkgs.runtimeShell}
|
||||
|
@ -467,6 +468,8 @@
|
|||
heliwatch.nixosModules.heliwatch
|
||||
./hosts/containers/sdrweb
|
||||
];
|
||||
# TODO: pending https://github.com/NixOS/nixpkgs/pull/145257
|
||||
nixpkgs = inputs.nixpkgs-openwebrx;
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ in {
|
|||
imports = [
|
||||
./users
|
||||
./stats.nix
|
||||
./openwebrx.nix
|
||||
./audio-server
|
||||
./pi-sensors.nix
|
||||
];
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
{ self, system, config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.openwebrx;
|
||||
in
|
||||
{
|
||||
options.services.openwebrx = {
|
||||
enable = lib.mkEnableOption "Enable OpenWebRX Web interface for Software-Defined Radios";
|
||||
|
||||
package = lib.mkOption {
|
||||
default = pkgs.openwebrx;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
users = {
|
||||
users.openwebrx = {
|
||||
isSystemUser = true;
|
||||
group = "openwebrx";
|
||||
home = "/var/lib/openwebrx";
|
||||
};
|
||||
groups.openwebrx = {};
|
||||
};
|
||||
|
||||
systemd.services.openwebrx = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [
|
||||
cfg.package.csdr
|
||||
pkgs.alsaUtils
|
||||
pkgs.netcat
|
||||
];
|
||||
serviceConfig = {
|
||||
ExecStart = "${cfg.package}/bin/openwebrx";
|
||||
Restart = "always";
|
||||
User = "openwebrx";
|
||||
Groups = "openwebrx";
|
||||
WorkingDirectory = "/var/lib/openwebrx";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/openwebrx 0755 openwebrx openwebrx -"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -43,6 +43,9 @@ in
|
|||
'';
|
||||
};
|
||||
};
|
||||
# Workaround for nixpkgs/master:
|
||||
users.users.collectd.group = "collectd";
|
||||
users.groups.collectd = {};
|
||||
|
||||
services.nginx = lib.mkIf config.services.nginx.enable {
|
||||
virtualHosts.localhost.locations."/nginx_status".extraConfig = ''
|
||||
|
|
|
@ -5,8 +5,6 @@ final: prev:
|
|||
|
||||
pile = prev.callPackage ./pile.nix { };
|
||||
|
||||
openwebrx = prev.python3Packages.callPackage ./openwebrx.nix { };
|
||||
|
||||
dump1090_sdrplus = prev.callPackage ./dump1090.nix { };
|
||||
|
||||
pi-sensors = prev.callPackage ./pi-sensors { };
|
||||
|
|
|
@ -1,117 +0,0 @@
|
|||
{ stdenv, buildPythonPackage, buildPythonApplication, fetchFromGitHub
|
||||
, autoreconfHook, pkg-config, fftw, libsamplerate
|
||||
, cmake, rtl-sdr, soapysdr-with-plugins, alsa-lib
|
||||
, setuptools
|
||||
}:
|
||||
|
||||
let
|
||||
csdr = 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 = [
|
||||
(fftw.overrideAttrs (oa: {
|
||||
configureFlags = oa.configureFlags ++ [
|
||||
"--enable-float"
|
||||
];
|
||||
}))
|
||||
libsamplerate
|
||||
];
|
||||
};
|
||||
|
||||
js8py = buildPythonPackage rec {
|
||||
pname = "js8py";
|
||||
version = "0.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jketterl";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1j80zclg1cl5clqd00qqa16prz7cyc32bvxqz2mh540cirygq24w";
|
||||
};
|
||||
};
|
||||
|
||||
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
|
||||
];
|
||||
};
|
||||
|
||||
direwolf = stdenv.mkDerivation rec {
|
||||
pname = "direwolf";
|
||||
version = "1.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wb2osz";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0xmz64m02knbrpasfij4rrq53ksxna5idxwgabcw4n2b1ig7pyx5";
|
||||
};
|
||||
patchPhase = ''
|
||||
substituteInPlace conf/CMakeLists.txt \
|
||||
--replace /etc/udev/ $out/etc/udev/
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
];
|
||||
};
|
||||
|
||||
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
|
||||
];
|
||||
|
||||
passthru = {
|
||||
inherit csdr js8py owrx_connector direwolf;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue