Unverified Commit 2afe930c authored by Florian Klink's avatar Florian Klink Committed by GitHub
Browse files

ipu6: update packages (#347918)

parents e495f070 f53387e1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -26,9 +26,9 @@ in

  config = mkIf cfg.enable {

    # Module is upstream as of 6.10
    boot.extraModulePackages = with config.boot.kernelPackages;
      optional (kernelOlder "6.10") ipu6-drivers;
    # Module is upstream as of 6.10,
    # but still needs various out-of-tree i2c and the `intel-ipu6-psys` kernel driver
    boot.extraModulePackages = with config.boot.kernelPackages; [ ipu6-drivers ];

    hardware.firmware = with pkgs; [
      ipu6-camera-bins
+7 −4
Original line number Diff line number Diff line
@@ -6,17 +6,18 @@
, gst_all_1
, ipu6-camera-hal
, libdrm
, libva
}:

stdenv.mkDerivation {
stdenv.mkDerivation rec {
  pname = "icamerasrc-${ipu6-camera-hal.ipuVersion}";
  version = "unstable-2023-10-23";
  version = "unstable-2024-09-29";

  src = fetchFromGitHub {
    owner = "intel";
    repo = "icamerasrc";
    rev = "528a6f177732def4d5ebc17927220d8823bc8fdc";
    hash = "sha256-Ezcm5OpF/NKvJf5sFeJyvNc2Uq0166GukC9MuNUV2Fs=";
    rev = "refs/tags/20240926_1446";
    hash = "sha256-BpIZxkPmSVKqPntwBJjGmCaMSYFCEZHJa4soaMAJRWE=";
  };

  nativeBuildInputs = [
@@ -34,8 +35,10 @@ stdenv.mkDerivation {
  buildInputs = [
    gst_all_1.gstreamer
    gst_all_1.gst-plugins-base
    gst_all_1.gst-plugins-bad
    ipu6-camera-hal
    libdrm
    libva
  ];

  NIX_CFLAGS_COMPILE = [
+19 −7
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
, ipu6-camera-bins
, libtool
, gst_all_1
, libdrm

# Pick one of
# - ipu6 (Tiger Lake)
@@ -27,13 +28,13 @@ let
in
stdenv.mkDerivation {
  pname = "${ipuVersion}-camera-hal";
  version = "unstable-2023-09-25";
  version = "unstable-2024-09-29";

  src = fetchFromGitHub {
    owner = "intel";
    repo = "ipu6-camera-hal";
    rev = "9fa05a90886d399ad3dda4c2ddc990642b3d20c9";
    hash = "sha256-yS1D7o6dsQ4FQkjfwcisOxcP7Majb+4uQ/iW5anMb5c=";
    rev = "f98f72b156563fe8373e4f8d017a9f609676bb33";
    hash = "sha256-zVcgKW7/GHYd1oMvsaI77cPyj3G68dL+OXBJDz5+Td4=";
  };

  nativeBuildInputs = [
@@ -41,12 +42,16 @@ stdenv.mkDerivation {
    pkg-config
  ];

  PKG_CONFIG_PATH = "${lib.makeLibraryPath [ ipu6-camera-bins ]}/${ipuTarget}/pkgconfig";

  cmakeFlags = [
    "-DIPU_VER=${ipuVersion}"
    "-DTARGET_SUFFIX=-${ipuVersion}"
    # missing libiacss
    "-DUSE_PG_LITE_PIPE=ON"
    "-DCMAKE_BUILD_TYPE=Release"
    "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
    "-DCMAKE_INSTALL_SUB_PATH=${ipuTarget}"
    "-DCMAKE_INSTALL_LIBDIR=lib"
  ];

  NIX_CFLAGS_COMPILE = [
@@ -61,21 +66,28 @@ stdenv.mkDerivation {
    libtool
    gst_all_1.gstreamer
    gst_all_1.gst-plugins-base
    libdrm
  ];

  postPatch = ''
    substituteInPlace src/platformdata/PlatformData.h \
      --replace '/usr/share/' "${placeholder "out"}/share/"
      --replace '/usr/share/' "${placeholder "out"}/share/" \
      --replace '#define CAMERA_DEFAULT_CFG_PATH "/etc/camera/"' '#define CAMERA_DEFAULT_CFG_PATH "${placeholder "out"}/etc/camera/"'
  '';

  postInstall = ''
    mkdir -p $out/include/${ipuTarget}/
    cp -r $src/include $out/include/${ipuTarget}/libcamhal
  '';

  postFixup = ''
    for lib in $out/lib/*.so; do
      patchelf --add-rpath "${lib.makeLibraryPath [ ipu6-camera-bins ]}/${ipuTarget}" $lib
      patchelf --add-rpath "${ipu6-camera-bins}/lib" $lib
    done
  '';

  passthru = {
    inherit ipuVersion;
    inherit ipuVersion ipuTarget;
  };

  meta = with lib; {
+8 −7
Original line number Diff line number Diff line
@@ -6,15 +6,15 @@
, zlib
}:

stdenv.mkDerivation (finalAttrs: {
stdenv.mkDerivation (finalAttrs: rec {
  pname = "ipu6-camera-bins";
  version = "unstable-2023-10-26";
  version = "unstable-2024-09-27";

  src = fetchFromGitHub {
    owner = "intel";
    repo = "ipu6-camera-bins";
    rev = "af5ba0cb4a763569ac7514635013e9d870040bcf";
    hash = "sha256-y0pT5M7AKACbquQWLZPYpTPXRC5hipLNL61nhs+cst4=";
    owner = "intel";
    rev = "98ca6f2a54d20f171628055938619972514f7a07";
    hash = "sha256-DAjAzHMqX41mrfQVpDUJLw4Zjb9pz6Uy3TJjTGIkd6o=";
  };

  nativeBuildInputs = [
@@ -33,13 +33,14 @@ stdenv.mkDerivation (finalAttrs: {
      include \
      $out/

    install -m 0644 -D LICENSE $out/share/doc/LICENSE
    # There is no LICENSE file in the src
    # install -m 0644 -D LICENSE $out/share/doc/LICENSE

    runHook postInstall
  '';

  postFixup = ''
    for pcfile in $out/lib/*/pkgconfig/*.pc; do
    for pcfile in $out/lib/pkgconfig/*.pc; do
      substituteInPlace $pcfile \
        --replace 'prefix=/usr' "prefix=$out"
    done
+3 −3
Original line number Diff line number Diff line
@@ -5,13 +5,13 @@

stdenv.mkDerivation {
  pname = "ivsc-firmware";
  version = "unstable-2023-08-11";
  version = "unstable-2024-06-14";

  src = fetchFromGitHub {
    owner = "intel";
    repo = "ivsc-firmware";
    rev = "10c214fea5560060d387fbd2fb8a1af329cb6232";
    hash = "sha256-kEoA0yeGXuuB+jlMIhNm+SBljH+Ru7zt3PzGb+EPBPw=";
    rev = "74a01d1208a352ed85d76f959c68200af4ead918";
    hash = "sha256-kHYfeftMtoOsOtVN6+XoDMDHP7uTEztbvjQLpCnKCh0=";
  };

  dontBuild = true;
Loading