sdr-j-fm: make upstream's dlopen work

This commit is contained in:
Doron Behar
2025-10-14 19:57:08 +03:00
parent c85e9adeae
commit 3a633edf31

View File

@@ -12,6 +12,11 @@
libusb1, libusb1,
libsndfile, libsndfile,
featuresOverride ? { }, featuresOverride ? { },
airspy,
hackrf,
libiio,
limesuite,
rtl-sdr,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
@@ -61,12 +66,25 @@ stdenv.mkDerivation (finalAttrs: {
# but they don't actually make a difference. # but they don't actually make a difference.
} }
// featuresOverride; // featuresOverride;
runtimeDependencies = [
airspy
hackrf
libiio
limesuite
rtl-sdr
];
}; };
postInstall = '' postInstall = ''
# Weird default of upstream # Weird default of upstream
mv $out/linux-bin $out/bin mv $out/linux-bin $out/bin
mv $out/bin/fmreceiver{-3.15,} mv $out/bin/fmreceiver{-3.15,}
# Ideally, upstream's cmake files should link these libraries to the
# executable, but it'd require a bit of work. See:
# https://github.com/JvanKatwijk/sdr-j-fm/issues/27
wrapProgram $out/bin/fmreceiver \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.finalPackage.passthru.runtimeDependencies}
''; '';
meta = { meta = {