nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 pkg-config,
7 gst_all_1,
8 ipu6-camera-hal,
9 libdrm,
10 libva,
11 apple-sdk_gstreamer,
12}:
13
14stdenv.mkDerivation {
15 pname = "icamerasrc-${ipu6-camera-hal.ipuVersion}";
16 version = "unstable-2025-12-26";
17
18 src = fetchFromGitHub {
19 owner = "intel";
20 repo = "icamerasrc";
21 tag = "20251226_1140_191_PTL_PV_IoT";
22 hash = "sha256-BYURJfNz4D8bXbSeuWyUYnoifozFOq6rSfG9GBKVoHo=";
23 };
24
25 nativeBuildInputs = [
26 autoreconfHook
27 pkg-config
28 ];
29
30 preConfigure = ''
31 # https://github.com/intel/ipu6-camera-hal/issues/1
32 export CHROME_SLIM_CAMHAL=ON
33 # https://github.com/intel/icamerasrc/issues/22
34 export STRIP_VIRTUAL_CHANNEL_CAMHAL=ON
35 '';
36
37 buildInputs = [
38 gst_all_1.gstreamer
39 gst_all_1.gst-plugins-base
40 gst_all_1.gst-plugins-bad
41 ipu6-camera-hal
42 libdrm
43 libva
44 ]
45 ++ lib.optionals stdenv.hostPlatform.isDarwin [
46 apple-sdk_gstreamer
47 ];
48
49 NIX_CFLAGS_COMPILE = [
50 "-Wno-error"
51 # gstcameradeinterlace.cpp:55:10: fatal error: gst/video/video.h: No such file or directory
52 "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0"
53 ];
54
55 enableParallelBuilding = true;
56
57 passthru = {
58 inherit (ipu6-camera-hal) ipuVersion;
59 };
60
61 meta = {
62 description = "GStreamer Plugin for MIPI camera support through the IPU6/IPU6EP/IPU6SE on Intel Tigerlake/Alderlake/Jasperlake platforms";
63 homepage = "https://github.com/intel/icamerasrc/tree/icamerasrc_slim_api";
64 license = lib.licenses.lgpl21Plus;
65 maintainers = [ ];
66 platforms = [ "x86_64-linux" ];
67 };
68}