Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.11-beta 60 lines 2.0 kB view raw
1{ stdenv, lib, fetchFromGitHub, meson, pkg-config, ninja, wayland-scanner 2, libdrm 3, minimal ? false 4, libX11, libXext, libXfixes, wayland, libffi, libGL 5, mesa 6# for passthru.tests 7, intel-compute-runtime 8, intel-media-driver 9, mpv 10, intel-vaapi-driver 11, vlc 12}: 13 14stdenv.mkDerivation rec { 15 pname = "libva" + lib.optionalString minimal "-minimal"; 16 version = "2.20.0"; 17 18 src = fetchFromGitHub { 19 owner = "intel"; 20 repo = "libva"; 21 rev = version; 22 sha256 = "sha256-ENAsytjqvS8xHZyZLPih3bzBgQ1f/j+s3dWZs1GTWHs="; 23 }; 24 25 outputs = [ "dev" "out" ]; 26 27 depsBuildBuild = [ pkg-config ]; 28 29 nativeBuildInputs = [ meson pkg-config ninja ] 30 ++ lib.optional (!minimal) wayland-scanner; 31 32 buildInputs = [ libdrm ] 33 ++ lib.optionals (!minimal) [ libX11 libXext libXfixes wayland libffi libGL ]; 34 35 mesonFlags = [ 36 # Add FHS and Debian paths for non-NixOS applications 37 "-Ddriverdir=${mesa.drivers.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/i386-linux-gnu/dri" 38 ]; 39 40 passthru.tests = { 41 # other drivers depending on libva and selected application users. 42 # Please get a confirmation from the maintainer before adding more applications. 43 inherit intel-compute-runtime intel-media-driver intel-vaapi-driver mpv vlc; 44 }; 45 46 meta = with lib; { 47 description = "An implementation for VA-API (Video Acceleration API)"; 48 longDescription = '' 49 VA-API is an open-source library and API specification, which provides 50 access to graphics hardware acceleration capabilities for video 51 processing. It consists of a main library (this package) and 52 driver-specific acceleration backends for each supported hardware vendor. 53 ''; 54 homepage = "https://01.org/linuxmedia/vaapi"; 55 changelog = "https://raw.githubusercontent.com/intel/libva/${version}/NEWS"; 56 license = licenses.mit; 57 maintainers = with maintainers; [ SuperSandro2000 ]; 58 platforms = platforms.unix; 59 }; 60}