tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
gnuradio: fix cross compilation
Doron Behar
6 months ago
f198a8a1
237e7a71
+10
-2
2 changed files
expand all
collapse all
unified
split
pkgs
applications
radio
gnuradio
default.nix
shared.nix
+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
70
-
pythonNative = with python.pkgs; [
70
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
340
+
''
341
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
27
+
cross = stdenv.hostPlatform != stdenv.buildPlatform;
27
28
in
28
29
{
29
30
src =
···
57
58
))
58
59
) featuresInfo
59
60
);
60
60
-
cmakeFlags = lib.mapAttrsToList (
61
61
+
cmakeFlags = [
62
62
+
# https://pybind11.readthedocs.io/en/stable/changelog.html#version-2-13-0-june-25-2024
63
63
+
(lib.cmakeBool "CMAKE_CROSSCOMPILING" cross)
64
64
+
(lib.cmakeBool "PYBIND11_USE_CROSSCOMPILING" (cross && hasFeature "gnuradio-runtime"))
65
65
+
]
66
66
+
++ lib.mapAttrsToList (
61
67
feat: info:
62
68
(
63
69
if feat == "basic" then