diff mbox series

[bug#62123,3/4] gnu: Add emacs-pippel.

Message ID CAEtmmeyJMhhQui-JB+UV1SQ1CEQ_7dVsV8hk8Pb0YA=80jhFcg@mail.gmail.com
State New
Headers show
Series None | expand

Commit Message

Rostislav Svoboda March 28, 2023, 10:34 p.m. UTC
Hi Nicolas

> Nitpick: usually, inputs and propagated inputs are located after arguments.

Done

> > +      (arguments
> > +       (list #:phases #~(modify-phases %standard-phases
>
> You can add a newline characther after `list' and another one after
> `#:phases'.

Done

> Also, pip -> Pip, pippel -> Pippel

Done

> I think you also need to include "pippel.py" file through #:include

Done

> keyword and possibly configure `pippel-package-path'.

Done. Please have a look if it's done correctly.

Cheers
Bost




From 4b83e10686d8189568b756fe514d0be0d2c54750 Mon Sep 17 00:00:00 2001
From: Rostislav Svoboda <Rostislav.Svoboda@gmail.com>
Date: Wed, 29 Mar 2023 00:15:12 +0200
Subject: [PATCH] gnu: Add emacs-pippel.

* gnu/packages/emacs-xyz.scm (emacs-pippel): New variable.
---
 gnu/packages/emacs-xyz.scm | 48 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

Comments

Nicolas Goaziou March 30, 2023, 10:38 a.m. UTC | #1
Hello,

Rostislav Svoboda <rostislav.svoboda@gmail.com> writes:

> Done. Please have a look if it's done correctly.

Applied with the change below. Thank you.
> +            (add-after 'unpack 'substitute-pippel-package-path
> +              (lambda* (#:key outputs #:allow-other-keys)
> +                (let* ((out (assoc-ref outputs "out"))
> +                       (package-path (string-append
> +                                      out
> +                                      "/share/emacs/site-lisp/pippel-"
> +                                      #$version)))

I used `elpa-directory' here, and removed `out' binding.

Regards,
diff mbox series

Patch

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index da2856abc8..1cdaccd366 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -17288,6 +17288,54 @@  (define-public emacs-php-mode
 documentation search and a source and class browser.")
     (license license:gpl3+)))

+(define-public emacs-pippel
+  (let ((commit "cb194952ee150e77601d3233dabdb521b976ee79")
+        (revision "0"))
+    (package
+      (name "emacs-pippel")
+      (version (git-version "0.1" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/arifer612/pippel")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "17606l24yyrjxa4rc0p2zj50lfbayqldw4phhi59yqf61289d520"))))
+      (build-system emacs-build-system)
+      (arguments
+       (list
+        #:include #~(cons "^pippel\\.py$" %default-include)
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'substitute-pippel-package-path
+              (lambda* (#:key outputs #:allow-other-keys)
+                (let* ((out (assoc-ref outputs "out"))
+                       (package-path (string-append
+                                      out
+                                      "/share/emacs/site-lisp/pippel-"
+                                      #$version)))
+                  (emacs-substitute-variables "pippel.el"
+                    ("pippel-package-path"
+                     package-path)))))
+            (add-after 'unpack 'substitute-python-path
+              (lambda* (#:key inputs #:allow-other-keys)
+                (emacs-substitute-variables "pippel.el"
+                  ("pippel-python-command"
+                   (search-input-file
+                    inputs
+                    "/bin/python"))))))))
+      (inputs (list python-wrapper))
+      (propagated-inputs (list emacs-dash emacs-s))
+      (home-page "https://github.com/arifer612/pippel")
+      (synopsis "Emacs frontend to Python package manager Pip")
+      (description
+       "Pippel is an Emacs frontend for the Python package manager Pip.  As
+Pippel also uses Tabulated List mode, it provides a similar package menu like
+@code{package-list-packages}.")
+      (license license:gpl3+))))
+
 (define-public emacs-pos-tip
   (package
     (name "emacs-pos-tip")