forked from nix-community/raspberry-pi-nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibcamera.nix
57 lines (55 loc) · 1.44 KB
/
libcamera.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ rpicam-apps-src
, libcamera-src
, libpisp-src
, ...
}:
final: prev: {
# A recent known working version of rpicam-apps
libcamera-apps =
final.callPackage ./rpicam-apps.nix { inherit rpicam-apps-src; };
libpisp = final.stdenv.mkDerivation {
name = "libpisp";
version = "1.0.7";
src = libpisp-src;
nativeBuildInputs = with final; [ pkg-config meson ninja ];
buildInputs = with final; [ nlohmann_json boost ];
# Meson is no longer able to pick up Boost automatically.
# https://github.com/NixOS/nixpkgs/issues/86131
BOOST_INCLUDEDIR = "${prev.lib.getDev final.boost}/include";
BOOST_LIBRARYDIR = "${prev.lib.getLib final.boost}/lib";
};
libcamera = prev.libcamera.overrideAttrs (old: {
version = "0.3.1";
src = libcamera-src;
buildInputs = old.buildInputs ++ (with final; [
libpisp
openssl
libtiff
(python3.withPackages (ps: with ps; [
python3-gnutls
pybind11
pyyaml
ply
]))
libglibutil
gst_all_1.gst-plugins-base
]);
patches = [ ];
postPatch = ''
patchShebangs src/py/ utils/
'';
mesonFlags = [
"--buildtype=release"
"-Dpipelines=rpi/vc4,rpi/pisp"
"-Dipas=rpi/vc4,rpi/pisp"
"-Dv4l2=true"
"-Dgstreamer=enabled"
"-Dtest=false"
"-Dlc-compliance=disabled"
"-Dcam=disabled"
"-Dqcam=disabled"
"-Ddocumentation=enabled"
"-Dpycamera=enabled"
];
});
}