Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 108 lines 2.0 kB view raw
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 [ 47 meson 48 ninja 49 pkg-config 50 python3 51 bzip2 52 wayland-scanner 53 ] 54 ++ lib.optionals enableDocumentation [ 55 hotdoc 56 ]; 57 58 buildInputs = 59 [ 60 gstreamer 61 gst-plugins-base 62 gst-plugins-bad 63 libva 64 wayland 65 wayland-protocols 66 libdrm 67 udev 68 xorg.libX11 69 xorg.libXext 70 xorg.libXv 71 xorg.libXrandr 72 xorg.libSM 73 xorg.libICE 74 nasm 75 libvpx 76 ] 77 ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ 78 libGL 79 libGLU 80 ] 81 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 82 apple-sdk_gstreamer 83 ]; 84 85 strictDeps = true; 86 87 mesonFlags = [ 88 "-Dexamples=disabled" # requires many dependencies and probably not useful for our users 89 (lib.mesonEnable "doc" enableDocumentation) 90 ]; 91 92 postPatch = '' 93 patchShebangs \ 94 scripts/extract-release-date-from-doap-file.py 95 ''; 96 97 passthru = { 98 updateScript = directoryListingUpdater { }; 99 }; 100 101 meta = with lib; { 102 description = "Set of VAAPI GStreamer Plug-ins"; 103 homepage = "https://gstreamer.freedesktop.org"; 104 license = licenses.lgpl21Plus; 105 platforms = platforms.linux; 106 maintainers = [ ]; 107 }; 108})