1 { lib, stdenv, fetchurl, pkg-config, xorg, mesa, meson, ninja }:
3 stdenv.mkDerivation rec {
8 url = "https://gitlab.freedesktop.org/vdpau/libvdpau/-/archive/${version}/${pname}-${version}.tar.bz2";
9 sha256 = "sha256-pdUKQrjCiP68BxUatkOsjeBqGERpZcckH4m06BCCGRM=";
11 patches = [ ./installdir.patch ];
13 outputs = [ "out" "dev" ];
15 nativeBuildInputs = [ meson ninja pkg-config ];
16 buildInputs = with xorg; [ xorgproto libXext ];
18 propagatedBuildInputs = [ xorg.libX11 ];
20 mesonFlags = lib.optionals stdenv.isLinux
21 [ "-Dmoduledir=${mesa.drivers.driverLink}/lib/vdpau" ];
23 NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-lX11";
26 homepage = "https://www.freedesktop.org/wiki/Software/VDPAU/";
27 description = "Library to use the Video Decode and Presentation API for Unix (VDPAU)";
28 license = licenses.mit; # expat version
29 platforms = platforms.unix;
30 maintainers = [ maintainers.vcunat ];