Skip to content

Commit 4ed8a33

Browse files
committed
wip
1 parent 66a317e commit 4ed8a33

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

distros/distro-overlay.nix

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ let
171171

172172
# Switch to Qt6 for python 3.13
173173
python-qt-binding = rosSuper.python-qt-binding.overrideAttrs ({
174-
patches ? [], propagatedBuildInputs ? [], ...
174+
patches ? [], propagatedBuildInputs ? [], postPatch ? "", ...
175175
}: {
176176
patches = patches ++ [
177177
# ref. https://github.com/ros-visualization/python_qt_binding/pull/143
@@ -191,6 +191,22 @@ let
191191
hash = "sha256-+ou08BZCIhRMDi9GMyAOLmdoGJNZaqLpA7nMszZOFgg=";
192192
})
193193
];
194+
# PySide6 libs are eg. PySide6/QtGui.abi3.so.1, not libpyside6_QtGui.abi3.so
195+
postPatch = postPatch + ''
196+
substituteInPlace cmake/pyside_config.py \
197+
--replace-fail \
198+
"return glob if sys.platform == 'win32' else 'lib' + glob" \
199+
"return glob" \
200+
--replace-fail \
201+
"return 'so.*'" \
202+
"return 'so*'" \
203+
--replace-fail \
204+
"'shiboken' in basename" \
205+
"'shiboken6' == os.path.basename(os.path.dirname(lib_name))" \
206+
--replace-fail \
207+
"'pyside6' in basename" \
208+
"'PySide6' == os.path.basename(os.path.dirname(lib_name))"
209+
'';
194210
propagatedBuildInputs = self.lib.lists.filter (p: p.name != "pyqt5") (propagatedBuildInputs ++ (with rosSelf.pythonPackages; [
195211
pyside6
196212
pyqt6-sip
@@ -267,6 +283,7 @@ let
267283
{
268284
patches ? [ ],
269285
propagatedBuildInputs ? [ ],
286+
nativeBuildInputs ? [ ],
270287
...
271288
}:
272289
{
@@ -286,7 +303,13 @@ let
286303
stripLen = 1;
287304
})
288305
];
289-
propagatedBuildInputs = propagatedBuildInputs ++ [ rosSuper.tinyxml2-vendor ];
306+
nativeBuildInputs = nativeBuildInputs ++ [ self.breakpointHook ];
307+
propagatedBuildInputs = propagatedBuildInputs ++ [ rosSelf.tinyxml2-vendor ]
308+
++ (with rosSelf.pythonPackages; [
309+
pyside6
310+
pyqt6-sip
311+
shiboken6
312+
]);
290313
}
291314
);
292315

0 commit comments

Comments
 (0)