diff mbox series

[bug#52247,v2,1/2] gnu: shotcut: Find ffmpeg and mlt at runtime.

Message ID 20211218181227.82026-1-monego@posteo.net
State Accepted
Headers show
Series [bug#52247,v2,1/2] gnu: shotcut: Find ffmpeg and mlt at runtime. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego Dec. 18, 2021, 6:12 p.m. UTC
* gnu/packages/video.scm (shotcut)[arguments]<:#phases>: Add phase
'patch-executable-paths to use full store paths for ffmpeg and mlt.
---
This adds the suggestion from above, using just the string for replacement.

 gnu/packages/video.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)


base-commit: 86d6c6053c7d1c7a82c83f0daf0f5e09b1ecfb63

Comments

Leo Famulari Dec. 26, 2021, 11:38 p.m. UTC | #1
On Sat, Dec 18, 2021 at 06:12:26PM +0000, Vinicius Monego wrote:
> * gnu/packages/video.scm (shotcut)[arguments]<:#phases>: Add phase
> 'patch-executable-paths to use full store paths for ffmpeg and mlt.

Thanks! Pushed as 4e9895b462a004ac69ee92f544fe39b6c42d8525
diff mbox series

Patch

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 4b7251ee23..9b5738358b 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -4818,9 +4818,20 @@  transitions, and effects and then export your film to many common formats.")
         (base32 "0jgv6wl65gf6c4nmfica8k9vbgn3w3594d1phx1mb7zjvyy9y97k"))))
     (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")))