Skip to content

Commit fc2a461

Browse files
authored
vaapiIntel: Refactor and improve the build expression (#92996)
This doesn't cause any changes to the contents of the output path (apart from the $out reference changing due to the modified expression).
1 parent eeab7d4 commit fc2a461

1 file changed

Lines changed: 17 additions & 13 deletions

File tree

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ stdenv, fetchFromGitHub, autoreconfHook, gnum4, pkgconfig, python2
1+
{ stdenv, fetchFromGitHub, autoreconfHook, gnum4, pkg-config, python3
22
, intel-gpu-tools, libdrm, libva, libX11, libGL, wayland, libXext
33
, enableHybridCodec ? false, vaapi-intel-hybrid
44
}:
@@ -14,25 +14,19 @@ stdenv.mkDerivation rec {
1414
sha256 = "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp";
1515
};
1616

17-
patchPhase = ''
18-
patchShebangs ./src/shaders/gpp.py
19-
'';
20-
21-
preConfigure = ''
22-
sed -i -e "s,LIBVA_DRIVERS_PATH=.*,LIBVA_DRIVERS_PATH=$out/lib/dri," configure
23-
'';
17+
# Set the correct install path:
18+
LIBVA_DRIVERS_PATH = "${placeholder "out"}/lib/dri";
2419

2520
postInstall = stdenv.lib.optionalString enableHybridCodec ''
2621
ln -s ${vaapi-intel-hybrid}/lib/dri/* $out/lib/dri/
2722
'';
2823

2924
configureFlags = [
30-
"--enable-drm"
3125
"--enable-x11"
3226
"--enable-wayland"
3327
] ++ stdenv.lib.optional enableHybridCodec "--enable-hybrid-codec";
3428

35-
nativeBuildInputs = [ autoreconfHook gnum4 pkgconfig python2 ];
29+
nativeBuildInputs = [ autoreconfHook gnum4 pkg-config python3 ];
3630

3731
buildInputs = [ intel-gpu-tools libdrm libva libX11 libXext libGL wayland ]
3832
++ stdenv.lib.optional enableHybridCodec vaapi-intel-hybrid;
@@ -42,8 +36,18 @@ stdenv.mkDerivation rec {
4236
meta = with stdenv.lib; {
4337
homepage = "https://01.org/linuxmedia";
4438
license = licenses.mit;
45-
description = "Intel driver for the VAAPI library";
46-
platforms = platforms.unix;
47-
maintainers = with maintainers; [ ];
39+
description = "VA-API user mode driver for Intel GEN Graphics family";
40+
longDescription = ''
41+
This VA-API video driver backend provides a bridge to the GEN GPUs through
42+
the packaging of buffers and commands to be sent to the i915 driver for
43+
exercising both hardware and shader functionality for video decode,
44+
encode, and processing.
45+
VA-API is an open-source library and API specification, which provides
46+
access to graphics hardware acceleration capabilities for video
47+
processing. It consists of a main library and driver-specific acceleration
48+
backends for each supported hardware vendor.
49+
'';
50+
platforms = [ "x86_64-linux" "i686-linux" ];
51+
maintainers = with maintainers; [ primeos ];
4852
};
4953
}

0 commit comments

Comments
 (0)