btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / in / intel-vaapi-driver / package.nix
blobec93f3efe58840264e9820d17989e3d567039657
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   autoreconfHook,
6   gnum4,
7   pkg-config,
8   python3,
9   wayland-scanner,
10   intel-gpu-tools,
11   libdrm,
12   libva,
13   libX11,
14   libGL,
15   wayland,
16   libXext,
17   enableHybridCodec ? false,
18   vaapi-intel-hybrid,
19   enableGui ? true,
20   nix-update-script,
23 stdenv.mkDerivation {
24   pname = "intel-vaapi-driver";
25   version = "2.4.1-unstable-2024-10-29";
27   src = fetchFromGitHub {
28     owner = "intel";
29     repo = "intel-vaapi-driver";
30     rev = "fd727a4e9cb8b2878a1e93d4dddc8dd1c1a4e0ea";
31     hash = "sha256-OMFdRjzpUKdxB9eK/1OLYLaOC3NHnzZVxmh6yKrbYoE=";
32   };
34   # Set the correct install path:
35   LIBVA_DRIVERS_PATH = "${placeholder "out"}/lib/dri";
37   postInstall = lib.optionalString enableHybridCodec ''
38     ln -s ${vaapi-intel-hybrid}/lib/dri/* $out/lib/dri/
39   '';
41   configureFlags = [
42     (lib.enableFeature enableGui "x11")
43     (lib.enableFeature enableGui "wayland")
44   ] ++ lib.optional enableHybridCodec "--enable-hybrid-codec";
46   nativeBuildInputs = [
47     autoreconfHook
48     gnum4
49     pkg-config
50     python3
51     wayland-scanner
52   ];
54   buildInputs =
55     [
56       intel-gpu-tools
57       libdrm
58       libva
59     ]
60     ++ lib.optionals enableGui [
61       libX11
62       libXext
63       libGL
64       wayland
65     ]
66     ++ lib.optional enableHybridCodec vaapi-intel-hybrid;
68   enableParallelBuilding = true;
70   passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
72   meta = with lib; {
73     homepage = "https://01.org/linuxmedia";
74     license = licenses.mit;
75     description = "VA-API user mode driver for Intel GEN Graphics family";
76     longDescription = ''
77       This VA-API video driver backend provides a bridge to the GEN GPUs through
78       the packaging of buffers and commands to be sent to the i915 driver for
79       exercising both hardware and shader functionality for video decode,
80       encode, and processing.
81       VA-API is an open-source library and API specification, which provides
82       access to graphics hardware acceleration capabilities for video
83       processing. It consists of a main library and driver-specific acceleration
84       backends for each supported hardware vendor.
85     '';
86     platforms = [
87       "x86_64-linux"
88       "i686-linux"
89     ];
90     maintainers = with maintainers; [ SuperSandro2000 ];
91   };