Unverified Commit aaec16e8 authored by Leona Maroni's avatar Leona Maroni Committed by GitHub
Browse files

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

parents f8541e00 32eb09ca
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
@@ -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;
  };