From 6a57549e00616dae5ae8e35e7375e60e2dfe68aa Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Thu, 20 Jan 2022 14:09:14 +0300 Subject: [PATCH 4/4] gnu: telega: Use new package style. * gnu/packages/emacs-xyz.scm (emacs-telega, emacs-telega-contrib): Use gexps, remove trailing #t. --- gnu/packages/emacs-xyz.scm | 82 +++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index ed58989f56..c94f8443d9 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -26863,39 +26863,40 @@ (define-public emacs-telega (name "emacs-telega") (build-system emacs-build-system) (arguments - `(#:emacs ,(if (target-64bit?) - emacs-minimal - ;; Require wide-int support for 32-bit platform. - emacs-wide-int) - #:include (cons "^etc\\/" %default-include) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-sources - (lambda* (#:key inputs #:allow-other-keys) - ;; Hard-code paths to `ffplay` and `ffmpeg`. - (let* ((ffplay-bin (search-input-file inputs "/bin/ffplay")) - (ffmpeg-bin (search-input-file inputs "/bin/ffmpeg"))) - (substitute* '("telega-ffplay.el" "telega-vvnote.el") - (("(shell-command-to-string\|concat) \"(ffmpeg\|ffprobe)" - all func cmd) - (string-append func " \"" - (search-input-file - inputs (string-append "/bin/" cmd)))) - (("\\(executable-find \"ffplay\"\\)") - (string-append "(and (file-executable-p \"" ffplay-bin "\")" - "\"" ffplay-bin "\")")) - (("\\(executable-find \"ffmpeg\"\\)") - (string-append "(and (file-executable-p \"" ffmpeg-bin "\")" - "\"" ffmpeg-bin "\")")))))) - (add-after 'unpack 'configure - (lambda* (#:key inputs outputs #:allow-other-keys) - (substitute* "telega-customize.el" - (("@TELEGA_SERVER_BIN@") - (search-input-file inputs "/bin/telega-server"))) - (substitute* "telega-util.el" - (("@TELEGA_SHARE@") - (string-append (elpa-directory (assoc-ref outputs "out")) - "/etc")))))))) + (list + #:emacs (if (target-64bit?) + emacs-minimal + ;; Require wide-int support for 32-bit platform. + emacs-wide-int) + #:include #~(cons "^etc\\/" %default-include) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-sources + (lambda* (#:key inputs #:allow-other-keys) + ;; Hard-code paths to `ffplay` and `ffmpeg`. + (let* ((ffplay-bin (search-input-file inputs "/bin/ffplay")) + (ffmpeg-bin (search-input-file inputs "/bin/ffmpeg"))) + (substitute* '("telega-ffplay.el" "telega-vvnote.el") + (("(shell-command-to-string\|concat) \"(ffmpeg\|ffprobe)" + all func cmd) + (string-append func " \"" + (search-input-file + inputs (string-append "/bin/" cmd)))) + (("\\(executable-find \"ffplay\"\\)") + (string-append "(and (file-executable-p \"" ffplay-bin "\")" + "\"" ffplay-bin "\")")) + (("\\(executable-find \"ffmpeg\"\\)") + (string-append "(and (file-executable-p \"" ffmpeg-bin "\")" + "\"" ffmpeg-bin "\")")))))) + (add-after 'unpack 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "telega-customize.el" + (("@TELEGA_SERVER_BIN@") + (search-input-file inputs "/bin/telega-server"))) + (substitute* "telega-util.el" + (("@TELEGA_SHARE@") + (string-append (elpa-directory (assoc-ref outputs "out")) + "/etc")))))))) (inputs (list emacs-telega-server ffmpeg)) (native-inputs '()) @@ -26911,13 +26912,14 @@ (define-public emacs-telega-contrib (inherit emacs-telega) (name "emacs-telega-contrib") (arguments - `(#:exclude '("telega-live-location.el") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'enter-subdirectory - (lambda _ (chdir "contrib") #t)) - (add-before 'install-license-files 'leave-subdirectory - (lambda _ (chdir "..") #t))))) + (list + #:exclude '("telega-live-location.el") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'enter-subdirectory + (lambda _ (chdir "contrib"))) + (add-before 'install-license-files 'leave-subdirectory + (lambda _ (chdir "..")))))) (inputs '()) (native-inputs '()) (propagated-inputs -- 2.34.0