gnuradio: Inherit log dependencies in passthrus

Inherit spdlog for GR 3.10 and log4cpp for lower GR versions. Inherit
both of these in the scope of the GR packages attribute set. Also use
the inherited log4cpp in qradiolink, gqrx & gnss-sdr.
This commit is contained in:
Doron Behar 2022-02-18 10:13:16 +02:00
parent c970bece30
commit 88519c6309
7 changed files with 28 additions and 14 deletions

View File

@ -12,8 +12,6 @@
, libpcap , libpcap
, orc , orc
, pkg-config , pkg-config
, uhd
, log4cpp
, blas, lapack , blas, lapack
, matio , matio
, pugixml , pugixml
@ -52,7 +50,7 @@ gnuradio3_8.pkgs.mkDerivation rec {
# UHD support is optional, but gnuradio is built with it, so there's # UHD support is optional, but gnuradio is built with it, so there's
# nothing to be gained by leaving it out. # nothing to be gained by leaving it out.
gnuradio3_8.unwrapped.uhd gnuradio3_8.unwrapped.uhd
log4cpp gnuradio3_8.unwrapped.log4cpp
blas lapack blas lapack
matio matio
pugixml pugixml

View File

@ -251,7 +251,11 @@ stdenv.mkDerivation rec {
]; ];
passthru = shared.passthru // { passthru = shared.passthru // {
# Deps that are potentially overriden and are used inside GR plugins - the same version must # Deps that are potentially overriden and are used inside GR plugins - the same version must
inherit boost volk; inherit
boost
volk
log4cpp
;
} // lib.optionalAttrs (hasFeature "gr-uhd") { } // lib.optionalAttrs (hasFeature "gr-uhd") {
inherit uhd; inherit uhd;
} // lib.optionalAttrs (hasFeature "gr-qtgui") { } // lib.optionalAttrs (hasFeature "gr-qtgui") {

View File

@ -275,7 +275,11 @@ stdenv.mkDerivation rec {
]; ];
passthru = shared.passthru // { passthru = shared.passthru // {
# Deps that are potentially overriden and are used inside GR plugins - the same version must # Deps that are potentially overriden and are used inside GR plugins - the same version must
inherit boost volk; inherit
boost
volk
log4cpp
;
} // lib.optionalAttrs (hasFeature "gr-uhd") { } // lib.optionalAttrs (hasFeature "gr-uhd") {
inherit uhd; inherit uhd;
} // lib.optionalAttrs (hasFeature "gr-qtgui") { } // lib.optionalAttrs (hasFeature "gr-qtgui") {

View File

@ -293,9 +293,15 @@ stdenv.mkDerivation rec {
]; ];
passthru = shared.passthru // { passthru = shared.passthru // {
# Deps that are potentially overriden and are used inside GR plugins - the same version must # Deps that are potentially overriden and are used inside GR plugins - the same version must
inherit boost volk; inherit
boost
volk
spdlog
;
} // lib.optionalAttrs (hasFeature "gr-uhd") { } // lib.optionalAttrs (hasFeature "gr-uhd") {
inherit uhd; inherit uhd;
} // lib.optionalAttrs (hasFeature "gr-pdu") {
inherit libiio libad9361;
} // lib.optionalAttrs (hasFeature "gr-qtgui") { } // lib.optionalAttrs (hasFeature "gr-qtgui") {
inherit (libsForQt5) qwt; inherit (libsForQt5) qwt;
}; };

View File

@ -5,7 +5,6 @@
, qt5 , qt5
, gnuradio3_8Minimal , gnuradio3_8Minimal
, thrift , thrift
, log4cpp
, mpir , mpir
, fftwFloat , fftwFloat
, alsa-lib , alsa-lib
@ -39,7 +38,7 @@ gnuradio3_8Minimal.pkgs.mkDerivation rec {
qt5.wrapQtAppsHook qt5.wrapQtAppsHook
]; ];
buildInputs = [ buildInputs = [
log4cpp gnuradio3_8Minimal.unwrapped.log4cpp
mpir mpir
fftwFloat fftwFloat
alsa-lib alsa-lib

View File

@ -7,7 +7,6 @@
, thrift , thrift
# Not gnuradioPackages' # Not gnuradioPackages'
, codec2 , codec2
, log4cpp
, gmp , gmp
, gsm , gsm
, libopus , libopus
@ -48,7 +47,7 @@ gnuradio3_8.pkgs.mkDerivation rec {
buildInputs = [ buildInputs = [
gnuradio3_8.unwrapped.boost gnuradio3_8.unwrapped.boost
codec2 codec2
log4cpp gnuradio3_8.unwrapped.log4cpp
gmp gmp
libpulseaudio libpulseaudio
libconfig libconfig

View File

@ -14,16 +14,20 @@ let
}; };
mkDerivation = mkDerivationWith stdenv.mkDerivation; mkDerivation = mkDerivationWith stdenv.mkDerivation;
callPackage = self.newScope { callPackage = self.newScope ({
inherit (gnuradio) inherit (gnuradio)
# Packages that are potentially overriden and used as deps here. # Packages that are potentially overriden and used as deps here.
boost boost
uhd
volk volk
; ;
inherit mkDerivationWith mkDerivation; inherit mkDerivationWith mkDerivation;
}; } // lib.optionalAttrs (gnuradio.hasFeature "gr-uhd") {
inherit (gnuradio) uhd;
} // (if (lib.versionAtLeast gnuradio.versionAttr.major "3.10") then {
inherit (gnuradio) spdlog;
} else {
inherit (gnuradio) log4cpp;
}));
in { in {
inherit callPackage mkDerivation mkDerivationWith; inherit callPackage mkDerivation mkDerivationWith;