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).
This commit is contained in:
parent
eeab7d4a2f
commit
fc2a4610a1
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchFromGitHub, autoreconfHook, gnum4, pkgconfig, python2
|
{ stdenv, fetchFromGitHub, autoreconfHook, gnum4, pkg-config, python3
|
||||||
, intel-gpu-tools, libdrm, libva, libX11, libGL, wayland, libXext
|
, intel-gpu-tools, libdrm, libva, libX11, libGL, wayland, libXext
|
||||||
, enableHybridCodec ? false, vaapi-intel-hybrid
|
, enableHybridCodec ? false, vaapi-intel-hybrid
|
||||||
}:
|
}:
|
||||||
@ -14,25 +14,19 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp";
|
sha256 = "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp";
|
||||||
};
|
};
|
||||||
|
|
||||||
patchPhase = ''
|
# Set the correct install path:
|
||||||
patchShebangs ./src/shaders/gpp.py
|
LIBVA_DRIVERS_PATH = "${placeholder "out"}/lib/dri";
|
||||||
'';
|
|
||||||
|
|
||||||
preConfigure = ''
|
|
||||||
sed -i -e "s,LIBVA_DRIVERS_PATH=.*,LIBVA_DRIVERS_PATH=$out/lib/dri," configure
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = stdenv.lib.optionalString enableHybridCodec ''
|
postInstall = stdenv.lib.optionalString enableHybridCodec ''
|
||||||
ln -s ${vaapi-intel-hybrid}/lib/dri/* $out/lib/dri/
|
ln -s ${vaapi-intel-hybrid}/lib/dri/* $out/lib/dri/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-drm"
|
|
||||||
"--enable-x11"
|
"--enable-x11"
|
||||||
"--enable-wayland"
|
"--enable-wayland"
|
||||||
] ++ stdenv.lib.optional enableHybridCodec "--enable-hybrid-codec";
|
] ++ stdenv.lib.optional enableHybridCodec "--enable-hybrid-codec";
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook gnum4 pkgconfig python2 ];
|
nativeBuildInputs = [ autoreconfHook gnum4 pkg-config python3 ];
|
||||||
|
|
||||||
buildInputs = [ intel-gpu-tools libdrm libva libX11 libXext libGL wayland ]
|
buildInputs = [ intel-gpu-tools libdrm libva libX11 libXext libGL wayland ]
|
||||||
++ stdenv.lib.optional enableHybridCodec vaapi-intel-hybrid;
|
++ stdenv.lib.optional enableHybridCodec vaapi-intel-hybrid;
|
||||||
@ -42,8 +36,18 @@ stdenv.mkDerivation rec {
|
|||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "https://01.org/linuxmedia";
|
homepage = "https://01.org/linuxmedia";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
description = "Intel driver for the VAAPI library";
|
description = "VA-API user mode driver for Intel GEN Graphics family";
|
||||||
platforms = platforms.unix;
|
longDescription = ''
|
||||||
maintainers = with maintainers; [ ];
|
This VA-API video driver backend provides a bridge to the GEN GPUs through
|
||||||
|
the packaging of buffers and commands to be sent to the i915 driver for
|
||||||
|
exercising both hardware and shader functionality for video decode,
|
||||||
|
encode, and processing.
|
||||||
|
VA-API is an open-source library and API specification, which provides
|
||||||
|
access to graphics hardware acceleration capabilities for video
|
||||||
|
processing. It consists of a main library and driver-specific acceleration
|
||||||
|
backends for each supported hardware vendor.
|
||||||
|
'';
|
||||||
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||||
|
maintainers = with maintainers; [ primeos ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user