Commit ab56b5c7 authored by Chuang Zhu's avatar Chuang Zhu
Browse files

soapysdr: fix searchPath

SOAPY_SDR_ABI_VERSION isn't necessarily `major.minor`. Even among stable
versions, it can be something else.

PR #356651 updated soapysdr to a git version without updating
`searchPath`, causing soapysdr blocks in GNU Radio to be unable to find
any drivers.

Fixes https://discourse.nixos.org/t/gnu-radio-soapysdr-doesnt-detect-rtl-sdr/57310
parent a79cfe0e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@

stdenv.mkDerivation (finalAttrs: {
  pname = "soapysdr";
  # Don't forget to change passthru.abiVersion
  version = "0.8.2-pre";

  src = fetchFromGitHub {
@@ -66,7 +67,9 @@ stdenv.mkDerivation (finalAttrs: {

  passthru = {
    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
    searchPath = "lib/SoapySDR/modules${lib.versions.majorMinor finalAttrs.version}";
    # SOAPY_SDR_ABI_VERSION defined in include/SoapySDR/Version.h
    abiVersion = "0.8-3";
    searchPath = "lib/SoapySDR/modules${finalAttrs.passthru.abiVersion}";
  };

  meta = with lib; {