1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00

gnuradio{,3_8}: use removeReferencesTo from nativeBuildInputs

This commit is contained in:
Doron Behar 2024-07-31 13:21:40 +03:00
parent bb01e59deb
commit cae1f154e5
3 changed files with 7 additions and 7 deletions

View file

@ -296,7 +296,7 @@ stdenv.mkDerivation (finalAttrs: (shared // {
# This is the only python reference worth removing, if needed (3.7 doesn't
# set that reference).
+ lib.optionalString (!hasFeature "python-support") ''
${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
''
;
}))

View file

@ -312,9 +312,9 @@ stdenv.mkDerivation (finalAttrs: (shared // {
postInstall = shared.postInstall
# This is the only python reference worth removing, if needed.
+ lib.optionalString (!hasFeature "python-support") ''
${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
${removeReferencesTo}/bin/remove-references-to -t ${python} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
remove-references-to -t ${python} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
''
;
}))

View file

@ -38,7 +38,7 @@ in {
sha256 = sourceSha256;
}
;
nativeBuildInputs = lib.flatten (lib.mapAttrsToList (
nativeBuildInputs = [ removeReferencesTo ] ++ lib.flatten (lib.mapAttrsToList (
feat: info: (
lib.optionals (hasFeature feat) (
(lib.optionals (builtins.hasAttr "native" info) info.native) ++
@ -85,11 +85,11 @@ in {
postInstall = ""
# Gcc references
+ lib.optionalString (hasFeature "gnuradio-runtime") ''
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
''
# Clang references in InstalledDir
+ lib.optionalString (hasFeature "gnuradio-runtime" && stdenv.isDarwin) ''
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
''
;
# NOTE: Outputs are disabled due to upstream not using GNU InstallDIrs cmake