2022-02-13 06:37:09 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
2023-03-19 09:34:14 +01:00
|
|
|
, libdrm
|
2022-02-13 06:37:09 +01:00
|
|
|
, libGL
|
|
|
|
, gst_all_1
|
|
|
|
, nv-codec-headers-11
|
|
|
|
, libva
|
|
|
|
, addOpenGLRunpath
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nvidia-vaapi-driver";
|
2023-03-19 09:34:14 +01:00
|
|
|
version = "0.0.9";
|
2022-02-13 06:37:09 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elFarto";
|
|
|
|
repo = pname;
|
2022-12-17 22:10:47 +01:00
|
|
|
rev = "v${version}";
|
2023-03-19 09:34:14 +01:00
|
|
|
sha256 = "sha256-mQtprgm6QonYiMUPPIcCbWxPQ/b2XuQiOkROZNPYaQk=";
|
2022-02-13 06:37:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
addOpenGLRunpath
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-03-19 09:34:14 +01:00
|
|
|
libdrm
|
2022-02-13 06:37:09 +01:00
|
|
|
libGL
|
|
|
|
gst_all_1.gstreamer
|
|
|
|
gst_all_1.gst-plugins-bad
|
|
|
|
nv-codec-headers-11
|
|
|
|
libva
|
|
|
|
];
|
|
|
|
|
2023-03-27 04:54:51 +02:00
|
|
|
# Note: Attempt to remove on next release after 0.0.9
|
|
|
|
# nixpkgs reference: https://github.com/NixOS/nixpkgs/pull/221978#issuecomment-1483892437
|
|
|
|
# upstream: https://github.com/elFarto/nvidia-vaapi-driver/issues/188
|
|
|
|
NIX_CFLAGS_COMPILE = [
|
|
|
|
"-Wno-error=format="
|
|
|
|
"-Wno-error=int-conversion"
|
|
|
|
];
|
|
|
|
|
2022-02-13 06:37:09 +01:00
|
|
|
postFixup = ''
|
|
|
|
addOpenGLRunpath "$out/lib/dri/nvidia_drv_video.so"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib;{
|
|
|
|
homepage = "https://github.com/elFarto/nvidia-vaapi-driver";
|
|
|
|
description = "A VA-API implemention using NVIDIA's NVDEC";
|
2023-03-19 09:34:14 +01:00
|
|
|
changelog = "https://github.com/elFarto/nvidia-vaapi-driver/releases/tag/v${version}";
|
2022-02-13 06:37:09 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers;[ nickcao ];
|
|
|
|
};
|
|
|
|
}
|