Unverified Commit 28adcaa9 authored by Alyssa Ross's avatar Alyssa Ross
Browse files

gst_all_1.gstreamer: disable Rust if unavailable

parent 0852f8eb
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -15,8 +15,11 @@
, lib
, Cocoa
, CoreServices
, rustc
, testers
, rustc
, withRust ?
    lib.any (lib.meta.platformMatch stdenv.hostPlatform) rustc.targetPlatforms &&
    lib.all (p: !lib.meta.platformMatch stdenv.hostPlatform p) rustc.badTargetPlatforms
, gobject-introspection
, buildPackages
, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
@@ -62,11 +65,12 @@ stdenv.mkDerivation (finalAttrs: {
    makeWrapper
    glib
    bash-completion
    rustc
  ] ++ lib.optionals stdenv.isLinux [
    libcap # for setcap binary
  ] ++ lib.optionals withIntrospection [
    gobject-introspection
  ] ++ lib.optionals withRust [
    rustc
  ] ++ lib.optionals enableDocumentation [
    hotdoc
  ];
@@ -91,6 +95,7 @@ stdenv.mkDerivation (finalAttrs: {
  mesonFlags = [
    "-Ddbghelp=disabled" # not needed as we already provide libunwind and libdw, and dbghelp is a fallback to those
    "-Dexamples=disabled" # requires many dependencies and probably not useful for our users
    (lib.mesonEnable "ptp-helper" withRust)
    (lib.mesonEnable "introspection" withIntrospection)
    (lib.mesonEnable "doc" enableDocumentation)
    (lib.mesonEnable "libunwind" withLibunwind)