all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#53772] [PATCH] gnu: Add emacs-blacken.
@ 2022-02-04  6:51 jgart via Guix-patches via
  2022-02-04  8:33 ` Liliana Marie Prikler
  2022-02-04  9:06 ` [bug#53772] [PATCH v2] " jgart via Guix-patches via
  0 siblings, 2 replies; 5+ messages in thread
From: jgart via Guix-patches via @ 2022-02-04  6:51 UTC (permalink / raw)
  To: 53772; +Cc: jgart

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

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 521d003a6b..4d6e18f8ba 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -29822,6 +29822,30 @@ (define-public emacs-multitran
 to the @url{https://multitran.com} online dictionary.")
     (license license:gpl3+)))
 
+(define-public emacs-blacken
+  (package
+    (name "emacs-blacken")
+    (version "0.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/pythonic-emacs/blacken")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0pf9yllx0h78m925sdrg6hbv54ky2pi7cpkdsnx891qjsahvjnpy"))))
+    (build-system emacs-build-system)
+    (inputs
+      (list python-black))
+    (home-page "https://github.com/pythonic-emacs/blacken")
+    (synopsis "Python Black for Emacs")
+    (description
+"Use the @command{python} @command{black} package to reformat
+@command{python} buffers.")
+    (license license:gpl3)))
+
 (define-public emacs-kibit-helper
   (package
     (name "emacs-kibit-helper")
-- 
2.35.0





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#53772] [PATCH] gnu: Add emacs-blacken.
  2022-02-04  6:51 [bug#53772] [PATCH] gnu: Add emacs-blacken jgart via Guix-patches via
@ 2022-02-04  8:33 ` Liliana Marie Prikler
  2022-02-04  9:06 ` [bug#53772] [PATCH v2] " jgart via Guix-patches via
  1 sibling, 0 replies; 5+ messages in thread
From: Liliana Marie Prikler @ 2022-02-04  8:33 UTC (permalink / raw)
  To: jgart, 53772

Am Freitag, dem 04.02.2022 um 01:51 -0500 schrieb jgart:
> * gnu/packages/emacs-xyz.scm (emacs-blacken): New variable.
> ---
>  gnu/packages/emacs-xyz.scm | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index 521d003a6b..4d6e18f8ba 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -29822,6 +29822,30 @@ (define-public emacs-multitran
>  to the @url{https://multitran.com} online dictionary.")
>      (license license:gpl3+)))
>  
> +(define-public emacs-blacken
> +  (package
> +    (name "emacs-blacken")
> +    (version "0.2.0")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri
> +        (git-reference
> +         (url "https://github.com/pythonic-emacs/blacken")
> +         (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32
> "0pf9yllx0h78m925sdrg6hbv54ky2pi7cpkdsnx891qjsahvjnpy"))))
> +    (build-system emacs-build-system)
> +    (inputs
> +      (list python-black))
> +    (home-page "https://github.com/pythonic-emacs/blacken")
> +    (synopsis "Python Black for Emacs")
> +    (description
> +"Use the @command{python} @command{black} package to reformat
> +@command{python} buffers.")
> +    (license license:gpl3)))
> +
>  (define-public emacs-kibit-helper
>    (package
>      (name "emacs-kibit-helper")
As with all command-line utility wrappers, take care to make it
actually refer to the store path of said utility and don't just assume
it exists because it does at build time.

In your case 
  (emacs-substitute-variables "blacken.el" 
    ("blacken-executable" (search-input-file inputs "/bin/blacken")))
ought to do the drill, but be warned that this is me writing untested
Scheme from memory.

Cheers




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#53772] [PATCH v2] gnu: Add emacs-blacken.
  2022-02-04  6:51 [bug#53772] [PATCH] gnu: Add emacs-blacken jgart via Guix-patches via
  2022-02-04  8:33 ` Liliana Marie Prikler
@ 2022-02-04  9:06 ` jgart via Guix-patches via
  2022-02-04 19:51   ` bug#53772: " Liliana Marie Prikler
  1 sibling, 1 reply; 5+ messages in thread
From: jgart via Guix-patches via @ 2022-02-04  9:06 UTC (permalink / raw)
  To: 53772; +Cc: Liliana Marie Prikler, jgart

* gnu/packages/emacs-xyz.scm (emacs-blacken): New variable.
---

Hi Liliana,

Thanks for the review and the suggestions.

Here is version two.

all best,

jgart

 gnu/packages/emacs-xyz.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 521d003a6b..444b761116 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -29822,6 +29822,39 @@ (define-public emacs-multitran
 to the @url{https://multitran.com} online dictionary.")
     (license license:gpl3+)))
 
+(define-public emacs-blacken
+  (package
+    (name "emacs-blacken")
+    (version "0.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/pythonic-emacs/blacken")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0pf9yllx0h78m925sdrg6hbv54ky2pi7cpkdsnx891qjsahvjnpy"))))
+    (build-system emacs-build-system)
+    (inputs
+      (list python-black))
+    (arguments
+      `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-python-black
+             (lambda* (#:key inputs #:allow-other-keys)
+               (make-file-writable "blacken.el")
+               (emacs-substitute-variables "blacken.el"
+                 ("blacken-executable"
+                   (search-input-file inputs "/bin/black"))))))))
+    (home-page "https://github.com/pythonic-emacs/blacken")
+    (synopsis "Python Black for Emacs")
+    (description
+"Use the @command{python} @command{black} package to reformat
+@command{python} buffers.")
+    (license license:gpl3)))
+
 (define-public emacs-kibit-helper
   (package
     (name "emacs-kibit-helper")
-- 
2.35.0





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#53772: [PATCH v2] gnu: Add emacs-blacken.
  2022-02-04  9:06 ` [bug#53772] [PATCH v2] " jgart via Guix-patches via
@ 2022-02-04 19:51   ` Liliana Marie Prikler
  2022-02-04 20:36     ` [bug#53772] " jgart via Guix-patches via
  0 siblings, 1 reply; 5+ messages in thread
From: Liliana Marie Prikler @ 2022-02-04 19:51 UTC (permalink / raw)
  To: jgart, 53772-done

Am Freitag, dem 04.02.2022 um 04:06 -0500 schrieb jgart:
> * gnu/packages/emacs-xyz.scm (emacs-blacken): New variable.
> ---
> 
> Hi Liliana,
> 
> Thanks for the review and the suggestions.
> 
> Here is version two.
> 
> all best,
> 
> jgart
LGTM, pushed




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#53772] [PATCH v2] gnu: Add emacs-blacken.
  2022-02-04 19:51   ` bug#53772: " Liliana Marie Prikler
@ 2022-02-04 20:36     ` jgart via Guix-patches via
  0 siblings, 0 replies; 5+ messages in thread
From: jgart via Guix-patches via @ 2022-02-04 20:36 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 53772-done

On Fri, 04 Feb 2022 20:51:55 +0100 Liliana Marie Prikler <liliana.prikler@gmail.com> wrote:
> LGTM, pushed

THNX!




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-04 20:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-04  6:51 [bug#53772] [PATCH] gnu: Add emacs-blacken jgart via Guix-patches via
2022-02-04  8:33 ` Liliana Marie Prikler
2022-02-04  9:06 ` [bug#53772] [PATCH v2] " jgart via Guix-patches via
2022-02-04 19:51   ` bug#53772: " Liliana Marie Prikler
2022-02-04 20:36     ` [bug#53772] " jgart via Guix-patches via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.