unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50329: [PATCH] Bundle icons for emacs-lsp-treemacs
       [not found] <yu1k0jzg95d.fsf@inventati.org>
@ 2022-03-19 15:29 ` Roman Scherer
  2022-03-19 20:10   ` Maxime Devos
  0 siblings, 1 reply; 3+ messages in thread
From: Roman Scherer @ 2022-03-19 15:29 UTC (permalink / raw)
  To: guix-patches

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


Hello,

the emacs-lsp-treemacs package does not bundle it's icons. This patch
fixes the issue by copying the icons to `share/emacs-lsp-treemacs/icons`
and patching the paths in `lsp-treemacs-themes.el`.

This is the link to the issue in bug tracker: https://issues.guix.gnu.org/50329

Would you like to apply this patch?

Thanks, Roman.

This is my 2nd mail, because I forgot to set the subject in the previous.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch --]
[-- Type: text/x-patch, Size: 1524 bytes --]

From 70b409e51ea655c79fac20d9990b9644ddd4f19c Mon Sep 17 00:00:00 2001
From: r0man <roman@burningswell.com>
Date: Sat, 19 Mar 2022 15:33:24 +0100
Subject: [PATCH] Bundle emacs-lsp-treemacs icons

---
 gnu/packages/emacs-xyz.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index dcd36291fb..a1328ef57a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -24429,6 +24429,19 @@ (define-public emacs-lsp-treemacs
        (sha256
         (base32 "05ivqa5900139jzjhwc3nggwznhm8564dz4ydcxym2ddd63571k0"))))
     (build-system emacs-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'patch-paths
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* "lsp-treemacs-themes.el"
+                 (("\\(f-join \\(f-dirname \\(or load-file-name buffer-file-name\\)\\) \"icons/([^\"]+)\"\\)" all name)
+                  (string-append "\"" out "/share/" ,name "/icons/" name "\""))))))
+         (add-after 'install 'install-data
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (copy-recursively "icons" (string-append out "/share/" ,name "/icons"))))))))
     (propagated-inputs
      (list emacs-lsp-mode emacs-treemacs))
     (home-page "https://github.com/emacs-lsp/lsp-treemacs")
-- 
2.34.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#50329: [PATCH] Bundle icons for emacs-lsp-treemacs
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Maxime Devos @ 2022-03-19 20:10 UTC (permalink / raw)
  To: Roman Scherer, guix-patches; +Cc: Nicolas Goaziou

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

Roman Scherer schreef op za 19-03-2022 om 16:29 [+0100]:
> the emacs-lsp-treemacs package does not bundle it's icons. This patch
> fixes the issue by copying the icons to `share/emacs-lsp-
> treemacs/icons` and patching the paths in `lsp-treemacs-themes.el`.

That might technically solves matter, though instead of copying, why
not just change

  (string-append "\"" out "/share/" ,name "/icons/" name "\"")

to the location of the icons?  Unless you meant something else with
bundling here ...

Also, what do you mean with bundling exactly?  AFAICT, the icons _are_
bundled, in the directory 'icons', and so far they have not yet been
unbundled in Guix -- the problem is that they are not installed (yet)
-- in that case, the patch seems reasonable to me.

Additionally, there may be some licensing problems.  The icons
apparently come from ‘eclipse’, ‘idea’ and ‘netbeans’.  I don't
actually know which license these have, but:

  * idea is propietary, so probably its icons are as well
  * Eclipse is ASL, which probably has some kind of requirement
    that you need to preserve license and copyright information,
    which seems to be completely ignored here.
  * the relevant licenses don't appear to be entioned in the
    'licenses' field.

As such, if these problems are not resolved, I think it will be
necessary to remove emacs-lsp-treemacs.

It seems like emacs-company-box
(https://github.com/sebastiencs/company-box/tree/master/images)
has the same problem as well.

Also seem upstream <https://github.com/emacs-lsp/lsp-treemacs/issues/123>.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#50329: [PATCH] Bundle icons for emacs-lsp-treemacs
  2022-03-19 20:10   ` Maxime Devos
@ 2022-03-20  8:59     ` Roman Scherer
  0 siblings, 0 replies; 3+ messages in thread
From: Roman Scherer @ 2022-03-20  8:59 UTC (permalink / raw)
  To: Maxime Devos; +Cc: guix-patches, Nicolas Goaziou

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


Hi Maxime,

thanks for taking a look at my patch and uncovering this license
issue. I was not aware of that.

When I said the emacs-lsp-treemacs package is not bundling it's icons, I
meant that the Guix emacs-lsp-treemacs package does not install them.

So, without my patch, I see the following files installed on my system:

[roman@thinkpad ~]$ find /gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4/share
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4/share/emacs
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4/share/emacs/site-lisp
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4/share/emacs/site-lisp/lsp-treemacs-0.4
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4/share/emacs/site-lisp/lsp-treemacs-0.4/lsp-treemacs-pkg.el
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4/share/emacs/site-lisp/lsp-treemacs-0.4/lsp-treemacs.elc
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4/share/emacs/site-lisp/lsp-treemacs-0.4/lsp-treemacs-autoloads.el
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4/share/emacs/site-lisp/lsp-treemacs-0.4/lsp-treemacs-themes.el
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4/share/emacs/site-lisp/lsp-treemacs-0.4/lsp-treemacs.el
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4/share/emacs/site-lisp/lsp-treemacs-0.4/lsp-treemacs-themes.elc
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4/share/emacs/site-lisp/lsp-treemacs-0.4/lsp-treemacs-autoloads.elc
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4/share/doc
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4/share/doc/emacs-lsp-treemacs-0.4
/gnu/store/z634qq81f0qfvqzr0rcavpc16bdc9zs3-emacs-lsp-treemacs-0.4/share/doc/emacs-lsp-treemacs-0.4/LICENSE

Since the icons are not installed on a Guix system right now, I think we
can leave the Guix emacs-lsp-treemacs packages as it is for now.

Once upstream has added the licenses for the icons, we could take
another look and maybe only install the ones that we are allowed to
include.

What do you think?

Thanks, Roman.

Maxime Devos <maximedevos@telenet.be> writes:

> [[PGP Signed Part:Undecided]]
> Roman Scherer schreef op za 19-03-2022 om 16:29 [+0100]:
>> the emacs-lsp-treemacs package does not bundle it's icons. This patch
>> fixes the issue by copying the icons to `share/emacs-lsp-
>> treemacs/icons` and patching the paths in `lsp-treemacs-themes.el`.
>
> That might technically solves matter, though instead of copying, why
> not just change
>
>   (string-append "\"" out "/share/" ,name "/icons/" name "\"")
>
> to the location of the icons?  Unless you meant something else with
> bundling here ...
>
> Also, what do you mean with bundling exactly?  AFAICT, the icons _are_
> bundled, in the directory 'icons', and so far they have not yet been
> unbundled in Guix -- the problem is that they are not installed (yet)
> -- in that case, the patch seems reasonable to me.
>
> Additionally, there may be some licensing problems.  The icons
> apparently come from ‘eclipse’, ‘idea’ and ‘netbeans’.  I don't
> actually know which license these have, but:
>
>   * idea is propietary, so probably its icons are as well
>   * Eclipse is ASL, which probably has some kind of requirement
>     that you need to preserve license and copyright information,
>     which seems to be completely ignored here.
>   * the relevant licenses don't appear to be entioned in the
>     'licenses' field.
>
> As such, if these problems are not resolved, I think it will be
> necessary to remove emacs-lsp-treemacs.
>
> It seems like emacs-company-box
> (https://github.com/sebastiencs/company-box/tree/master/images)
> has the same problem as well.
>
> Also seem upstream <https://github.com/emacs-lsp/lsp-treemacs/issues/123>.
>
> Greetings,
> Maxime.
>
> [[End of PGP Signed Part]]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 528 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-20  9:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <yu1k0jzg95d.fsf@inventati.org>
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

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).