diff --git a/nixos/modules/config/no-x-libs.nix b/nixos/modules/config/no-x-libs.nix index dac09bdf468a9..0dce3b918458a 100644 --- a/nixos/modules/config/no-x-libs.nix +++ b/nixos/modules/config/no-x-libs.nix @@ -38,6 +38,7 @@ with lib; gpsd = super.gpsd.override { guiSupport = false; }; graphviz = super.graphviz-nox; gst_all_1 = super.gst_all_1 // { + gst-plugins-bad = super.gst_all_1.gst-plugins-bad.override { guiSupport = false; }; gst-plugins-base = super.gst_all_1.gst-plugins-base.override { enableX11 = false; }; }; imagemagick = super.imagemagick.override { libX11Support = false; libXtSupport = false; }; diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index 63c5b92e07ca5..7861a49b565b2 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -38,7 +38,6 @@ , bluez , chromaprint , curl -, directfb , fdk_aac , flite , gsm @@ -104,6 +103,7 @@ , microdnsSupport ? false # Checks meson.is_cross_build(), so even canExecute isn't enough. , enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc +, guiSupport ? true, directfb }: stdenv.mkDerivation rec { @@ -185,7 +185,6 @@ stdenv.mkDerivation rec { gnutls libGL libGLU - gtk3 game-music-emu openssl libxml2 @@ -220,7 +219,6 @@ stdenv.mkDerivation rec { mjpegtools chromaprint - directfb flite libdrm libgudev @@ -237,6 +235,10 @@ stdenv.mkDerivation rec { serd sord sratom + ] ++ lib.optionals guiSupport [ + gtk3 + ] ++ lib.optionals (stdenv.isLinux && guiSupport) [ + directfb ] ++ lib.optionals stdenv.isDarwin [ # For unknown reasons the order is important, e.g. if # VideoToolbox is last, we get: @@ -297,10 +299,11 @@ stdenv.mkDerivation rec { "-Ddoc=disabled" # needs gstcuda to be enabled which is Linux-only "-Dnvcodec=disabled" # Linux-only "-Dva=disabled" # see comment on `libva` in `buildInputs` + ] ++ lib.optionals (!stdenv.isLinux || !guiSupport) [ + "-Ddirectfb=disabled" ] ++ lib.optionals stdenv.isDarwin [ "-Dchromaprint=disabled" - "-Ddirectfb=disabled" "-Dflite=disabled" "-Dkms=disabled" # renders to libdrm output "-Dlv2=disabled" diff --git a/pkgs/development/libraries/gstreamer/rs/default.nix b/pkgs/development/libraries/gstreamer/rs/default.nix index b50d7d45180f8..084433c4045ec 100644 --- a/pkgs/development/libraries/gstreamer/rs/default.nix +++ b/pkgs/development/libraries/gstreamer/rs/default.nix @@ -101,7 +101,7 @@ let "reqwest" # tests hang on darwin "threadshare" # tests cannot bind to localhost on darwin "webp" # not supported on darwin (upstream crate issue) - ] ++ lib.optionals (stdenv.isDarwin && !stdenv.isAarch64) [ + ] ++ lib.optionals (!gst-plugins-base.glEnabled) [ # these require gstreamer-gl which requires darwin sdk bump "gtk4" "livesync" @@ -205,7 +205,7 @@ stdenv.mkDerivation rec { export CSOUND_LIB_DIR=${lib.getLib csound}/lib '' + lib.optionalString (lib.mutuallyExclusive [ "webrtc" "webrtchttp" ] selectedPlugins) '' sed -i "/\['gstreamer-webrtc-1\.0', 'gst-plugins-bad', 'gstwebrtc_dep', 'gstwebrtc'\]/d" meson.build - '' + lib.optionalString (stdenv.isDarwin && !stdenv.isAarch64) '' + '' + lib.optionalString (!gst-plugins-base.glEnabled) '' sed -i "/\['gstreamer-gl-1\.0', 'gst-plugins-base', 'gst_gl_dep', 'gstgl'\]/d" meson.build '';