From 6eed6303f25a45aad06b222b9a76fc946a85b62d Mon Sep 17 00:00:00 2001 From: Jordan Holt Date: Sat, 10 Aug 2024 22:22:03 +0100 Subject: [PATCH] Use rpi libcamera fork --- overlays/libcamera.nix | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/overlays/libcamera.nix b/overlays/libcamera.nix index 44673ea..808d8c5 100644 --- a/overlays/libcamera.nix +++ b/overlays/libcamera.nix @@ -1,6 +1,38 @@ final: prev: { + libpisp = final.stdenv.mkDerivation { + name = "libpisp"; + version = "1.0.5"; + src = final.fetchFromGitHub { + owner = "raspberrypi"; + repo = "libpisp"; + rev = "v1.0.5"; + hash = "sha256-CHd44CH5dBcZuK+5fZtONZ8HE/lwGKwK5U0BYUK8gG4="; + }; + + nativeBuildInputs = with final; [ + pkg-config + meson + ninja + ]; + + buildInputs = with final; [ + nlohmann_json + boost + ]; + + BOOST_INCLUDEDIR = "${prev.lib.getDev final.boost}/include"; + BOOST_LIBRARYDIR = "${prev.lib.getLib final.boost}/lib"; + }; + libcamera = prev.libcamera.overrideAttrs (old: { + src = final.fetchFromGitHub { + owner = "raspberrypi"; + repo = "libcamera"; + rev = "eb00c13d7c9f937732305d47af5b8ccf895e700f"; + hash = "sha256-p0/inkHPRUkxSIsTmj7VI7sIaX7OXdqjMGZ31W7cnt4="; + }; + postPatch = '' patchShebangs utils/ src/py/ ''; @@ -10,13 +42,19 @@ final: prev: ./0001-Ignore-IPA-signing.patch ]; + buildInputs = old.buildInputs ++ (with final; [ + libpisp + libglibutil + ]); + mesonFlags = old.mesonFlags ++ [ "--buildtype=release" - "-Dpipelines=rpi/vc4" - "-Dipas=rpi/vc4" + "-Dpipelines=rpi/vc4,rpi/pisp" + "-Dipas=rpi/vc4,rpi/pisp" "-Dgstreamer=enabled" "-Dtest=false" "-Dcam=enabled" + "-Dpycamera=disabled" ]; });