Skip to content

Commit

Permalink
gnuradio{,3_8}: use removeReferencesTo from nativeBuildInputs
Browse files Browse the repository at this point in the history
  • Loading branch information
doronbehar committed Jul 31, 2024
1 parent bb01e59 commit cae1f15
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkgs/applications/radio/gnuradio/3.8.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
''
;
}))
6 changes: 3 additions & 3 deletions pkgs/applications/radio/gnuradio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
''
;
}))
6 changes: 3 additions & 3 deletions pkgs/applications/radio/gnuradio/shared.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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) ++
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cae1f15

Please sign in to comment.