Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 fetchurl, 5 meson, 6 ninja, 7 pkg-config, 8 python3, 9 gstreamer, 10 gst-plugins-base, 11 gettext, 12 ffmpeg-headless, 13 # Checks meson.is_cross_build(), so even canExecute isn't enough. 14 enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, 15 hotdoc, 16 directoryListingUpdater, 17 apple-sdk_gstreamer, 18}: 19 20stdenv.mkDerivation (finalAttrs: { 21 pname = "gst-libav"; 22 version = "1.26.0"; 23 24 outputs = [ 25 "out" 26 "dev" 27 ]; 28 29 src = fetchurl { 30 url = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${finalAttrs.version}.tar.xz"; 31 hash = "sha256-cHqLaH/1/dzuWwJBXi7JtxtKxE0Leuw7R3Nkzuy/Hs8="; 32 }; 33 34 nativeBuildInputs = [ 35 meson 36 ninja 37 gettext 38 pkg-config 39 python3 40 ] 41 ++ lib.optionals enableDocumentation [ 42 hotdoc 43 ]; 44 45 buildInputs = [ 46 gstreamer 47 gst-plugins-base 48 ffmpeg-headless 49 ] 50 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 51 apple-sdk_gstreamer 52 ]; 53 54 mesonFlags = [ 55 (lib.mesonEnable "doc" enableDocumentation) 56 ]; 57 58 postPatch = '' 59 patchShebangs \ 60 scripts/extract-release-date-from-doap-file.py 61 ''; 62 63 passthru = { 64 updateScript = directoryListingUpdater { }; 65 }; 66 67 meta = with lib; { 68 description = "FFmpeg plugin for GStreamer"; 69 homepage = "https://gstreamer.freedesktop.org"; 70 license = licenses.lgpl2Plus; 71 platforms = platforms.unix; 72 maintainers = [ ]; 73 }; 74})