diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2023-01-26 21:14:20 +0000 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2023-02-14 18:33:29 +0100 |
commit | 4269391e56b015472b8f238c1ae52442e168348f (patch) | |
tree | 9e2508873a3716ef8b7c2f58a4d6c628ed4e78b5 | |
parent | 134e4a6473a032513c2bea03035342aacaf3f53d (diff) |
ipu6-camera-hal: init at 2023-01-09
Also exposes ipu6ep-camera-hal, an overriden version for the Alder Lake platform.
-rw-r--r-- | pkgs/development/libraries/ipu6-camera-hal/default.nix | 72 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 6 |
2 files changed, 78 insertions, 0 deletions
diff --git a/pkgs/development/libraries/ipu6-camera-hal/default.nix b/pkgs/development/libraries/ipu6-camera-hal/default.nix new file mode 100644 index 0000000000000..d8ac28f4ce6b6 --- /dev/null +++ b/pkgs/development/libraries/ipu6-camera-hal/default.nix @@ -0,0 +1,72 @@ +{ lib +, stdenv +, fetchFromGitHub + +# build +, cmake +, pkg-config + +# runtime +, expat +, ipu6-camera-bin +, libtool +, gst_all_1 +}: + +stdenv.mkDerivation { + pname = "ipu6-camera-hal"; + version = "unstable-2023-01-09"; + + src = fetchFromGitHub { + owner = "intel"; + repo = "ipu6-camera-hal"; + rev = "37292891c73367d22ba1fc96ea9b6e4546903037"; + hash = "sha256-dJvTZt85rt5/v2JXOsfbSY933qffyXW74L0nWdIlqug="; + }; + + 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 = [ + "-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 + ]; + + 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 + ''; + + 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" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3c184b74ddeaa..ed19a4cba4efb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25867,10 +25867,16 @@ with pkgs; ipu6-camera-bin = callPackage ../os-specific/linux/firmware/ipu6-camera-bins {}; + ipu6-camera-hal = callPackage ../development/libraries/ipu6-camera-hal {}; + ipu6ep-camera-bin = callPackage ../os-specific/linux/firmware/ipu6-camera-bins { ipuVersion = "ipu6ep"; }; + ipu6ep-camera-hal = callPackage ../development/libraries/ipu6-camera-hal { + ipu6-camera-bin = ipu6ep-camera-bin; + }; + iputils = hiPrio (callPackage ../os-specific/linux/iputils { }); # hiPrio for collisions with inetutils (ping) |