weylus: Add GST plugins to GST_PLUGIN_PATH

Redos #145051 after #161052.

Co-authored-by: Andy Chun @noneucat <andy@lolc.at>
This commit is contained in:
Zhaofeng Li 2022-05-25 00:20:58 -07:00
parent 58585adbcd
commit 94b8710342

View file

@ -2,6 +2,7 @@
, stdenv , stdenv
, rustPlatform , rustPlatform
, fetchFromGitHub , fetchFromGitHub
, makeWrapper
, dbus , dbus
, ffmpeg , ffmpeg
, x264 , x264
@ -11,6 +12,7 @@
, libdrm , libdrm
, pkg-config , pkg-config
, pango , pango
, pipewire
, cmake , cmake
, autoconf , autoconf
, libtool , libtool
@ -62,6 +64,7 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
nodePackages.typescript nodePackages.typescript
makeWrapper
] ++ lib.optionals stdenv.isLinux [ ] ++ lib.optionals stdenv.isLinux [
pkg-config pkg-config
autoconf autoconf
@ -73,6 +76,15 @@ rustPlatform.buildRustPackage rec {
cargoBuildFlags = [ "--features=ffmpeg-system" ]; cargoBuildFlags = [ "--features=ffmpeg-system" ];
cargoTestFlags = [ "--features=ffmpeg-system" ]; cargoTestFlags = [ "--features=ffmpeg-system" ];
postFixup = let
GST_PLUGIN_PATH = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" [
gst_all_1.gst-plugins-base
pipewire
];
in lib.optionalString stdenv.isLinux ''
wrapProgram $out/bin/weylus --prefix GST_PLUGIN_PATH : ${GST_PLUGIN_PATH}
'';
postInstall = '' postInstall = ''
install -vDm755 weylus.desktop $out/share/applications/weylus.desktop install -vDm755 weylus.desktop $out/share/applications/weylus.desktop
''; '';