From 6874ffdf536bd2228732da9a0d52691c9b2d3f37 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sat, 16 Aug 2025 22:11:06 +0300 Subject: [PATCH] gnuradio.unwrapped: Add pythonRuntime deps only with python-support Especially useful when cross compiling and when enabling gr-filter feature, which has the following in upstream's CMakeLists.txt file: ``` gr_python_check_module_raw("pyqtgraph" "import pyqtgraph" PYQTGRAPH_FOUND) gr_python_check_module_raw("scipy" "import scipy" SCIPY_FOUND) if(NOT PYQTGRAPH_FOUND OR NOT SCIPY_FOUND) message(WARNING "PyQtGraph and Scipy are required to run the filter design tool, " "but are not detected! Please make sure they are installed on " "the target system.") endif(NOT PYQTGRAPH_FOUND OR NOT SCIPY_FOUND) if(ENABLE_PYTHON) add_subdirectory(python/filter) add_subdirectory(python/filter/design) add_subdirectory(python/filter/gui) add_subdirectory(apps) if(ENABLE_EXAMPLES) add_subdirectory(examples) endif(ENABLE_EXAMPLES) endif(ENABLE_PYTHON) if(ENABLE_GRC) add_subdirectory(grc) endif(ENABLE_GRC) ``` --- pkgs/applications/radio/gnuradio/shared.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/radio/gnuradio/shared.nix b/pkgs/applications/radio/gnuradio/shared.nix index c604f0bb7360..3eac7df05476 100644 --- a/pkgs/applications/radio/gnuradio/shared.nix +++ b/pkgs/applications/radio/gnuradio/shared.nix @@ -54,7 +54,9 @@ in feat: info: (lib.optionals (hasFeature feat) ( (lib.optionals (builtins.hasAttr "runtime" info) info.runtime) - ++ (lib.optionals (builtins.hasAttr "pythonRuntime" info) info.pythonRuntime) + ++ (lib.optionals ( + builtins.hasAttr "pythonRuntime" info && hasFeature "python-support" + ) info.pythonRuntime) )) ) featuresInfo );