diff mbox series

[bug#58397,1/2] gnu: emacs-password-store: Refer directly to password-store.

Message ID 20221009165749.16619-1-paren@disroot.org
State Accepted
Headers show
Series gnu: emacs-password-store: Refer directly to password-store. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

\( Oct. 9, 2022, 4:57 p.m. UTC
* gnu/packages/emacs-xyz.scm (emacs-password-store)[arguments]:
  Use gexp style.
<#:phases>{'extract-el-file}: New phase.
[propagated-inputs]<password-store>: Move it...
[inputs]: ...here.
---
 gnu/packages/emacs-xyz.scm | 35 ++++++++++++++++++++++-------------
 1 file changed, 22 insertions(+), 13 deletions(-)

Comments

Nicolas Goaziou Oct. 10, 2022, 4:12 p.m. UTC | #1
Hello,

"( via Guix-patches" via <guix-patches@gnu.org> writes:

Thank you. Applied with the following change.

> +                 (add-after 'extract-el-file 'patch-executables
> +                   (lambda* (#:key inputs #:allow-other-keys)
> +                     (substitute* "password-store.el"
> +                       (("\\(executable-find \"pass\"\\)")
> +                        (string-append
> +                         "\""
> +                         (search-input-file inputs "bin/pass")
> +                         "\""))))))))

I used `emacs-substitute-variable' instead of substitute*.

Regards,
\( Oct. 10, 2022, 4:23 p.m. UTC | #2
Hey Nicolas,

On Mon Oct 10, 2022 at 5:12 PM BST, Nicolas Goaziou wrote:
> Thank you. Applied with the following change.

Thanks! :)

> I used `emacs-substitute-variable' instead of substitute*.

Ah, I didn't know that existed; thanks! I've never touched Emacs packaging
before.

    -- (
diff mbox series

Patch

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 8134a19d56..6f415dc7b1 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -18918,24 +18918,33 @@  (define-public emacs-password-store
                 (uri (git-reference
                       (url "git://git.zx2c4.com/password-store")
                       (commit commit)))
+                (file-name (git-file-name name version))
                 (sha256
                  (base32
-                  "0ni62f4pq96g0i0q66bch1dl9k4zqwhg7xaf746k3gbbqxcdh3vi"))
-                (file-name (git-file-name name version))))
+                  "0ni62f4pq96g0i0q66bch1dl9k4zqwhg7xaf746k3gbbqxcdh3vi"))))
       (build-system emacs-build-system)
       (arguments
-       `(#:phases
-         (modify-phases %standard-phases
-           (add-after 'unpack 'extract-el-file
-             (lambda _
-               (copy-file "contrib/emacs/password-store.el" "password-store.el")
-               (delete-file-recursively "contrib")
-               (delete-file-recursively "man")
-               (delete-file-recursively "src")
-               (delete-file-recursively "tests"))))))
+       (list #:phases
+             #~(modify-phases %standard-phases
+                 (add-after 'unpack 'extract-el-file
+                   (lambda _
+                     (copy-file "contrib/emacs/password-store.el"
+                                "password-store.el")
+                     (delete-file-recursively "contrib")
+                     (delete-file-recursively "man")
+                     (delete-file-recursively "src")
+                     (delete-file-recursively "tests")))
+                 (add-after 'extract-el-file 'patch-executables
+                   (lambda* (#:key inputs #:allow-other-keys)
+                     (substitute* "password-store.el"
+                       (("\\(executable-find \"pass\"\\)")
+                        (string-append
+                         "\""
+                         (search-input-file inputs "bin/pass")
+                         "\""))))))))
+      (inputs (list password-store))
       (propagated-inputs
-       (list emacs-auth-source-pass emacs-s emacs-with-editor
-             password-store))
+       (list emacs-auth-source-pass emacs-s emacs-with-editor))
       (home-page "https://git.zx2c4.com/password-store/tree/contrib/emacs")
       (synopsis "Password store (pass) support for Emacs")
       (description