Missing icon folder in emacs-lsp-treemacs package.

  • Done
  • quality assurance status badge
Details
4 participants
  • Cayetano Santos
  • Liliana Marie Prikler
  • Maxime Devos
  • Roman Scherer
Owner
unassigned
Submitted by
Cayetano Santos
Severity
normal
C
C
Cayetano Santos wrote on 2 Sep 2021 01:31
(address . bug-guix@gnu.org)
yu1k0jzg95d.fsf@inventati.org
Context:

Using guix as a (emacs packages) package manager on top of
archlinux.


Problem

I get the following error when using emacs-lsp-treemacs.

Cannot find image file
‘/gnu/store/famkwbglv5sl7x08z671jyqdj1ngbw6p-emacs-lsp-treemacs-0.3/share/emacs/site-lisp/lsp-treemacs-0.3/icons/vscode/symbol-method.png’
[8 times]

Indeed, the icons folder is missing.


Solution

From the github repository


the icons folder is present.

Additionally, when installing from melpa, I observe that the icons
folder gets installed.
R
R
Roman Scherer wrote on 19 Mar 2022 16:29
[bug#50329][PATCH] Bundle icons for emacs-lsp-treemacs
(address . guix-patches@gnu.org)
87fsnevtxi.fsf@burningswell.com
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.
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(+)

Toggle diff (26 lines)
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
M
M
Maxime Devos wrote on 19 Mar 2022 21:10
Re: bug#50329: [PATCH] Bundle icons for emacs-lsp-treemacs
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)
8c532497fcfb965b7c60e93b3bbd8082b3acddf4.camel@telenet.be
Roman Scherer schreef op za 19-03-2022 om 16:29 [+0100]:
Toggle quote (4 lines)
> 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
has the same problem as well.


Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjY4zBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7mptAP47XNeYT7ves7UyacUdvOptbBS2
D44/yc2qupwRyrcpfgD/Rptrs/VdWm+r6t+sEOs4wcIpoUuxHiBU5zy323IcIQc=
=Bikt
-----END PGP SIGNATURE-----


R
R
Roman Scherer wrote on 20 Mar 2022 09:59
(name . Maxime Devos)(address . maximedevos@telenet.be)
87wngp6l7n.fsf@burningswell.com
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:

Toggle quote (43 lines)
> [[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]]
-----BEGIN PGP SIGNATURE-----

iQFTBAEBCAA9FiEE0iajOdjfRIFd3gygPdpSUn0qwZkFAmI28BwfHHJvbWFuLnNj
aGVyZXJAYnVybmluZ3N3ZWxsLmNvbQAKCRA92lJSfSrBmepdB/4rlqm3wtys21gb
Dn0K3EziKih4SKRM1TXgTgdHai++fhZlMAqUrbxMCsB7k54CzEpGMRShgR3ZHE5h
UyQwe3exuOrlp7wQzr4hGC1ld5yetHFxXAaTprkjdCnr8RWTv8EeAxewPE7kHy1B
PqriCti9vNNe/lbsiN0v6QtVW+w90GwQ/mCQjASTnGnaeZYKjkEv66d+tfF52vNB
0p+7PzLzA2zMbvflTMIR9+JhSZU3n/CiJ3CkVH8CtrJxyovT4yafkP2DoJBBPqj0
TDGiDlbc+ZWy7i9Rr02MAxcWEyMfTTfz2scNKd9MybvSai8i/D+VGcYKd1GY52Sb
i3TEbHB6
=oshl
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 20 Mar 2022 10:41
(name . Roman Scherer)(address . roman.scherer@burningswell.com)
7333ababd7753976b6165d1ce8d538586089015c.camel@telenet.be
Roman Scherer schreef op zo 20-03-2022 om 09:59 [+0100]:
Toggle quote (9 lines)
> 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?

Even though they are not currently installed, I would still remove
them from the 'source', as per (guix)Software Freedom:

Toggle quote (8 lines)
> Some otherwise free upstream package sources contain a small and
> optional subset that violates the above guidelines, for instance
> because this subset is itself non-free code. When that happens,
> the offending items are removed with appropriate patches or code
> snippets in the ‘origin’ form of the package (*note Defining
> Packages::). This way, ‘guix build --source’ returns the “freed”
> source rather than the unmodified upstream source.

That's about code, not icons, but the same principles apply I'd think.
(Though for some reason, the FSDG makes an exception for things like
images in the section ‘Non-functional Data’?)

(In this case, the idea icons are likely to be non-free, the netbeans
and eclipse icons are presumabl non-free.)

Even if the ‘Non-Functional Data’ exception is followed, I think
the source should still remove things that do not seem to follow the
licensing requirements (*) (and hence, might be illegal to
redistribute), to avoid nasty surprises for users doing "guix build --
sources=transitive foo bar ...".

(*) TBC, I am not accusing emacs-lsp-treemacs of violating license
terms. Rather, it is not clear to me that it does _not_ violate
licensing terms, and I'd like any potential licensing concerns to be
investigated (and corrected, if necessary) before including the icons
in Guix.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjb2txccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qSHAQC61MvlbdQhvdlWBcZm0RYxTH55
Z47hibYVkMqRcKLMxwD+LvplV1WakArFw3qC4VIFapWUi0bP+R3F+JyWUyRsNQs=
=Wrae
-----END PGP SIGNATURE-----


R
R
Roman Scherer wrote on 20 Mar 2022 11:35
(name . Maxime Devos)(address . maximedevos@telenet.be)
87sfrc7vqw.fsf@burningswell.com
Hi Maxime,

ok, I see. Thanks for the explanation. I attached a patch that removes
the icons from the source as per your suggestion.

What do you think about this one?

Thanks, Roman.
From 5468ef15c239133366314d0d5131e440c2e8893f Mon Sep 17 00:00:00 2001
From: r0man <roman@burningswell.com>
Date: Sat, 19 Mar 2022 15:33:24 +0100
Subject: [PATCH] Remove lsp-treemacs icons from source

There's an issue [1] with the icon licenses of the Emacs lsp-treemacs
package. This patch removes the icons directory from the sources.

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

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index dcd36291fb..1b6e54ef18 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -24426,6 +24426,8 @@ (define-public emacs-lsp-treemacs
(url "https://github.com/emacs-lsp/lsp-treemacs")
(commit version)))
(file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet '(begin (delete-file-recursively "icons") #t))
(sha256
(base32 "05ivqa5900139jzjhwc3nggwznhm8564dz4ydcxym2ddd63571k0"))))
(build-system emacs-build-system)
--
2.34.0
Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (45 lines)
> [[PGP Signed Part:Undecided]]
> Roman Scherer schreef op zo 20-03-2022 om 09:59 [+0100]:
>> 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?
>
> Even though they are not currently installed, I would still remove
> them from the 'source', as per (guix)Software Freedom:
>
>> Some otherwise free upstream package sources contain a small and
>> optional subset that violates the above guidelines, for instance
>> because this subset is itself non-free code. When that happens,
>> the offending items are removed with appropriate patches or code
>> snippets in the ‘origin’ form of the package (*note Defining
>> Packages::). This way, ‘guix build --source’ returns the “freed”
>> source rather than the unmodified upstream source.
>
> That's about code, not icons, but the same principles apply I'd think.
> (Though for some reason, the FSDG makes an exception for things like
> images in the section ‘Non-functional Data’?)
>
> (In this case, the idea icons are likely to be non-free, the netbeans
> and eclipse icons are presumabl non-free.)
>
> Even if the ‘Non-Functional Data’ exception is followed, I think
> the source should still remove things that do not seem to follow the
> licensing requirements (*) (and hence, might be illegal to
> redistribute), to avoid nasty surprises for users doing "guix build --
> sources=transitive foo bar ...".
>
> (*) TBC, I am not accusing emacs-lsp-treemacs of violating license
> terms. Rather, it is not clear to me that it does _not_ violate
> licensing terms, and I'd like any potential licensing concerns to be
> investigated (and corrected, if necessary) before including the icons
> in Guix.
>
> Greetings,
> Maxime.
>
> [[End of PGP Signed Part]]
-----BEGIN PGP SIGNATURE-----

iQFTBAEBCAA9FiEE0iajOdjfRIFd3gygPdpSUn0qwZkFAmI3BIcfHHJvbWFuLnNj
aGVyZXJAYnVybmluZ3N3ZWxsLmNvbQAKCRA92lJSfSrBmVOAB/9CykOJ9SPo1Aba
0tERgAXpncjPqsXqJ4onL4+SW1/Lo6eQN9bJXc2ciJ3xghaCifuKmo5zTC1ECFDO
IjHNYRyAMGiIIXNrHxXtE5G93n4s9q2cTs3vkoaUQ5ZOCd9eQQHJbzrIZ0tcl8iB
BgGgJLxorsJJiqxBaH72QrPb3nklg2Xb0C3we+hhsLhgUa2bY4TL++4kLJ7cf0uz
LFBx7H7Z9P33Z+LUKpFBwmoO5z2m57fKCWl+wAyDli2cd2240T4C7/KYtxWNKIsa
M5sB8T+3JmBO/YATo3vkG9WeVv07lAOxG6DD+4XEb3EUmCZkHFQO5GS2CDsQX6VD
lI9rpRWv
=HF2H
-----END PGP SIGNATURE-----

L
L
Liliana Marie Prikler wrote on 20 Mar 2022 12:15
c02a771f87791518ea8cfedd8ec83da343a8e5cb.camel@gmail.com
Hi Roman, hi Maxime,

Am Sonntag, dem 20.03.2022 um 11:35 +0100 schrieb Roman Scherer:
Toggle quote (8 lines)
> Hi Maxime,
>
> ok, I see. Thanks for the explanation. I attached a patch that
> removes the icons from the source as per your suggestion.
>
> What do you think about this one?
>
> Thanks, Roman.
The logic behind your patch LGTM, but it lacks an explanatory comment.
Don't worry about resending the patch, though -- I already added the
comment locally and am currently looking to also apply this to emacs-
company-box. If either of you could check whether those icons are
referred to by name in emacs-lsp-treemacs while I'm working on company-
box, that'd be appreciated.

Cheers
R
R
Roman Scherer wrote on 20 Mar 2022 12:21
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
87o8207tmx.fsf@burningswell.com
Hi Liliana,

thanks for adding the comment locally. I just checked the source of LSP
Treemacs and yes, they are all mentioned by name here:


Is this a problem? Should the build script remove them?

If that's the case, we could remove all those "icon themes" and just
leave this "Iconless" theme in the file:


Roman

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (19 lines)
> Hi Roman, hi Maxime,
>
> Am Sonntag, dem 20.03.2022 um 11:35 +0100 schrieb Roman Scherer:
>> Hi Maxime,
>>
>> ok, I see. Thanks for the explanation. I attached a patch that
>> removes the icons from the source as per your suggestion.
>>
>> What do you think about this one?
>>
>> Thanks, Roman.
> The logic behind your patch LGTM, but it lacks an explanatory comment.
> Don't worry about resending the patch, though -- I already added the
> comment locally and am currently looking to also apply this to emacs-
> company-box. If either of you could check whether those icons are
> referred to by name in emacs-lsp-treemacs while I'm working on company-
> box, that'd be appreciated.
>
> Cheers
-----BEGIN PGP SIGNATURE-----

iQFTBAEBCAA9FiEE0iajOdjfRIFd3gygPdpSUn0qwZkFAmI3DzYfHHJvbWFuLnNj
aGVyZXJAYnVybmluZ3N3ZWxsLmNvbQAKCRA92lJSfSrBmeX8CAC8JYXLUQZ2lNOw
AGENNNw3NnzDUb9Pt3OC19qZCX6RjZFqt0vmHvD8WCJLUwIRo/qLmXkdkoULgekH
pqBrCLQbORuZtazPCW+r9Y01bZz7vmGAaQDVHdFZbMM2HFRQeBHmw57v5jiTYz37
U53/3+h3XRzIf+3UXrfwpYujNnJ+c3WLcI+I09eIwdKgcMO0PLnf7sFIzyZO0R3C
FuM0He9W7mYPmSRUTdKBZgqAMAFw9fMMnjDJDH0V0SSxDoi36qfqNjwmr1qPrm/u
OGWHTgL4JLwABdBHdGlUcDcA3qTqok/cGmdX3bVXY7mey5HGLBXmQQpJxqfYhqQ1
+eLNVAWJ
=FiUh
-----END PGP SIGNATURE-----

L
L
Liliana Marie Prikler wrote on 20 Mar 2022 14:10
(name . Roman Scherer)(address . roman.scherer@burningswell.com)
aba0807d9ced558ad8e7c1866882b5f9426df8f3.camel@gmail.com
Hi Roman,

Am Sonntag, dem 20.03.2022 um 12:21 +0100 schrieb Roman Scherer:
Toggle quote (16 lines)
>
> Hi Liliana,
>
> thanks for adding the comment locally. I just checked the source of
> LSP Treemacs and yes, they are all mentioned by name here:
>
> https://github.com/emacs-lsp/lsp-treemacs/blob/master/lsp-treemacs-themes.el#L38
>
> Is this a problem? Should the build script remove them?
>
> If that's the case, we could remove all those "icon themes" and just
> leave this "Iconless" theme in the file:
>
> https://github.com/emacs-lsp/lsp-treemacs/blob/master/lsp-treemacs-themes.el#L209
>
> Roman
Sadly, replacing these in a snippet won't be that easy, given we can't
easily sneak emacs into it. On the topic of icons to remove, vscode-
icons might actually be okay and are also required by default.

What should we do?
R
R
Roman Scherer wrote on 20 Mar 2022 14:58
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
874k3sbtbl.fsf@burningswell.com
Hi Liliana and Maxime,

if the icons are really coming from [1], they seem to be licensed under
the Creative Commons Attribution 4.0 International Public License.

If it is okay to include them, I could work on a patch that only
installs the VS Code icons. I think we need to give credit and link to
the Creative Commons license. Is it enough to add it to the license
field and mention/link the VS Code icons in the description field?

Before doing that, I would wait until someone clarified that the icons
are really coming from [1] in the upstream issue.

In the meantime I think it's best to include my patch that removes all
icons from the source.

What do you think?

Roman


Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (24 lines)
> Hi Roman,
>
> Am Sonntag, dem 20.03.2022 um 12:21 +0100 schrieb Roman Scherer:
>>
>> Hi Liliana,
>>
>> thanks for adding the comment locally. I just checked the source of
>> LSP Treemacs and yes, they are all mentioned by name here:
>>
>> https://github.com/emacs-lsp/lsp-treemacs/blob/master/lsp-treemacs-themes.el#L38
>>
>> Is this a problem? Should the build script remove them?
>>
>> If that's the case, we could remove all those "icon themes" and just
>> leave this "Iconless" theme in the file:
>>
>> https://github.com/emacs-lsp/lsp-treemacs/blob/master/lsp-treemacs-themes.el#L209
>>
>> Roman
> Sadly, replacing these in a snippet won't be that easy, given we can't
> easily sneak emacs into it. On the topic of icons to remove, vscode-
> icons might actually be okay and are also required by default.
>
> What should we do?
-----BEGIN PGP SIGNATURE-----

iQFTBAEBCAA9FiEE0iajOdjfRIFd3gygPdpSUn0qwZkFAmI3N84fHHJvbWFuLnNj
aGVyZXJAYnVybmluZ3N3ZWxsLmNvbQAKCRA92lJSfSrBmR+bCAC+3W6KshVRWLtz
PeWxqbMsySKGN9/1edUjAcnf2l/nofgQL+eJKTf2i81akk5GHOSYSXafB/8e28Jx
k/o68AolhjDZ0dxTo3CxU8+nbWI92Uh0EOVLRf3RMmX573wPQ0vUTnqlV/N1SxKt
oalBnk/BR27WGcym8s2Wp1+Sj1h4Fo5Enn2vCK1eJUL85cDERy4xjNCx3uuQtA91
vHzedaIgoFVcftI50MyqeZsSJTgl8KlHyZYquoRvmhMeD5U3HhqBLhTHzNhluBdk
Bm8/6Oi+d/8A6JCHfRZPglZmP3Js67hDxbR5W3wN0Hb+1nz0dZnFEQ8jXEHeumeS
KMQr7a4F
=funq
-----END PGP SIGNATURE-----

L
L
Liliana Marie Prikler wrote on 20 Mar 2022 16:46
(name . Roman Scherer)(address . roman.scherer@burningswell.com)
ab7a9f2f975283879fdbc8df376016a72aa17717.camel@gmail.com
Hi Roman,

Am Sonntag, dem 20.03.2022 um 14:58 +0100 schrieb Roman Scherer:
Toggle quote (11 lines)
> Hi Liliana and Maxime,
>
> if the icons are really coming from [1], they seem to be licensed
> under the Creative Commons Attribution 4.0 International Public
> License.
>
> If it is okay to include them, I could work on a patch that only
> installs the VS Code icons. I think we need to give credit and link
> to the Creative Commons license. Is it enough to add it to the
> license field and mention/link the VS Code icons in the description
> field?
Adding the license to the field with an appropriate comment would be
enough imho. If upstream decides to make a new release, we can also
use that -- or alternatively bump to the commit.

Toggle quote (7 lines)
> Before doing that, I would wait until someone clarified that the
> icons are really coming from [1] in the upstream issue.
>
> In the meantime I think it's best to include my patch that removes
> all icons from the source.
>
> What do you think?
I'm in the "let's wait and do the correct thing" camp. Having one
commit to restrict the sources to the correct set would be more
justifiable than overreacting, particularly given the FSDG stance on
non-functional data. That said, long-term this data needs to go :)

Cheers
R
R
Roman Scherer wrote on 20 Mar 2022 18:58
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
87ils8o690.fsf@burningswell.com
Ok, sounds good to me. :)

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (31 lines)
> Hi Roman,
>
> Am Sonntag, dem 20.03.2022 um 14:58 +0100 schrieb Roman Scherer:
>> Hi Liliana and Maxime,
>>
>> if the icons are really coming from [1], they seem to be licensed
>> under the Creative Commons Attribution 4.0 International Public
>> License.
>>
>> If it is okay to include them, I could work on a patch that only
>> installs the VS Code icons. I think we need to give credit and link
>> to the Creative Commons license. Is it enough to add it to the
>> license field and mention/link the VS Code icons in the description
>> field?
> Adding the license to the field with an appropriate comment would be
> enough imho. If upstream decides to make a new release, we can also
> use that -- or alternatively bump to the commit.
>
>> Before doing that, I would wait until someone clarified that the
>> icons are really coming from [1] in the upstream issue.
>>
>> In the meantime I think it's best to include my patch that removes
>> all icons from the source.
>>
>> What do you think?
> I'm in the "let's wait and do the correct thing" camp. Having one
> commit to restrict the sources to the correct set would be more
> justifiable than overreacting, particularly given the FSDG stance on
> non-functional data. That said, long-term this data needs to go :)
>
> Cheers
-----BEGIN PGP SIGNATURE-----

iQFTBAEBCAA9FiEE0iajOdjfRIFd3gygPdpSUn0qwZkFAmI3a1sfHHJvbWFuLnNj
aGVyZXJAYnVybmluZ3N3ZWxsLmNvbQAKCRA92lJSfSrBmfY4B/sHfqc4gM3n1I0K
ooWnLw6lh9qLWbMyhZEk7uW/F1lU4NLfY9FZwXZxpKdIr1E5AmRqJXauhJOkQuql
0seDKMeqYAPkpvxgZJiR+mLCn4LN5MScIoI1/iRoO52v9d3+oxO14hNlyOPHwItZ
n0lmmY+fKI053DV1vdN25qZ7IeNGCsMIlBko1QLWu63wKLuRE6PImDsZSj8oSKry
u4OkUG3lymicyxCBcsnvIaL7NeHj0DO2+Bm4u92OzuRnMG+nSEdsL1NSqlcIJbNQ
ePhrO0R5NPRtxE/Vb0tYzQEq22trcD6EB/iAGNFERKuA14qYWqn+zco9TmB0YYmA
GEarWCU0
=sdRk
-----END PGP SIGNATURE-----

R
[PATCH v2 1/2] gnu: emacs-lsp-treemacs: Remove unclearly licensed icons.
(address . 50329@debbugs.gnu.org)
4bee3a29d44d2711e85be65dbb288e751c7fa315.camel@burningswell.com
emacs-lsp-treemacs bundles icons with unclear licenses.

* 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(-)

Toggle diff (93 lines)
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
L
L
Liliana Marie Prikler wrote on 20 Mar 2022 14:29
[PATCH v2 2/2] gnu: emacs-company-box: Remove unclearly licensed icons from source.
(address . 50329@debbugs.gnu.org)
75596332b0ea292991f0f2e7f7820879bef86a3b.camel@gmail.com
emacs-company-box bundles icons with unclear licenses.

* gnu/packages/emacs-xyz.scm (%emacs-company-box-upstream-source): New variable.
(emacs-company-box)[source]: Use a computed origin to remove unclearly licensed
icons. Also remove source code which mentions said icons.
---
gnu/packages/emacs-xyz.scm | 84 ++++++++++++++++++++++++++++++++++----
1 file changed, 77 insertions(+), 7 deletions(-)

Toggle diff (104 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index caa9b4ca6e..73f2e7a3a2 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -7845,6 +7845,15 @@ (define-public emacs-company
These are distributed in separate files and can be used individually.")
(license license:gpl3+)))
+(define* (%emacs-company-box-upstream-source #:key commit version hash)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sebastiencs/company-box")
+ (commit commit)))
+ (file-name (git-file-name "emacs-company-box" version))
+ (hash hash)))
+
(define-public emacs-company-box
;; There is no release yet. Version is extracted from the main
;; file.
@@ -7856,13 +7865,74 @@ (define-public emacs-company-box
(version (git-version version revision commit))
(source
(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/sebastiencs/company-box")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "13fgmdy51gqdwijqfvb784pirx4lgva0y7ysi0c3fcx8f82cdj59"))))
+ (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-company-box-" #$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 commit #:version version
+ #:hash
+ (content-hash
+ "13fgmdy51gqdwijqfvb784pirx4lgva0y7ysi0c3fcx8f82cdj59"))
+ 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 "images"
+ (for-each delete-file-recursively
+ '("eclipse" "idea" "netbeans")))
+
+ ;; Also remove any mentions in the source code.
+ (make-file-writable "company-box-icons.el")
+ (emacs-batch-edit-file "company-box-icons.el"
+ '(progn
+ (while (search-forward-regexp
+ "(defvar company-box-icons-\\([a-z-]*\\)"
+ nil t)
+ (pcase (match-string 1)
+ ((or "images"
+ "all-the-icons"
+ "icons-in-terminal") nil)
+ (_ (beginning-of-line)
+ (kill-sexp)))
+ (basic-save-buffer))))
+
+ ;; Also patch source to not show broken icons as configuration
+ ;; option.
+ (substitute* "company-box-icons.el"
+ (("- .*, from.*editor.*") "")
+ (("\\(const :tag \"([a-z]*)\".*\\)" all tag)
+ (if (member tag
+ '("images" "all-the-icons" "icons-in-terminal"))
+ all
+ ""))))
+
+ (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-company emacs-dash emacs-frame-local))
--
2.38.1
L
L
Liliana Marie Prikler wrote on 22 Jan 2023 10:09
Re: [PATCH v2 1/2] gnu: emacs-lsp-treemacs: Remove unclearly licensed icons.
(address . 50329-done@debbugs.gnu.org)
fe465206e3ddb085a2bbd3dd497f377d479ea433.camel@gmail.com
Am Samstag, dem 19.03.2022 um 15:33 +0100 schrieb r0man:
Toggle quote (12 lines)
> 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>
> ---
Pushed now.

Cheers
Closed
?