Unverified Commit 752fabf7 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

Merge pull request #225160 from betaboon/ipu6-continuation

Ipu6 continuation
parents 90d0f41c 0bf0d21e
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
{ callPackage, AudioToolbox, AVFoundation, Cocoa, CoreFoundation, CoreMedia, CoreServices, CoreVideo, DiskArbitration, Foundation, IOKit, MediaToolbox, OpenGL, VideoToolbox }:
{ callPackage
, AVFoundation
, AudioToolbox
, Cocoa
, CoreFoundation
, CoreMedia
, CoreServices
, CoreVideo
, DiskArbitration
, Foundation
, IOKit
, MediaToolbox
, OpenGL
, VideoToolbox
, ipu6ep-camera-hal
}:

{
  gstreamer = callPackage ./core { inherit CoreServices; };
@@ -25,7 +40,10 @@

  gst-vaapi = callPackage ./vaapi { };

  icamerasrc = callPackage ./icamerasrc { };
  icamerasrc-ipu6 = callPackage ./icamerasrc { };
  icamerasrc-ipu6ep = callPackage ./icamerasrc {
    ipu6-camera-hal = ipu6ep-camera-hal;
  };

  # note: gst-python is in ./python/default.nix - called under pythonPackages
}
+8 −4
Original line number Diff line number Diff line
@@ -9,14 +9,14 @@
}:

stdenv.mkDerivation rec {
  pname = "icamerasrc";
  version = "20221209";
  pname = "icamerasrc-${ipu6-camera-hal.ipuVersion}";
  version = "unstable-2023-03-09";

  src = fetchFromGitHub {
    owner = "intel";
    repo = "icamerasrc";
    rev = "refs/tags/rpl_plat_${version}_pv";
    hash = "sha256-qlV363l4tUjUAa1LiZQq55byKpz1tLESKAXEmgiYHVo=";
    rev = "17841ab6249aaa69bd9b3959262bf182dee74111";
    hash = "sha256-j8ZYe4nyy5yfo10CGeXDwbAaAPvdr0ptMWB8hQDyESQ=";
  };

  nativeBuildInputs = [
@@ -45,6 +45,10 @@ stdenv.mkDerivation rec {

  enableParallelBuilding = true;

  passthru = {
    inherit (ipu6-camera-hal) ipuVersion;
  };

  meta = with lib; {
    description = "GStreamer Plugin for MIPI camera support through the IPU6/IPU6EP/IPU6SE on Intel Tigerlake/Alderlake/Jasperlake platforms";
    homepage = "https://github.com/intel/icamerasrc/tree/icamerasrc_slim_api";
+16 −12
Original line number Diff line number Diff line
@@ -14,14 +14,14 @@
}:

stdenv.mkDerivation {
  pname = "ipu6-camera-hal";
  version = "unstable-2023-01-09";
  pname = "${ipu6-camera-bin.ipuVersion}-camera-hal";
  version = "unstable-2023-02-08";

  src = fetchFromGitHub {
    owner = "intel";
    repo = "ipu6-camera-hal";
    rev = "37292891c73367d22ba1fc96ea9b6e4546903037";
    hash = "sha256-dJvTZt85rt5/v2JXOsfbSY933qffyXW74L0nWdIlqug=";
    rev = "884b81aae0ea19a974eb8ccdaeef93038136bdd4";
    hash = "sha256-AePL7IqoOhlxhfPRLpCman5DNh3wYS4MUcLgmgBUcCM=";
  };

  nativeBuildInputs = [
@@ -52,16 +52,20 @@ stdenv.mkDerivation {
    gst_all_1.gst-plugins-base
  ];

  preFixup = ''
    ls -lah $out/lib/pkgconfig/
    sed -Ei \
      -e "s,^prefix=.*,prefix=$out," \
      -e "s,^exec_prefix=.*,exec_prefix=''${prefix}," \
      -e "s,^libdir=.*,libdir=''${prefix}/lib," \
      -e "s,^includedir=.*,includedir=''${prefix}/include/libcamhal," \
      $out/lib/pkgconfig/libcamhal.pc
  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";
+13 −3
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, autoPatchelfHook
, expat
, zlib

# Pick one of
# - ipu6 (Tiger Lake)
@@ -10,17 +13,24 @@

stdenv.mkDerivation {
  pname = "${ipuVersion}-camera-bin";
  version = "unstable-2022-11-12";
  version = "unstable-2023-02-08";

  src = fetchFromGitHub {
    owner = "intel";
    repo = "ipu6-camera-bins";
    rev = "4694ba7ee51652d29ef41e7fde846b83a2a1c53b";
    hash = "sha256-XPT3dbV6Kl1/TEeiQESF4Q4s95hjtiv4VLlqlahQXqE=";
    rev = "276859fc6de83918a32727d676985ec40f31af2b";
    hash = "sha256-QnedM2UBbGyd2wIF762Mi+VkDZYtC6MifK4XGGxlUzw=";
  };

  sourceRoot = "source/${ipuVersion}";

  nativeBuildInputs = [
    autoPatchelfHook
    stdenv.cc.cc.lib
    expat
    zlib
  ];

  installPhase = ''
    runHook preInstall

+9 −4
Original line number Diff line number Diff line
@@ -7,15 +7,20 @@

stdenv.mkDerivation rec {
  pname = "ipu6-drivers";
  version = "unstable-2023-01-17";
  version = "unstable-2023-02-20";

  src = fetchFromGitHub {
    owner = "intel";
    repo = pname;
    rev = "f83b0747b297cc42325668aaf69471d89253b88e";
    hash = "sha256-yl2ZtJUTh1/qmTA8USd+FBCUAY5qNdh4bSvFRPImQNI=";
    rev = "dfedab03f3856010d37968cb384696038c73c984";
    hash = "sha256-TKo04+fqY64SdDuWApuzRXBnaAW2DReubwFRsdfJMWM=";
  };

  patches = [
    # https://github.com/intel/ipu6-drivers/pull/84
    ./pr-84-unpatched-upstream-compatiblity.patch
  ];

  postPatch = ''
    cp --no-preserve=mode --recursive --verbose \
      ${ivsc-driver.src}/backport-include \
@@ -47,6 +52,6 @@ stdenv.mkDerivation rec {
    license = lib.licenses.gpl2;
    maintainers = with lib.maintainers; [ hexa ];
    platforms = [ "x86_64-linux" ];
    broken = kernel.kernelOlder "5.15";
    broken = kernel.kernelOlder "6.1.7";
  };
}
Loading