guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: emacs-telega: Patch `ffplay` instead of propagating.


From: guix-commits
Subject: 01/01: gnu: emacs-telega: Patch `ffplay` instead of propagating.
Date: Fri, 13 Dec 2019 13:06:56 -0500 (EST)

brettgilio pushed a commit to branch master
in repository guix.

commit 5f12df7ea6dd8422aaf5b27f07b27897073a65bd
Author: Leo Prikler <address@hidden>
Date:   Fri Dec 13 14:05:24 2019 +0100

    gnu: emacs-telega: Patch `ffplay` instead of propagating.
    
    * gnu/packages/emacs-xyz.scm (emacs-telega) [phases]:
    <telega-data-patch>: Rename to telega-paths-patch.
    <telega-paths-patch>: Substitute ffplay path for patching.
    [propagated-inputs] <ffmpeg>: Remove.
    [inputs] <ffmpeg>: Add.
    
    Fixes: #38590 <https://bugs.gnu.org/38590>
    
    Signed-off-by: Brett Gilio <address@hidden>
    Co-authored-by: Brett Gilio <address@hidden>
---
 gnu/packages/emacs-xyz.scm | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ae7e7a6..86e0ad1 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -20113,10 +20113,18 @@ fish-completion.  It can be used in both Eshell and 
M-x shell.")
                  (("python3 run_tests.py")
                   ""))
                #t))
-           ;; Modify telega-util to reflect unique dir name in
-           ;; `telega-install-data' phase.
-           (add-after 'unpack 'telega-data-patch
-             (lambda _
+           (add-after 'unpack 'telega-paths-patch
+             (lambda* (#:key inputs #:allow-other-keys)
+               ;; Hard-code path to `ffplay`.
+               (let ((ffplay-bin (string-append (assoc-ref inputs "ffmpeg")
+                                                "/bin/ffplay")))
+                 (substitute* "telega-ffplay.el"
+                   (("\\(executable-find \"ffplay\"\\)")
+                    (string-append
+                     "(and (file-executable-p \"" ffplay-bin "\")"
+                     "\"" ffplay-bin "\")"))))
+               ;; Modify telega-util to reflect unique dir name in
+               ;; `telega-install-data' phase.
                (substitute* "telega-util.el"
                  (("\\(concat \"etc/\" filename\\) telega--lib-directory")
                   "(concat \"telega-data/\" filename)
@@ -20149,7 +20157,6 @@ fish-completion.  It can be used in both Eshell and M-x 
shell.")
                (invoke "python3" "server/run_tests.py")
                #t))
            (delete 'configure)
-           
            ;; Build emacs-side using `emacs-build-system'
            (add-after 'compress-documentation 'emacs-add-source-to-load-path
              (assoc-ref emacs:%standard-phases 'add-source-to-load-path))
@@ -20168,9 +20175,10 @@ fish-completion.  It can be used in both Eshell and 
M-x shell.")
              (assoc-ref emacs:%standard-phases 'build))
            (add-after 'emacs-build 'emacs-make-autoloads
              (assoc-ref emacs:%standard-phases 'make-autoloads)))))
+      (inputs
+       `(("ffmpeg" ,ffmpeg))) ; mp4/gif support.
       (propagated-inputs
        `(("emacs-visual-fill-column" ,emacs-visual-fill-column)
-         ("ffmpeg" ,ffmpeg) ; mp4/gif support.
          ("libwebp" ,libwebp))) ; sticker support.
       (native-inputs
        `(("tdlib" ,tdlib)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]