summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorjgart <jgart@dismail.de>2022-02-04 04:06:44 -0500
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2022-02-04 20:17:15 +0100
commita82847dcf3bb691a3bd1dbbbdff1dbf150877774 (patch)
treebe4c3c299a1219bdbbd01139c5ee16c5da898361 /gnu/packages
parent9907c158645ddbbe51d059a53d5cb43d65250d38 (diff)
downloadguix-a82847dcf3bb691a3bd1dbbbdff1dbf150877774.tar.gz
gnu: Add emacs-blacken.
* gnu/packages/emacs-xyz.scm (emacs-blacken): New variable.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/emacs-xyz.scm33
1 files changed, 33 insertions, 0 deletions
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 @@ dict.org) from within Emacs.")
 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")