GNU bug report logs - #53772
[PATCH] gnu: Add emacs-blacken.

Previous Next

Package: guix-patches;

Reported by: jgart <jgart <at> dismail.de>

Date: Fri, 4 Feb 2022 06:53:01 UTC

Severity: normal

Tags: patch

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53772 in the body.
You can then email your comments to 53772 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#53772; Package guix-patches. (Fri, 04 Feb 2022 06:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jgart <jgart <at> dismail.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 04 Feb 2022 06:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: guix-patches <at> gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH] gnu: Add emacs-blacken.
Date: Fri,  4 Feb 2022 01:51:53 -0500
* 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





Information forwarded to guix-patches <at> gnu.org:
bug#53772; Package guix-patches. (Fri, 04 Feb 2022 08:34:01 GMT) Full text and rfc822 format available.

Message #8 received at 53772 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>
To: jgart <jgart <at> dismail.de>, 53772 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add emacs-blacken.
Date: Fri, 04 Feb 2022 09:33:33 +0100
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




Information forwarded to guix-patches <at> gnu.org:
bug#53772; Package guix-patches. (Fri, 04 Feb 2022 09:09:01 GMT) Full text and rfc822 format available.

Message #11 received at 53772 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: 53772 <at> debbugs.gnu.org
Cc: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>,
 jgart <jgart <at> dismail.de>
Subject: [PATCH v2] gnu: Add emacs-blacken.
Date: Fri,  4 Feb 2022 04:06:44 -0500
* 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





Reply sent to Liliana Marie Prikler <liliana.prikler <at> gmail.com>:
You have taken responsibility. (Fri, 04 Feb 2022 19:53:03 GMT) Full text and rfc822 format available.

Notification sent to jgart <jgart <at> dismail.de>:
bug acknowledged by developer. (Fri, 04 Feb 2022 19:53:03 GMT) Full text and rfc822 format available.

Message #16 received at 53772-done <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: jgart <jgart <at> dismail.de>, 53772-done <at> debbugs.gnu.org
Subject: Re: [PATCH v2] gnu: Add emacs-blacken.
Date: Fri, 04 Feb 2022 20:51:55 +0100
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




Information forwarded to guix-patches <at> gnu.org:
bug#53772; Package guix-patches. (Fri, 04 Feb 2022 20:37:01 GMT) Full text and rfc822 format available.

Message #19 received at 53772-done <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: 53772-done <at> debbugs.gnu.org
Subject: Re: [PATCH v2] gnu: Add emacs-blacken.
Date: Fri, 4 Feb 2022 15:36:01 -0500
On Fri, 04 Feb 2022 20:51:55 +0100 Liliana Marie Prikler <liliana.prikler <at> gmail.com> wrote:
> LGTM, pushed

THNX!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 05 Mar 2022 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 165 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.