unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: John Soo <jsoo1@asu.edu>
To: 50863@debbugs.gnu.org
Subject: [bug#50863] [PATCH] gnu: Add themes to outputs of emacs-base-16-theme.
Date: Mon, 27 Sep 2021 23:17:58 -0700	[thread overview]
Message-ID: <87o88d4415.fsf@asu.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 186 bytes --]

Hi Guix,

I wanted to try out the base16 version of my beloved solarized theme and
found that the themes were not installed properly.

This patch ought to fix that.

Thank you!

- John


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-themes-to-outputs-of-emacs-base16-theme.patch --]
[-- Type: text/x-patch, Size: 1729 bytes --]

From 86e1252111c17ebd2dec46bdcb80bc2f1bf45e32 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Mon, 27 Sep 2021 22:08:41 -0700
Subject: [PATCH] gnu: Add themes to outputs of emacs-base16-theme.

* gnu/packages/emacs-xyz (emacs-base16-theme): [arguments] Add build directory
themes to #:include.
---
 gnu/packages/emacs-xyz.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 6024a993e2..f46dbb9277 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -8306,6 +8306,24 @@ answers.")
        (sha256
         (base32 "01w89g413s1da6rf94y1xnhw79cjy2bqb01yfjs58cy492cm0vr6"))))
     (build-system emacs-build-system)
+    (arguments
+     `(#:include (cons "^build\\/.*\\.el$"
+                       %default-include)
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'mv-themes
+           (lambda* (#:key outputs #:allow-other-keys)
+             (use-modules (ice-9 regex))
+             (let* ((out (assoc-ref outputs "out"))
+                    (theme-dir (string-append (elpa-directory out) "/build")))
+               (for-each (lambda (theme)
+                           (rename-file
+                            theme
+                            (regexp-substitute #f
+                                               (string-match "build\\/" theme)
+                                               'pre 'post)))
+                         (find-files theme-dir "\\.el$"))
+               (delete-file-recursively theme-dir)))))))
     (home-page "https://github.com/belak/base16-emacs")
     (synopsis "Base16 color themes for Emacs")
     (description
-- 
2.33.0


             reply	other threads:[~2021-09-28  6:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28  6:17 John Soo [this message]
2021-09-28 10:09 ` bug#50863: [PATCH] gnu: Add themes to outputs of emacs-base-16-theme Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o88d4415.fsf@asu.edu \
    --to=jsoo1@asu.edu \
    --cc=50863@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).