Merge pull request #42 from seaweed-generation/unstable-libcamera

Fix libcamera build
This commit is contained in:
Travis Staton 2024-08-15 16:55:30 -04:00 committed by GitHub
commit 6d61a9b18b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 14 deletions

View file

@ -3,8 +3,7 @@
, libpisp-src , libpisp-src
, ... , ...
}: }:
final: prev: final: prev: {
{
# A recent known working version of rpicam-apps # A recent known working version of rpicam-apps
libcamera-apps = libcamera-apps =
final.callPackage ./rpicam-apps.nix { inherit rpicam-apps-src; }; final.callPackage ./rpicam-apps.nix { inherit rpicam-apps-src; };
@ -22,7 +21,7 @@ final: prev:
}; };
libcamera = prev.libcamera.overrideAttrs (old: { libcamera = prev.libcamera.overrideAttrs (old: {
version = "0.2.0"; version = "0.3.0";
src = libcamera-src; src = libcamera-src;
buildInputs = old.buildInputs ++ (with final; [ buildInputs = old.buildInputs ++ (with final; [
libpisp openssl libtiff libpisp openssl libtiff
@ -30,9 +29,11 @@ final: prev:
python3-gnutls pybind11 pyyaml ply python3-gnutls pybind11 pyyaml ply
])) ]))
libglibutil gst_all_1.gst-plugins-base libglibutil gst_all_1.gst-plugins-base
]); ]);
patches = [ ]; patches = [ ];
postPatch = ''
patchShebangs src/py/ utils/
'';
mesonFlags = [ mesonFlags = [
"--buildtype=release" "--buildtype=release"
"-Dpipelines=rpi/vc4,rpi/pisp" "-Dpipelines=rpi/vc4,rpi/pisp"

View file

@ -1,22 +1,25 @@
{ libcamera-apps-src, lib, pkgs, stdenv }: { rpicam-apps-src, lib, pkgs, stdenv }:
stdenv.mkDerivation rec {
stdenv.mkDerivation {
pname = "libcamera-apps"; pname = "libcamera-apps";
version = "v1.5.0"; version = "v1.5.0";
src = libcamera-apps-src; src = rpicam-apps-src;
nativeBuildInputs = with pkgs; [ meson pkg-config ]; nativeBuildInputs = with pkgs; [ meson pkg-config ];
buildInputs = with pkgs; [ libjpeg libtiff libcamera libepoxy boost libexif libpng ninja ]; buildInputs = with pkgs; [ libjpeg libtiff libcamera libepoxy boost libexif libpng ffmpeg libdrm ninja ];
mesonFlags = [ mesonFlags = [
"-Denable_qt=false" "-Denable_qt=disabled"
"-Denable_opencv=false" "-Denable_opencv=disabled"
"-Denable_tflite=false" "-Denable_tflite=disabled"
"-Denable_drm=true" "-Denable_egl=disabled"
"-Denable_hailo=disabled"
"-Denable_drm=enabled"
]; ];
# Meson is no longer able to pick up Boost automatically. # Meson is no longer able to pick up Boost automatically.
# https://github.com/NixOS/nixpkgs/issues/86131 # https://github.com/NixOS/nixpkgs/issues/86131
BOOST_INCLUDEDIR = "${lib.getDev boost}/include"; BOOST_INCLUDEDIR = "${lib.getDev pkgs.boost}/include";
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib"; BOOST_LIBRARYDIR = "${lib.getLib pkgs.boost}/lib";
meta = with lib; { meta = with lib; {
description = "Userland tools interfacing with Raspberry Pi cameras"; description = "Userland tools interfacing with Raspberry Pi cameras";