about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gstreamer/vaapi/default.nix
blob: adb495689e33c1a89212d3fb2e1d611904aed2d1 (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
{ stdenv, fetchurl, meson, ninja, pkgconfig, gst-plugins-base, bzip2, libva, wayland
, libdrm, udev, xorg, libGLU_combined, gstreamer, gst-plugins-bad, nasm
, libvpx, python, fetchpatch
}:

stdenv.mkDerivation rec {
  pname = "gst-vaapi";
  version = "1.16.0";

  src = fetchurl {
    url = "${meta.homepage}/src/gstreamer-vaapi/gstreamer-vaapi-${version}.tar.xz";
    sha256 = "07qpynamiz0lniqajcaijh3n7ixs4lfk9a5mfk50sng0dricwzsf";
  };

  patches = [
    # See: https://mail.gnome.org/archives/distributor-list/2019-September/msg00000.html
    # Note that the patch has now been actually accepted upstream.
    (fetchpatch {
      url = "https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/commit/a90daabb84f983d2fa05ff3159f7ad59aa648b55.patch";
      sha256 = "0p2qygq6b5h6nxjdfnlzbsyih43hjq5c94ag8sbyyb8pmnids9rb";
    })
  ];

  outputs = [ "out" "dev" ];

  nativeBuildInputs = [ meson ninja pkgconfig bzip2 ];

  buildInputs = [
    gstreamer gst-plugins-base gst-plugins-bad libva wayland libdrm udev
    xorg.libX11 xorg.libXext xorg.libXv xorg.libXrandr xorg.libSM
    xorg.libICE libGLU_combined nasm libvpx python
  ];

  preConfigure = ''
    export GST_PLUGIN_PATH_1_0=$out/lib/gstreamer-1.0
    mkdir -p $GST_PLUGIN_PATH_1_0
  '';

  mesonFlags = [
    "-Dexamples=disabled" # requires many dependencies and probably not useful for our users
  ];

  meta = {
    homepage = https://gstreamer.freedesktop.org;
    license = stdenv.lib.licenses.lgpl21Plus;
    platforms = stdenv.lib.platforms.linux;
    maintainers = with stdenv.lib.maintainers; [ tstrobel ];
  };
}