libcamera: Fix builds for jazzy and rolling

The version for humble is still broken, because its build system
depends on Python module imp, which was removed from Python 3.12.
This commit is contained in:
Michal Sojka 2025-03-16 20:33:38 +01:00 committed by Ben Wolsieffer
parent 4176d3dd61
commit 24cb63ca28
2 changed files with 36 additions and 0 deletions

View file

@ -189,6 +189,24 @@ 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=";

View file

@ -189,6 +189,24 @@ 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=";