lol

gnuradio: fix cross compilation

+10 -2
+3 -1
pkgs/applications/radio/gnuradio/default.nix
··· 67 67 # when gr-qtgui is disabled, icu needs to be included, otherwise 68 68 # building with boost 1.7x fails 69 69 ++ lib.optionals (!(hasFeature "gr-qtgui")) [ icu ]; 70 - pythonNative = with python.pkgs; [ 70 + pythonNative = with python.pythonOnBuildForHost.pkgs; [ 71 71 mako 72 72 six 73 73 ]; ··· 337 337 # This is the only python reference worth removing, if needed. 338 338 + lib.optionalString (!hasFeature "python-support") '' 339 339 remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake 340 + '' 341 + + lib.optionalString (!hasFeature "python-support" && hasFeature "gnuradio-runtime") '' 340 342 remove-references-to -t ${python} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary}) 341 343 remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake 342 344 '';
+7 -1
pkgs/applications/radio/gnuradio/shared.nix
··· 24 24 minor = builtins.elemAt (lib.splitVersion version) 2; 25 25 patch = builtins.elemAt (lib.splitVersion version) 3; 26 26 }; 27 + cross = stdenv.hostPlatform != stdenv.buildPlatform; 27 28 in 28 29 { 29 30 src = ··· 57 58 )) 58 59 ) featuresInfo 59 60 ); 60 - cmakeFlags = lib.mapAttrsToList ( 61 + cmakeFlags = [ 62 + # https://pybind11.readthedocs.io/en/stable/changelog.html#version-2-13-0-june-25-2024 63 + (lib.cmakeBool "CMAKE_CROSSCOMPILING" cross) 64 + (lib.cmakeBool "PYBIND11_USE_CROSSCOMPILING" (cross && hasFeature "gnuradio-runtime")) 65 + ] 66 + ++ lib.mapAttrsToList ( 61 67 feat: info: 62 68 ( 63 69 if feat == "basic" then