mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-11-08 11:36:04 +01:00
Fix libcamera build
This backports the `postPatch` change from nixpkgs to the libcamera overlay so the build doesn't break, and also changes the rpicam-apps overlay so it builds properly now. The version in the libcamera overlay has been fixed to match upstream.
This commit is contained in:
parent
be1defc74e
commit
9d173a9416
2 changed files with 18 additions and 14 deletions
|
|
@ -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"
|
||||||
|
|
|
||||||
|
|
@ -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";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue