at 25.11-pre 135 lines 3.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 fetchpatch, 6 cairo, 7 meson, 8 ninja, 9 pkg-config, 10 gstreamer, 11 gst-plugins-base, 12 gst-plugins-bad, 13 gst-rtsp-server, 14 python3, 15 gobject-introspection, 16 rustPlatform, 17 rustc, 18 cargo, 19 json-glib, 20 # Checks meson.is_cross_build(), so even canExecute isn't enough. 21 enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, 22 hotdoc, 23 directoryListingUpdater, 24 _experimental-update-script-combinators, 25 common-updater-scripts, 26 apple-sdk_gstreamer, 27}: 28 29stdenv.mkDerivation (finalAttrs: { 30 pname = "gst-devtools"; 31 version = "1.26.0"; 32 33 outputs = [ 34 "out" 35 "dev" 36 ]; 37 38 src = fetchurl { 39 url = "https://gstreamer.freedesktop.org/src/gst-devtools/gst-devtools-${finalAttrs.version}.tar.xz"; 40 hash = "sha256-7/M9fcKSuwdKJ4jqiHtigzmP/e+vpJ+30I7+ZlimVkg="; 41 }; 42 43 cargoDeps = rustPlatform.fetchCargoVendor { 44 inherit (finalAttrs) src cargoRoot; 45 name = "gst-devtools-${finalAttrs.version}"; 46 hash = "sha256-p26jeKRDSPTgQzf4ckhLPSFa8RKsgkjUEXJG8IlPPZo="; 47 }; 48 49 patches = [ 50 # Fix Requires in gstreamer-validate-1.0.pc 51 # https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8661 52 (fetchpatch { 53 url = "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/13c0f44dd546cd058c39f32101a361b3a7746f73.patch"; 54 stripLen = 2; 55 hash = "sha256-CpBFTmdn+VO6ZeNe6NZR6ELvakZqQdaF3o3G5TSDuUU="; 56 }) 57 ]; 58 59 depsBuildBuild = [ 60 pkg-config 61 ]; 62 63 nativeBuildInputs = 64 [ 65 meson 66 ninja 67 pkg-config 68 gobject-introspection 69 rustPlatform.cargoSetupHook 70 rustc 71 cargo 72 ] 73 ++ lib.optionals enableDocumentation [ 74 hotdoc 75 ]; 76 77 buildInputs = 78 [ 79 cairo 80 python3 81 json-glib 82 ] 83 ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ 84 apple-sdk_gstreamer 85 ]; 86 87 propagatedBuildInputs = [ 88 gstreamer 89 gst-plugins-base 90 gst-plugins-bad 91 gst-rtsp-server 92 ]; 93 94 mesonFlags = [ 95 (lib.mesonEnable "doc" enableDocumentation) 96 ]; 97 98 cargoRoot = "dots-viewer"; 99 100 passthru = { 101 updateScript = 102 let 103 updateSource = directoryListingUpdater { }; 104 105 updateLockfile = { 106 command = [ 107 "sh" 108 "-c" 109 '' 110 PATH=${ 111 lib.makeBinPath [ 112 common-updater-scripts 113 ] 114 } 115 update-source-version gst_all_1.gst-devtools --ignore-same-version --source-key=cargoDeps.vendorStaging > /dev/null 116 '' 117 ]; 118 # Experimental feature: do not copy! 119 supportedFeatures = [ "silent" ]; 120 }; 121 in 122 _experimental-update-script-combinators.sequence [ 123 updateSource 124 updateLockfile 125 ]; 126 }; 127 128 meta = with lib; { 129 description = "Integration testing infrastructure for the GStreamer framework"; 130 homepage = "https://gstreamer.freedesktop.org"; 131 license = licenses.lgpl2Plus; 132 platforms = platforms.unix; 133 maintainers = [ ]; 134 }; 135})