From: r0man <liliana.prikler@gmail.com>
To: 50329@debbugs.gnu.org
Cc: Maxime Devos <maximedevos@telenet.be>,
Nicolas Goaziou <mail@nicolasgoaziou.fr>,
Roman Scherer <roman.scherer@burningswell.com>
Subject: bug#50329: [PATCH v2 1/2] gnu: emacs-lsp-treemacs: Remove unclearly licensed icons.
Date: Sat, 19 Mar 2022 15:33:24 +0100 [thread overview]
Message-ID: <4bee3a29d44d2711e85be65dbb288e751c7fa315.camel@burningswell.com> (raw)
In-Reply-To: <yu1k0jzg95d.fsf@inventati.org>
emacs-lsp-treemacs bundles icons with unclear licenses.
See also <https://github.com/emacs-lsp/lsp-treemacs/issues/123>.
* gnu/packages/emacs-xyz.scm (%emacs-lsp-treemacs-upstream-source): New
variable.
(emacs-treemacs)[source]: Use a computed origin to remove unclearly licensed
icons. Also remove source code which mentions said icons.
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
---
gnu/packages/emacs-xyz.scm | 72 ++++++++++++++++++++++++++++++++++----
1 file changed, 65 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index b5c2c011db..caa9b4ca6e 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -27305,19 +27305,77 @@ (define-public emacs-lsp-mode
and Projectile.")
(license license:gpl3+))))
+(define* (%emacs-lsp-treemacs-upstream-source #:key commit version hash)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/emacs-lsp/lsp-treemacs")
+ (commit commit)))
+ (file-name (git-file-name "emacs-lsp-treemacs" version))
+ (hash hash)))
+
(define-public emacs-lsp-treemacs
(package
(name "emacs-lsp-treemacs")
(version "0.4")
(source
(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/emacs-lsp/lsp-treemacs")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "05ivqa5900139jzjhwc3nggwznhm8564dz4ydcxym2ddd63571k0"))))
+ (method (@@ (guix packages) computed-origin-method))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256 #f)
+ (uri
+ (delay
+ (with-imported-modules '((guix build emacs-utils)
+ (guix build utils))
+ #~(begin
+ (use-modules (guix build utils)
+ (guix build emacs-utils))
+ (let* ((dir (string-append "emacs-lsp-treemacs-" #$version)))
+
+ (set-path-environment-variable
+ "PATH" '("bin")
+ (list #+emacs-minimal
+ #+(canonical-package bash)
+ #+(canonical-package coreutils)
+ #+(canonical-package gzip)
+ #+(canonical-package tar)))
+
+ ;; Copy the upstream source
+ (copy-recursively
+ #+(%emacs-lsp-treemacs-upstream-source
+ #:commit version #:version version
+ #:hash
+ (content-hash
+ "05ivqa5900139jzjhwc3nggwznhm8564dz4ydcxym2ddd63571k0"))
+ dir)
+
+ (with-directory-excursion dir
+ ;; The icons are unclearly licensed and possibly non-free,
+ ;; see <https://github.com/emacs-lsp/lsp-treemacs/issues/123>
+ (with-directory-excursion "icons"
+ (for-each delete-file-recursively
+ '("eclipse" "idea" "netbeans")))
+
+ ;; Also remove any mentions in the source code.
+ (make-file-writable "lsp-treemacs-themes.el")
+ (emacs-batch-edit-file "lsp-treemacs-themes.el"
+ '(progn
+ (while (search-forward-regexp
+ "(treemacs-create-theme \"\\([^\"]*\\)\""
+ nil t)
+ (pcase (match-string 1)
+ ("Iconless" nil)
+ (_ (beginning-of-line)
+ (kill-sexp)))
+ (basic-save-buffer)))))
+
+ (invoke "tar" "cvfa" #$output
+ "--mtime=@0"
+ "--owner=root:0"
+ "--group=root:0"
+ "--sort=name"
+ "--hard-dereference"
+ dir))))))))
(build-system emacs-build-system)
(propagated-inputs
(list emacs-lsp-mode emacs-treemacs))
base-commit: 8be0a97a8139fdd4d196092008b98668f1a8b2bb
--
2.38.1
next prev parent reply other threads:[~2023-01-06 18:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-01 23:31 bug#50329: Missing icon folder in emacs-lsp-treemacs package Cayetano Santos
2022-03-19 14:33 ` r0man [this message]
2023-01-22 9:09 ` bug#50329: [PATCH v2 1/2] gnu: emacs-lsp-treemacs: Remove unclearly licensed icons Liliana Marie Prikler
2022-03-19 15:29 ` bug#50329: [PATCH] Bundle icons for emacs-lsp-treemacs Roman Scherer
2022-03-19 20:10 ` Maxime Devos
2022-03-20 8:59 ` Roman Scherer
2022-03-20 9:41 ` Maxime Devos
2022-03-20 10:35 ` Roman Scherer
2022-03-20 11:15 ` Liliana Marie Prikler
2022-03-20 11:21 ` Roman Scherer
2022-03-20 13:10 ` Liliana Marie Prikler
2022-03-20 13:58 ` Roman Scherer
2022-03-20 15:46 ` Liliana Marie Prikler
2022-03-20 17:58 ` Roman Scherer
2022-03-20 13:29 ` bug#50329: [PATCH v2 2/2] gnu: emacs-company-box: Remove unclearly licensed icons from source Liliana Marie Prikler
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=4bee3a29d44d2711e85be65dbb288e751c7fa315.camel@burningswell.com \
--to=liliana.prikler@gmail.com \
--cc=50329@debbugs.gnu.org \
--cc=mail@nicolasgoaziou.fr \
--cc=maximedevos@telenet.be \
--cc=roman.scherer@burningswell.com \
/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).