[PATCH 1/2] gnu: Add python-pywal.

  • Done
  • quality assurance status badge
Details
2 participants
  • Morgan.J.Smith
  • Nicolas Goaziou
Owner
unassigned
Submitted by
Morgan.J.Smith
Severity
normal

Debbugs page

Morgan.J.Smith wrote 4 years ago
(address . guix-patches@gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
SN4PR0801MB367921B082E201AA871933CAC5BA9@SN4PR0801MB3679.namprd08.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/python-xyz.scm (python-pywal): New variable.
---
gnu/packages/python-xyz.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (60 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4b8e538168..7c0e9326e6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -94,6 +94,7 @@
;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
;;; Copyright © 2020 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -145,6 +146,7 @@ (define-module (gnu packages python-xyz)
#:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
+ #:use-module (gnu packages imagemagick)
#:use-module (gnu packages kerberos)
#:use-module (gnu packages libevent)
#:use-module (gnu packages libffi)
@@ -6057,6 +6059,37 @@ (define-public python-pywavelets
localized only in frequency instead of in time and frequency.")
(license license:expat)))
+(define-public python-pywal
+ (package
+ (name "python-pywal")
+ (version "3.3.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dylanaraps/pywal")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'fix-home-directory
+ (lambda _
+ ;; Tests fail with "Permission denied: '/homeless-shelter'".
+ (setenv "HOME" "/tmp")
+ #t)))))
+ (inputs
+ `(("imagemagick" ,imagemagick)))
+ (home-page "https://github.com/dylanaraps/pywal")
+ (synopsis "Color palette generator and applicator")
+ (description "Pywal is a tool that generates a color palette from the
+dominant colors in an image. It then applies the colors system-wide and
+on-the-fly in all of your favourite programs.")
+ (license license:expat)))
+
(define-public python-pywinrm
(package
(name "python-pywinrm")
--
2.30.0
Morgan.J.Smith wrote 4 years ago
[PATCH 2/2] gnu: Add emacs-theme-magic.
(address . 46149@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
SN4PR0801MB36792125CE5568A88ABBDE2EC5BA9@SN4PR0801MB3679.namprd08.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

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

Toggle diff (69 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 48a0b2a517..78add92372 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -76,7 +76,7 @@
;;; Copyright © 2020 Fredrik Salomonsson <plattfot@gmail.com>
;;; Copyright © 2020 Ryan Desfosses <rdes@protonmail.com>
;;; Copyright © 2020 Eric Bavier <bavier@posteo.net>
-;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
+;;; Copyright © 2020, 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
;;; Copyright © 2020 Peng Mei Yu <i@pengmeiyu.com>
;;; Copyright © 2020 Niklas Eklund <niklas.eklund@posteo.net>
;;; Copyright © 2020 Marco Grassi <marco.au.grassi98@protonmail.com>
@@ -725,6 +725,53 @@ (define-public emacs-moody
then only the color of the mode line changes when a window becomes in-/active.")
(license license:gpl3+)))
+(define-public emacs-theme-magic
+ ;; No tagged release upstream, but the commit below correspond to the 0.2.3
+ ;; release.
+ (let ((commit "844c4311bd26ebafd4b6a1d72ddcc65d87f074e3")
+ (revision "0"))
+ (package
+ (name "emacs-theme-magic")
+ (version "0.2.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jcaw/theme-magic")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "10gkg7jh1s1484gm66a87zr7x8vmv00s7gfd0w2pj47nqf98g8hz"))))
+ (build-system emacs-build-system)
+ (arguments
+ `(;; Include pywal interaction scripts
+ #:include (cons "^python/" %default-include)
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-exec-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((files '("theme-magic.el" "python/wal_change_colors.py"))
+ (python (assoc-ref inputs "python"))
+ (python-pywal (assoc-ref inputs "python-pywal")))
+ ;; Specify the absolute executable locations.
+ (for-each
+ (lambda (file)
+ (substitute* file
+ (("\"python\"") (string-append "\"" python "/bin/python3\""))
+ (("\"wal\"") (string-append "\"" python-pywal "/bin/wal\""))))
+ files))
+ #t)))))
+ (inputs
+ `(("python" ,python)
+ ("python-pywal" ,python-pywal)))
+ (home-page "https://github.com/jcaw/theme-magic")
+ (synopsis "Generate and apply pywal color palettes based on your Emacs
+theme")
+ (description "Running @code{M-x theme-magic-from-emacs} will extract the
+colors from your Emacs theme and apply them to the rest of Linux with pywal.
+Pywal only applies your theme to the current session.")
+ (license license:gpl3+))))
+
(define-public emacs-treepy
(package
(name "emacs-treepy")
--
2.30.0
Nicolas Goaziou wrote 4 years ago
Re: [bug#46149] [PATCH 1/2] gnu: Add python-pywal.
(address . Morgan.J.Smith@outlook.com)(address . 46149-done@debbugs.gnu.org)
87h7n1jj0t.fsf@nicolasgoaziou.fr
Hello,

Morgan.J.Smith@outlook.com writes:

Toggle quote (2 lines)
> * gnu/packages/python-xyz.scm (python-pywal): New variable.

Both patches applied. I made a slight change to substitute* invocation
in the second one and slightly shortened description.

Thank you.

Regards,
--
Nicolas Goaziou
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 46149@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 46149
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help