Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 meson, 6 ninja, 7 pkg-config, 8 gst-plugins-base, 9 bzip2, 10 libva, 11 wayland, 12 wayland-protocols, 13 wayland-scanner, 14 libdrm, 15 udev, 16 xorg, 17 libGLU, 18 libGL, 19 gstreamer, 20 gst-plugins-bad, 21 nasm, 22 libvpx, 23 python3, 24 # Checks meson.is_cross_build(), so even canExecute isn't enough. 25 enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, 26 hotdoc, 27 directoryListingUpdater, 28 apple-sdk_gstreamer, 29}: 30 31stdenv.mkDerivation (finalAttrs: { 32 pname = "gstreamer-vaapi"; 33 version = "1.26.0"; 34 35 outputs = [ 36 "out" 37 "dev" 38 ]; 39 40 src = fetchurl { 41 url = "https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-${finalAttrs.version}.tar.xz"; 42 hash = "sha256-Vzkx1FX1qW9j23yNNdUTIrjSh4FujGp32Ez7ufoTUfE="; 43 }; 44 45 nativeBuildInputs = [ 46 meson 47 ninja 48 pkg-config 49 python3 50 bzip2 51 wayland-scanner 52 ] 53 ++ lib.optionals enableDocumentation [ 54 hotdoc 55 ]; 56 57 buildInputs = [ 58 gstreamer 59 gst-plugins-base 60 gst-plugins-bad 61 libva 62 wayland 63 wayland-protocols 64 libdrm 65 udev 66 xorg.libX11 67 xorg.libXext 68 xorg.libXv 69 xorg.libXrandr 70 xorg.libSM 71 xorg.libICE 72 nasm 73 libvpx 74 ] 75 ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ 76 libGL 77 libGLU 78 ] 79 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 80 apple-sdk_gstreamer 81 ]; 82 83 strictDeps = true; 84 85 mesonFlags = [ 86 "-Dexamples=disabled" # requires many dependencies and probably not useful for our users 87 (lib.mesonEnable "doc" enableDocumentation) 88 ]; 89 90 postPatch = '' 91 patchShebangs \ 92 scripts/extract-release-date-from-doap-file.py 93 ''; 94 95 passthru = { 96 updateScript = directoryListingUpdater { }; 97 }; 98 99 meta = with lib; { 100 description = "Set of VAAPI GStreamer Plug-ins"; 101 homepage = "https://gstreamer.freedesktop.org"; 102 license = licenses.lgpl21Plus; 103 platforms = platforms.linux; 104 maintainers = [ ]; 105 }; 106})