about summary refs log tree commit diff
path: root/pkgs/applications/graphics/weylus
diff options
context:
space:
mode:
authorZhaofeng Li <hello@zhaofeng.li>2022-05-25 00:20:58 -0700
committerZhaofeng Li <hello@zhaofeng.li>2022-05-25 00:21:21 -0700
commit94b8710342f7a83739315c6e45be5070a32e6748 (patch)
tree6dd6dfa9d28a952f1eea46633ea1b167b38e344b /pkgs/applications/graphics/weylus
parent58585adbcd7fa9889d3d3731fc9c1766317dec77 (diff)
weylus: Add GST plugins to GST_PLUGIN_PATH
Redos #145051 after #161052.

Co-authored-by: Andy Chun @noneucat <andy@lolc.at>
Diffstat (limited to 'pkgs/applications/graphics/weylus')
-rw-r--r--pkgs/applications/graphics/weylus/default.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/weylus/default.nix b/pkgs/applications/graphics/weylus/default.nix
index 7965f82412539..a6b104aacf696 100644
--- a/pkgs/applications/graphics/weylus/default.nix
+++ b/pkgs/applications/graphics/weylus/default.nix
@@ -2,6 +2,7 @@
 , stdenv
 , rustPlatform
 , fetchFromGitHub
+, makeWrapper
 , dbus
 , ffmpeg
 , x264
@@ -11,6 +12,7 @@
 , libdrm
 , pkg-config
 , pango
+, pipewire
 , cmake
 , autoconf
 , libtool
@@ -62,6 +64,7 @@ rustPlatform.buildRustPackage rec {
   nativeBuildInputs = [
     cmake
     nodePackages.typescript
+    makeWrapper
   ] ++ lib.optionals stdenv.isLinux [
     pkg-config
     autoconf
@@ -73,6 +76,15 @@ rustPlatform.buildRustPackage rec {
   cargoBuildFlags = [ "--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 = ''
     install -vDm755 weylus.desktop $out/share/applications/weylus.desktop
   '';