diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libva')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libva/1.nix | 52 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libva/default.nix | 60 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libva/utils.nix | 32 |
3 files changed, 144 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libva/1.nix b/nixpkgs/pkgs/development/libraries/libva/1.nix new file mode 100644 index 000000000000..63be647f015a --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libva/1.nix @@ -0,0 +1,52 @@ +{ stdenv +, lib +, fetchFromGitHub +, autoreconfHook +, libX11 +, pkg-config +, libXext +, libdrm +, libXfixes +, wayland +, wayland-scanner +, libffi +, libGL +, mesa +, minimal ? false +, libva1-minimal +}: + +stdenv.mkDerivation rec { + pname = "libva" + lib.optionalString minimal "-minimal"; + # nixpkgs-update: no auto update + version = "1.8.3"; + + src = fetchFromGitHub { + owner = "intel"; + repo = "libva"; + rev = version; + sha256 = "sha256-ur59cqdZqXIY2dDUSie9XsxyRomVBxIW2IVKAgWYC38="; + }; + + outputs = [ "dev" "out" ]; + + nativeBuildInputs = [ autoreconfHook pkg-config wayland-scanner ]; + + buildInputs = [ libdrm ] + ++ lib.optionals (!minimal) [ libva1-minimal libX11 libXext libXfixes wayland libffi libGL ]; + # TODO: share libs between minimal and !minimal - perhaps just symlink them + + # Add FHS paths for non-NixOS applications. + configureFlags = [ "--with-drivers-path=${mesa.drivers.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri" ] + ++ lib.optionals (!minimal) [ "--enable-glx" ]; + + installFlags = [ "dummy_drv_video_ladir=$(out)/lib/dri" ]; + + meta = with lib; { + homepage = "https://www.freedesktop.org/wiki/Software/vaapi/"; + license = licenses.mit; + description = "VAAPI library: Video Acceleration API"; + platforms = platforms.unix; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/libva/default.nix b/nixpkgs/pkgs/development/libraries/libva/default.nix new file mode 100644 index 000000000000..7796ec251582 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libva/default.nix @@ -0,0 +1,60 @@ +{ stdenv, lib, fetchFromGitHub, meson, pkg-config, ninja, wayland-scanner +, libdrm +, minimal ? false +, libX11, libXext, libXfixes, wayland, libffi, libGL +, mesa +# for passthru.tests +, intel-compute-runtime +, intel-media-driver +, mpv +, intel-vaapi-driver +, vlc +}: + +stdenv.mkDerivation rec { + pname = "libva" + lib.optionalString minimal "-minimal"; + version = "2.19.0"; + + src = fetchFromGitHub { + owner = "intel"; + repo = "libva"; + rev = version; + sha256 = "sha256-M6mAHvGl4d9EqdkDBSxSbpZUCUcrkpnf+hfo16L3eHs="; + }; + + outputs = [ "dev" "out" ]; + + depsBuildBuild = [ pkg-config ]; + + nativeBuildInputs = [ meson pkg-config ninja ] + ++ lib.optional (!minimal) wayland-scanner; + + buildInputs = [ libdrm ] + ++ lib.optionals (!minimal) [ libX11 libXext libXfixes wayland libffi libGL ]; + + mesonFlags = [ + # Add FHS and Debian paths for non-NixOS applications + "-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" + ]; + + passthru.tests = { + # other drivers depending on libva and selected application users. + # Please get a confirmation from the maintainer before adding more applications. + inherit intel-compute-runtime intel-media-driver intel-vaapi-driver mpv vlc; + }; + + meta = with lib; { + description = "An implementation for VA-API (Video Acceleration API)"; + longDescription = '' + 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 (this package) and + driver-specific acceleration backends for each supported hardware vendor. + ''; + homepage = "https://01.org/linuxmedia/vaapi"; + changelog = "https://raw.githubusercontent.com/intel/libva/${version}/NEWS"; + license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/libva/utils.nix b/nixpkgs/pkgs/development/libraries/libva/utils.nix new file mode 100644 index 000000000000..eb2a6598cf6f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libva/utils.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config +, libdrm, libva, libX11, libXext, libXfixes, wayland +}: + +stdenv.mkDerivation rec { + pname = "libva-utils"; + version = "2.20.0"; + + src = fetchFromGitHub { + owner = "intel"; + repo = "libva-utils"; + rev = version; + sha256 = "sha256-oW4vIGgSs5lzmuloCFJPXTmsfH9Djz2KTlsjrOkaT5I="; + }; + + nativeBuildInputs = [ meson ninja pkg-config ]; + + buildInputs = [ libdrm libva libX11 libXext libXfixes wayland ]; + + meta = with lib; { + description = "A collection of utilities and examples for VA-API"; + longDescription = '' + libva-utils is a collection of utilities and examples to exercise VA-API + in accordance with the libva project. + ''; + homepage = "https://github.com/intel/libva-utils"; + changelog = "https://raw.githubusercontent.com/intel/libva-utils/${version}/NEWS"; + license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; + platforms = platforms.unix; + }; +} |