GNU bug report logs -
#50329
Missing icon folder in emacs-lsp-treemacs package.
Previous Next
Reported by: cayetano.santos <at> inventati.org
Date: Wed, 1 Sep 2021 23:45:01 UTC
Severity: normal
Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50329 in the body.
You can then email your comments to 50329 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#50329
; Package
guix
.
(Wed, 01 Sep 2021 23:45:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
cayetano.santos <at> inventati.org
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Wed, 01 Sep 2021 23:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
https://github.com/emacs-lsp/lsp-treemacs
the icons folder is present.
Additionally, when installing from melpa, I observe that the icons
folder gets installed.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#50329
; Package
guix
.
(Sat, 19 Mar 2022 16:38:01 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
[0001-Bundle-emacs-lsp-treemacs-icons.patch (text/x-patch, attachment)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#50329
; Package
guix
.
(Sat, 19 Mar 2022 20:12:02 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#50329
; Package
guix
.
(Sun, 20 Mar 2022 09:14:02 GMT)
Full text and
rfc822 format available.
Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <at> 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 <at> 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]]
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#50329
; Package
guix
.
(Sun, 20 Mar 2022 09:42:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 50329 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#50329
; Package
guix
.
(Sun, 20 Mar 2022 10:41:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 50329 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
[0001-Remove-lsp-treemacs-icons-from-source.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
Maxime Devos <maximedevos <at> telenet.be> writes:
> [[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]]
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#50329
; Package
guix
.
(Sun, 20 Mar 2022 11:16:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 50329 <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-guix <at> gnu.org
:
bug#50329
; Package
guix
.
(Sun, 20 Mar 2022 11:26:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 50329 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
Liliana Marie Prikler <liliana.prikler <at> gmail.com> writes:
> 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
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#50329
; Package
guix
.
(Sun, 20 Mar 2022 13:11:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 50329 <at> debbugs.gnu.org (full text, mbox):
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?
Information forwarded
to
bug-guix <at> gnu.org
:
bug#50329
; Package
guix
.
(Sun, 20 Mar 2022 14:20:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 50329 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
[1] https://github.com/microsoft/vscode-icons
Liliana Marie Prikler <liliana.prikler <at> gmail.com> writes:
> 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?
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#50329
; Package
guix
.
(Sun, 20 Mar 2022 15:47:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 50329 <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-guix <at> gnu.org
:
bug#50329
; Package
guix
.
(Sun, 20 Mar 2022 18:00:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 50329 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ok, sounds good to me. :)
Liliana Marie Prikler <liliana.prikler <at> gmail.com> writes:
> 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
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#50329
; Package
guix
.
(Fri, 06 Jan 2023 18:16:01 GMT)
Full text and
rfc822 format available.
Message #41 received at 50329 <at> debbugs.gnu.org (full text, mbox):
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 <at> 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
Information forwarded
to
bug-guix <at> gnu.org
:
bug#50329
; Package
guix
.
(Fri, 06 Jan 2023 18:16:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 50329 <at> debbugs.gnu.org (full text, mbox):
emacs-company-box bundles icons with unclear licenses.
Confer <https://github.com/emacs-lsp/lsp-treemacs/issues/123>.
* 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(-)
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
Reply sent
to
Liliana Marie Prikler <liliana.prikler <at> gmail.com>
:
You have taken responsibility.
(Sun, 22 Jan 2023 09:10:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
cayetano.santos <at> inventati.org
:
bug acknowledged by developer.
(Sun, 22 Jan 2023 09:10:02 GMT)
Full text and
rfc822 format available.
Message #49 received at 50329-done <at> debbugs.gnu.org (full text, mbox):
Am Samstag, dem 19.03.2022 um 15:33 +0100 schrieb r0man:
> 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 <at> gmail.com>
> ---
Pushed now.
Cheers
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 19 Feb 2023 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 143 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.