openwebrx: fix build with cmake 4, add version checks (#457918)

This commit is contained in:
Leona Maroni
2025-11-04 18:09:11 +00:00
committed by GitHub
3 changed files with 29 additions and 0 deletions
+9
View File
@@ -6,6 +6,7 @@
pkg-config,
fftwFloat,
libsamplerate,
versionCheckHook,
}:
stdenv.mkDerivation rec {
@@ -22,6 +23,10 @@ stdenv.mkDerivation rec {
postPatch = ''
# function is not defined in any headers but used in libcsdr.c
echo "int errhead();" >> src/predefined.h
substituteInPlace CMakeLists.txt --replace-fail \
"cmake_minimum_required (VERSION 3.0)" \
"cmake_minimum_required (VERSION 3.10)"
'';
nativeBuildInputs = [
@@ -42,6 +47,10 @@ stdenv.mkDerivation rec {
--replace '=''${exec_prefix}//' '=/'
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "version";
doInstallCheck = true;
meta = with lib; {
homepage = "https://github.com/jketterl/csdr";
description = "Simple DSP library and command-line tool for Software Defined Radio";
+6
View File
@@ -26,6 +26,12 @@ stdenv.mkDerivation (finalAttrs: {
./cpp-17.patch
];
postPatch = ''
substituteInPlace CMakeLists.txt --replace-fail \
"cmake_minimum_required (VERSION 3.0)" \
"cmake_minimum_required (VERSION 3.10)"
'';
nativeBuildInputs = [
cmake
];
+14
View File
@@ -14,6 +14,7 @@
sox,
wsjtx,
codecserver,
versionCheckHook,
}:
let
@@ -54,6 +55,12 @@ let
hash = "sha256-1H0TJ8QN3b6Lof5TWvyokhCeN+dN7ITwzRvEo2X8OWc=";
};
postPatch = ''
substituteInPlace CMakeLists.txt --replace-fail \
"cmake_minimum_required (VERSION 3.0)" \
"cmake_minimum_required (VERSION 3.10)"
'';
nativeBuildInputs = [
cmake
pkg-config
@@ -67,6 +74,10 @@ let
soapysdr-with-plugins
];
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/rtl_connector";
doInstallCheck = true;
meta = {
homepage = "https://github.com/jketterl/owrx_connector";
description = "Set of connectors that are used by OpenWebRX to interface with SDR hardware";
@@ -113,6 +124,9 @@ python3Packages.buildPythonApplication rec {
"test"
];
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru = {
inherit js8py owrx_connector;
};