2021-08-12 14:41:47 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchgit
|
|
|
|
, lib
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
2022-01-13 20:06:32 +00:00
|
|
|
, makeFontsConf
|
2021-08-12 14:41:47 +00:00
|
|
|
, boost
|
|
|
|
, gnutls
|
|
|
|
, openssl
|
2022-01-13 20:06:32 +00:00
|
|
|
, libdrm
|
2021-08-12 14:41:47 +00:00
|
|
|
, libevent
|
|
|
|
, lttng-ust
|
|
|
|
, gst_all_1
|
|
|
|
, gtest
|
|
|
|
, graphviz
|
|
|
|
, doxygen
|
|
|
|
, python3
|
|
|
|
, python3Packages
|
2022-01-13 20:06:32 +00:00
|
|
|
, systemd # for libudev
|
2021-08-12 14:41:47 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "libcamera";
|
2022-01-13 20:06:32 +00:00
|
|
|
version = "unstable-2022-01-03";
|
2021-08-12 14:41:47 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
2021-10-04 12:37:57 +00:00
|
|
|
url = "https://git.libcamera.org/libcamera/libcamera.git";
|
2022-01-13 20:06:32 +00:00
|
|
|
rev = "1db1e31e664c1f613dc964d8519fe75d67b154b6";
|
|
|
|
hash = "sha256-pXYPIU9xDWA870Gp1Jgizi5xnUHRvTqEq/ofFXdVZdg=";
|
2021-08-12 14:41:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs utils/
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2021-08-12 14:41:47 +00:00
|
|
|
buildInputs = [
|
|
|
|
# IPA and signing
|
|
|
|
gnutls
|
|
|
|
boost
|
|
|
|
|
|
|
|
# gstreamer integration
|
|
|
|
gst_all_1.gstreamer
|
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
|
|
|
|
# cam integration
|
|
|
|
libevent
|
2022-01-13 20:06:32 +00:00
|
|
|
libdrm
|
|
|
|
|
|
|
|
# hotplugging
|
|
|
|
systemd
|
2021-08-12 14:41:47 +00:00
|
|
|
|
|
|
|
# lttng tracing
|
|
|
|
lttng-ust
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
gtest
|
2021-08-12 14:41:47 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
python3Packages.jinja2
|
|
|
|
python3Packages.pyyaml
|
|
|
|
python3Packages.ply
|
|
|
|
python3Packages.sphinx
|
|
|
|
graphviz
|
|
|
|
doxygen
|
2021-12-06 16:07:01 +00:00
|
|
|
openssl
|
2021-08-12 14:41:47 +00:00
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dv4l2=true"
|
|
|
|
"-Dqcam=disabled"
|
|
|
|
"-Dlc-compliance=disabled" # tries unconditionally to download gtest when enabled
|
|
|
|
];
|
2021-08-12 14:41:47 +00:00
|
|
|
|
|
|
|
# Fixes error on a deprecated declaration
|
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
# Silence fontconfig warnings about missing config
|
|
|
|
FONTCONFIG_FILE = makeFontsConf { fontDirectories = []; };
|
|
|
|
|
2021-08-12 14:41:47 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "An open source camera stack and framework for Linux, Android, and ChromeOS";
|
|
|
|
homepage = "https://libcamera.org";
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
maintainers = with maintainers; [ citadelcore ];
|
|
|
|
};
|
|
|
|
}
|