diff --git a/linux/nix/default.nix b/linux/nix/default.nix index da726d2..f9c94c6 100644 --- a/linux/nix/default.nix +++ b/linux/nix/default.nix @@ -30,7 +30,14 @@ appName = "Nexus"; developer = "QuadRadical"; appId = "nexus.federated.nexus"; - package = default; + # The runtime's GStreamer gets loaded instead of ours, and it can't + # load our plugins, so keep wrapGAppsHook from pointing it at them + package = default.overrideAttrs (old: { + postInstall = '' + unset GST_PLUGIN_SYSTEM_PATH_1_0 + '' + + old.postInstall; + }); runtime = "org.gnome.Platform/51"; permissions = { share = [ "network" ]; diff --git a/linux/nix/pkg/default.nix b/linux/nix/pkg/default.nix index e80f62a..d69710b 100644 --- a/linux/nix/pkg/default.nix +++ b/linux/nix/pkg/default.nix @@ -40,9 +40,12 @@ flutter.buildFlutterApplication { nativeBuildInputs = [ (callPackage ./hook_pkg_config.nix { }) ]; buildInputs = [ - # audioplayers plays audio through GStreamer + # audioplayers plays audio through GStreamer, and wrapGAppsHook adds + # these plugins to the wrapper's GST_PLUGIN_SYSTEM_PATH_1_0 gst_all_1.gstreamer gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gst-libav # nativeapi includes XInput2.h, which needs these, but xi.pc only lists them privately libxext libxfixes @@ -75,24 +78,12 @@ flutter.buildFlutterApplication { install -Dm755 linux/*.desktop -t $out/share/applications install -Dm644 linux/*.metainfo.xml -t $out/share/metainfo install -Dm644 linux/*.service -t $out/share/dbus-1/services - # better_player loads libmpv at runtime to play videos, and audioplayers - # needs GStreamer's plugins to decode audio + # better_player loads libmpv at runtime to play videos # gomuks uses ffmpeg and ffprobe for video thumbnails and metadata wrapProgram $out/bin/nexus \ --suffix LD_LIBRARY_PATH : $out/app/nexus/lib \ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ mpv-unwrapped ]} \ - --prefix PATH : ${lib.makeBinPath [ ffmpeg-headless ]} \ - --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${ - lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" ( - with gst_all_1; - [ - gstreamer - gst-plugins-base - gst-plugins-good - gst-libav - ] - ) - } + --prefix PATH : ${lib.makeBinPath [ ffmpeg-headless ]} ''; meta = {