mirror of
https://github.com/lopsided98/nix-ros-overlay.git
synced 2025-06-09 17:42:22 +03:00
humble: fix libcamera
Add patch to fix libcamera 0.1.0 with Python 3.12, and move the override to the ROS2 common overlay.
This commit is contained in:
parent
24cb63ca28
commit
abafa3a103
4 changed files with 28 additions and 36 deletions
|
@ -57,6 +57,18 @@ in with lib; {
|
|||
};
|
||||
};
|
||||
|
||||
libcamera = rosSuper.libcamera.overrideAttrs ({
|
||||
patches ? [], ...
|
||||
}: {
|
||||
patches = patches ++ [
|
||||
# Fix build with Python 3.12
|
||||
(self.fetchpatch {
|
||||
url = "https://github.com/openembedded/meta-openembedded/raw/7d8115d5507bac6c018fbff8a7aa9bc513c2bc46/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-mojom-Drop-using-imp-module.patch";
|
||||
hash = "sha256-Q5tPOfbwO28Lg+bP/IINykTZC2ZL1jeWf6TGP7ZUAE8=";
|
||||
})
|
||||
];
|
||||
});
|
||||
|
||||
libfranka = rosSuper.libfranka.overrideAttrs ({
|
||||
cmakeFlags ? [], ...
|
||||
}: {
|
||||
|
|
|
@ -189,24 +189,6 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
libcamera = rosSuper.libcamera.overrideAttrs ({
|
||||
postPatch ? "",
|
||||
nativeBuildInputs ? [],
|
||||
...
|
||||
}: {
|
||||
# Nixpkgs defaults to enabling all optional features, but we
|
||||
# enable only features for which ROS package.xml declares
|
||||
# dependencies.
|
||||
mesonAutoFeatures = "auto";
|
||||
postPatch = postPatch + ''
|
||||
patchShebangs --build \
|
||||
src/py/libcamera/*.py \
|
||||
utils/codegen/*.py \
|
||||
utils/codegen/ipc/*.py
|
||||
'';
|
||||
nativeBuildInputs = nativeBuildInputs ++ [ self.ninja ];
|
||||
});
|
||||
|
||||
libphidget22 = lib.patchVendorUrl rosSuper.libphidget22 {
|
||||
url = "https://www.phidgets.com/downloads/phidget22/libraries/linux/libphidget22/libphidget22-1.19.20240304.tar.gz";
|
||||
hash = "sha256-GpzGMpQ02s/X/XEcGoozzMjigrbqvAu81bcb7QG+36E=";
|
||||
|
|
|
@ -189,24 +189,6 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
libcamera = rosSuper.libcamera.overrideAttrs ({
|
||||
postPatch ? "",
|
||||
nativeBuildInputs ? [],
|
||||
...
|
||||
}: {
|
||||
# Nixpkgs defaults to enabling all optional features, but we
|
||||
# enable only features for which ROS package.xml declares
|
||||
# dependencies.
|
||||
mesonAutoFeatures = "auto";
|
||||
postPatch = postPatch + ''
|
||||
patchShebangs --build \
|
||||
src/py/libcamera/*.py \
|
||||
utils/codegen/*.py \
|
||||
utils/codegen/ipc/*.py
|
||||
'';
|
||||
nativeBuildInputs = nativeBuildInputs ++ [ self.ninja ];
|
||||
});
|
||||
|
||||
libphidget22 = lib.patchVendorUrl rosSuper.libphidget22 {
|
||||
url = "https://www.phidgets.com/downloads/phidget22/libraries/linux/libphidget22/libphidget22-1.19.20240304.tar.gz";
|
||||
hash = "sha256-GpzGMpQ02s/X/XEcGoozzMjigrbqvAu81bcb7QG+36E=";
|
||||
|
|
|
@ -121,6 +121,22 @@ rosSelf: rosSuper: with rosSelf.lib; {
|
|||
cmakeFlags = cmakeFlags ++ [ "-DDOWNLOAD_TOML_LIB=OFF" ];
|
||||
});
|
||||
|
||||
libcamera = rosSuper.libcamera.overrideAttrs ({
|
||||
postPatch ? "",
|
||||
nativeBuildInputs ? [], ...
|
||||
}: {
|
||||
# Nixpkgs defaults to enabling all optional features, but we
|
||||
# enable only features for which ROS package.xml declares
|
||||
# dependencies.
|
||||
mesonAutoFeatures = "auto";
|
||||
postPatch = postPatch + ''
|
||||
patchShebangs --build \
|
||||
src/py/libcamera/*.py \
|
||||
utils
|
||||
'';
|
||||
nativeBuildInputs = nativeBuildInputs ++ [ self.ninja ];
|
||||
});
|
||||
|
||||
# Get rid of nlohmann_json vendoring
|
||||
librealsense2 = rosSuper.librealsense2.overrideAttrs ({
|
||||
buildInputs ? [], postPatch ? "", ...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue