Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, lib, fetchFromGitHub, meson, pkg-config, ninja, wayland-scanner 2, libdrm 3, minimal ? false, libva-minimal 4, libX11, libXext, libXfixes, wayland, libffi, libGL 5, mesa 6# for passthru.tests 7, intel-compute-runtime 8, intel-media-driver 9, mpv 10, vaapiIntel 11, vlc 12}: 13 14stdenv.mkDerivation rec { 15 pname = "libva" + lib.optionalString minimal "-minimal"; 16 version = "2.18.0"; 17 18 src = fetchFromGitHub { 19 owner = "intel"; 20 repo = "libva"; 21 rev = version; 22 sha256 = "sha256-VD+CTF0QLfzrUr4uFiyDlZux3MqsyyuJF/cXuhOFzwo="; 23 }; 24 25 outputs = [ "dev" "out" ]; 26 27 depsBuildBuild = [ pkg-config ]; 28 29 nativeBuildInputs = [ meson pkg-config ninja wayland-scanner ]; 30 31 buildInputs = [ libdrm ] 32 ++ lib.optionals (!minimal) [ libva-minimal libX11 libXext libXfixes wayland libffi libGL ]; 33 # TODO: share libs between minimal and !minimal - perhaps just symlink them 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 vaapiIntel 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}