1
0
Fork 0
mirror of https://github.com/lopsided98/nix-ros-overlay.git synced 2025-07-14 14:10:37 +03:00

Make pythonPackages overrides compose.

Implement the technique described here to make packageOverrides compose:
https://discourse.nixos.org/t/makeextensibleasoverlay/7116/5
This commit is contained in:
Ben Wolsieffer 2021-07-18 19:26:21 -04:00
parent 9cf4b76f63
commit 1cbd0cda22

View file

@ -1,7 +1,10 @@
self: super: with super.lib; let
self: super: with self.lib; let
pythonOverridesFor = python: python.override (old: {
packageOverrides = pySelf: pySuper: {
pythonOverridesFor = superPython: fix (python: superPython.override ({
packageOverrides ? _: _: {}, ...
}: {
self = python;
packageOverrides = composeExtensions packageOverrides (pySelf: pySuper: {
bson = pySelf.callPackage ./bson { };
catkin-pkg = pySelf.callPackage ./catkin-pkg { };
@ -39,8 +42,8 @@ self: super: with super.lib; let
# This has to be done here (rather than in rosPackages) because
# packageOverrides doesn't compose
wxPython = pySelf.wxPython_4_0;
};
});
});
}));
in {
colcon = with self.python3Packages; colcon-core.withExtensions [