about summary refs log tree commit diff
path: root/pkgs/development/libraries/libva/1.nix
blob: 1a9c7309e542412add0ee85e7daa2f581ce37ed3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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 = lib.optionals stdenv.isLinux [ "--with-drivers-path=${mesa.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 ];
  };
}