summary refs log tree commit diff
path: root/gnu/packages/video.scm
diff options
context:
space:
mode:
authorVinicius Monego <monego@posteo.net>2021-12-18 18:12:26 +0000
committerLeo Famulari <leo@famulari.name>2021-12-26 18:36:47 -0500
commitbc74c191df789ff200da6f81c3cf599eae39ca8e (patch)
tree2c6b23949a2cecfdebeda931de94abc803805583 /gnu/packages/video.scm
parent75983158742219290caf6a350cfb98e0d9e3fb6f (diff)
downloadguix-bc74c191df789ff200da6f81c3cf599eae39ca8e.tar.gz
gnu: shotcut: Find ffmpeg and mlt at runtime.
* gnu/packages/video.scm (shotcut)[arguments]<:#phases>: Add phase
'patch-executable-paths to use full store paths for ffmpeg and mlt.

Signed-off-by: Leo Famulari <leo@famulari.name>
Diffstat (limited to 'gnu/packages/video.scm')
-rw-r--r--gnu/packages/video.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index bc79196927..fa8dadb217 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -4820,9 +4820,20 @@ transitions, and effects and then export your film to many common formats.")
         (base32 "1l27dqiyi3af0v155w62ib9xcmqyjj2yzs83aqhcrz5pb3i3j18r"))))
     (build-system qt-build-system)
     (arguments
-     `(#:tests? #f ;there are no tests
+     `(#:tests? #f                      ;there are no tests
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'patch-executable-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Shotcut expects ffmpeg and melt executables in the shotcut
+             ;; directory.  Use full store paths.
+             (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
+                    (mlt (assoc-ref inputs "mlt")))
+               (substitute* "src/jobs/ffmpegjob.cpp"
+                 (("\"ffmpeg\"") (string-append "\"" ffmpeg "/bin/ffmpeg\"")))
+               (substitute* "src/jobs/meltjob.cpp"
+                 (("\"melt\"") (string-append "\"" mlt "/bin/melt\""))
+                 (("\"melt-7\"") (string-append "\"" mlt "/bin/melt-7\""))))))
          (replace 'configure
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out")))