summary refs log tree commit diff
path: root/pkgs/applications/video/avidemux/wrapper.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/video/avidemux/wrapper.nix')
-rw-r--r--pkgs/applications/video/avidemux/wrapper.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/applications/video/avidemux/wrapper.nix b/pkgs/applications/video/avidemux/wrapper.nix
new file mode 100644
index 000000000000..ad41f56d39d2
--- /dev/null
+++ b/pkgs/applications/video/avidemux/wrapper.nix
@@ -0,0 +1,29 @@
+{ buildEnv, avidemux, makeWrapper
+# GTK version is broken upstream, see https://bugzilla.redhat.com/show_bug.cgi?id=1244340
+, withUi ? "qt4"
+}:
+
+let
+  ui = builtins.getAttr withUi avidemux;
+
+in buildEnv {
+  name = "avidemux-${withUi}-" + avidemux.version;
+
+  paths = [ avidemux ui ];
+
+  buildInputs = [ makeWrapper ];
+
+  postBuild = ''
+    # TODO: This could be avoided if buildEnv could be forced to create all directories
+    if [ -L $out/bin ]; then
+      rm $out/bin
+      mkdir $out/bin
+      for i in ${ui}/bin/*; do
+        ln -s $i $out/bin
+      done
+    fi
+    for i in $out/bin/*; do
+      wrapProgram $i --set ADM_ROOT_DIR $out
+    done
+  '';
+}