blob: 7fce11d21a43d81d8e3129c09b667dbbce43002a (
plain) (
blame)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
{ lib
, stdenv
, fetchFromGitHub
# build
, cmake
, pkg-config
# runtime
, expat
, ipu6-camera-bin
, libtool
, gst_all_1
}:
stdenv.mkDerivation {
pname = "${ipu6-camera-bin.ipuVersion}-camera-hal";
version = "unstable-2023-02-08";
src = fetchFromGitHub {
owner = "intel";
repo = "ipu6-camera-hal";
rev = "884b81aae0ea19a974eb8ccdaeef93038136bdd4";
hash = "sha256-AePL7IqoOhlxhfPRLpCman5DNh3wYS4MUcLgmgBUcCM=";
};
nativeBuildInputs = [
cmake
pkg-config
];
cmakeFlags = [
"-DIPU_VER=${ipu6-camera-bin.ipuVersion}"
# missing libiacss
"-DUSE_PG_LITE_PIPE=ON"
# missing libipu4
"-DENABLE_VIRTUAL_IPU_PIPE=OFF"
];
NIX_CFLAGS_COMPILE = [
"-Wno-error"
"-I${lib.getDev ipu6-camera-bin}/include/ia_imaging"
"-I${lib.getDev ipu6-camera-bin}/include/ia_camera"
];
enableParallelBuilding = true;
buildInputs = [
expat
ipu6-camera-bin
libtool
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
];
postPatch = ''
substituteInPlace src/platformdata/PlatformData.h \
--replace '/usr/share/' "${placeholder "out"}/share/"
'';
postFixup = ''
substituteInPlace $out/lib/pkgconfig/libcamhal.pc \
--replace 'prefix=/usr' "prefix=$out"
'';
passthru = {
inherit (ipu6-camera-bin) ipuVersion;
};
meta = with lib; {
description = "HAL for processing of images in userspace";
homepage = "https://github.com/intel/ipu6-camera-hal";
license = licenses.asl20;
maintainers = with maintainers; [ hexa ];
platforms = [ "x86_64-linux" ];
};
}
|