2023-01-26 22:14:20 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
|
|
|
# build
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
|
|
|
|
# runtime
|
|
|
|
, expat
|
|
|
|
, ipu6-camera-bin
|
|
|
|
, libtool
|
|
|
|
, gst_all_1
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2023-04-02 20:27:48 +02:00
|
|
|
pname = "${ipu6-camera-bin.ipuVersion}-camera-hal";
|
|
|
|
version = "unstable-2023-02-08";
|
2023-01-26 22:14:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "intel";
|
|
|
|
repo = "ipu6-camera-hal";
|
2023-04-02 20:27:48 +02:00
|
|
|
rev = "884b81aae0ea19a974eb8ccdaeef93038136bdd4";
|
|
|
|
hash = "sha256-AePL7IqoOhlxhfPRLpCman5DNh3wYS4MUcLgmgBUcCM=";
|
2023-01-26 22:14:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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 = [
|
2023-07-19 18:31:05 +02:00
|
|
|
"-Wno-error"
|
2023-01-26 22:14:20 +01:00
|
|
|
"-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
|
|
|
|
];
|
|
|
|
|
2023-04-02 20:27:48 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/platformdata/PlatformData.h \
|
|
|
|
--replace '/usr/share/' "${placeholder "out"}/share/"
|
2023-01-26 22:14:20 +01:00
|
|
|
'';
|
|
|
|
|
2023-04-02 20:27:48 +02:00
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace $out/lib/pkgconfig/libcamhal.pc \
|
|
|
|
--replace 'prefix=/usr' "prefix=$out"
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit (ipu6-camera-bin) ipuVersion;
|
|
|
|
};
|
|
|
|
|
2023-01-26 22:14:20 +01:00
|
|
|
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" ];
|
|
|
|
};
|
|
|
|
}
|