diff --git a/distros/jazzy/overrides.nix b/distros/jazzy/overrides.nix index 0b89a3215d..6530579f78 100644 --- a/distros/jazzy/overrides.nix +++ b/distros/jazzy/overrides.nix @@ -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="; diff --git a/distros/rolling/overrides.nix b/distros/rolling/overrides.nix index db0231aa33..3090810000 100644 --- a/distros/rolling/overrides.nix +++ b/distros/rolling/overrides.nix @@ -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=";