Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Commit 6d61a9b

Browse files
authored
Merge pull request #42 from seaweed-generation/unstable-libcamera
Fix libcamera build
2 parents 35bb455 + 9d173a9 commit 6d61a9b

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

overlays/libcamera.nix

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
, libpisp-src
44
, ...
55
}:
6-
final: prev:
7-
{
6+
final: prev: {
87
# A recent known working version of rpicam-apps
98
libcamera-apps =
109
final.callPackage ./rpicam-apps.nix { inherit rpicam-apps-src; };
@@ -22,17 +21,19 @@ final: prev:
2221
};
2322

2423
libcamera = prev.libcamera.overrideAttrs (old: {
25-
version = "0.2.0";
24+
version = "0.3.0";
2625
src = libcamera-src;
2726
buildInputs = old.buildInputs ++ (with final; [
2827
libpisp openssl libtiff
2928
(python3.withPackages (ps: with ps; [
3029
python3-gnutls pybind11 pyyaml ply
3130
]))
3231
libglibutil gst_all_1.gst-plugins-base
33-
3432
]);
3533
patches = [ ];
34+
postPatch = ''
35+
patchShebangs src/py/ utils/
36+
'';
3637
mesonFlags = [
3738
"--buildtype=release"
3839
"-Dpipelines=rpi/vc4,rpi/pisp"

overlays/rpicam-apps.nix

+13-10
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
{ libcamera-apps-src, lib, pkgs, stdenv }:
2-
stdenv.mkDerivation rec {
1+
{ rpicam-apps-src, lib, pkgs, stdenv }:
2+
3+
stdenv.mkDerivation {
34
pname = "libcamera-apps";
45
version = "v1.5.0";
56

6-
src = libcamera-apps-src;
7+
src = rpicam-apps-src;
78

89
nativeBuildInputs = with pkgs; [ meson pkg-config ];
9-
buildInputs = with pkgs; [ libjpeg libtiff libcamera libepoxy boost libexif libpng ninja ];
10+
buildInputs = with pkgs; [ libjpeg libtiff libcamera libepoxy boost libexif libpng ffmpeg libdrm ninja ];
1011
mesonFlags = [
11-
"-Denable_qt=false"
12-
"-Denable_opencv=false"
13-
"-Denable_tflite=false"
14-
"-Denable_drm=true"
12+
"-Denable_qt=disabled"
13+
"-Denable_opencv=disabled"
14+
"-Denable_tflite=disabled"
15+
"-Denable_egl=disabled"
16+
"-Denable_hailo=disabled"
17+
"-Denable_drm=enabled"
1518
];
1619
# Meson is no longer able to pick up Boost automatically.
1720
# https://github.com/NixOS/nixpkgs/issues/86131
18-
BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
19-
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
21+
BOOST_INCLUDEDIR = "${lib.getDev pkgs.boost}/include";
22+
BOOST_LIBRARYDIR = "${lib.getLib pkgs.boost}/lib";
2023

2124
meta = with lib; {
2225
description = "Userland tools interfacing with Raspberry Pi cameras";

0 commit comments

Comments
 (0)