From cae1f154e597bfba4842ef687fd214601fdde6cd Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 31 Jul 2024 13:21:40 +0300 Subject: [PATCH] gnuradio{,3_8}: use removeReferencesTo from nativeBuildInputs --- pkgs/applications/radio/gnuradio/3.8.nix | 2 +- pkgs/applications/radio/gnuradio/default.nix | 6 +++--- pkgs/applications/radio/gnuradio/shared.nix | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/radio/gnuradio/3.8.nix b/pkgs/applications/radio/gnuradio/3.8.nix index b8123d112003..67cc2d6c8ebf 100644 --- a/pkgs/applications/radio/gnuradio/3.8.nix +++ b/pkgs/applications/radio/gnuradio/3.8.nix @@ -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 '' ; })) diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index 6a04491a5cee..e7efa57428b8 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -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 '' ; })) diff --git a/pkgs/applications/radio/gnuradio/shared.nix b/pkgs/applications/radio/gnuradio/shared.nix index 9cf8b22b4158..fe75f6037f37 100644 --- a/pkgs/applications/radio/gnuradio/shared.nix +++ b/pkgs/applications/radio/gnuradio/shared.nix @@ -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