about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/li/libvpl/package.nix
blob: f28287053beb4c680a3630ff0b28015e7df3785e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{ stdenv
, lib
, fetchFromGitHub
, cmake
, pkg-config
, substituteAll
, addDriverRunpath
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "libvpl";
  version = "2.10.1";

  src = fetchFromGitHub {
    owner = "intel";
    repo = finalAttrs.pname;
    rev = "v${finalAttrs.version}";
    hash = "sha256-2yfJo4iwI/h0CJ+mJJ3cAyG5S7KksUibwJHebF3MR+E=";
  };

  nativeBuildInputs = [
    cmake
    pkg-config
  ];

  cmakeFlags = [
      "-DCMAKE_BUILD_TYPE=Release"
      "-DENABLE_DRI3=ON"
      "-DENABLE_DRM=ON"
      "-DENABLE_VA=ON"
      "-DENABLE_WAYLAND=ON"
      "-DENABLE_X11=ON"
      "-DINSTALL_EXAMPLE_CODE=OFF"
      "-DBUILD_TOOLS=OFF"
  ];

  patches = [
    (substituteAll {
      src = ./opengl-driver-lib.patch;
      inherit (addDriverRunpath) driverLink;
    })
  ];

  meta = with lib; {
    description = "Intel Video Processing Library";
    homepage = "https://intel.github.io/libvpl/";
    license = licenses.mit;
    platforms = platforms.linux;
  };
})