GNU bug report logs - #38769
[PATCH] import: Add importer for MELPA packages.

Previous Next

Package: guix-patches;

Reported by: Carlo Zancanaro <carlo <at> zancanaro.id.au>

Date: Sat, 28 Dec 2019 02:01:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

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 38769 in the body.
You can then email your comments to 38769 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#38769; Package guix-patches. (Sat, 28 Dec 2019 02:01:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carlo Zancanaro <carlo <at> zancanaro.id.au>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 28 Dec 2019 02:01:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: guix-patches <at> gnu.org
Subject: [PATCH] import: Add importer for MELPA packages.
Date: Sat, 28 Dec 2019 12:59:40 +1100
[Message part 1 (text/plain, inline)]
Hey Guix!

I have for a while wanted to write an importer for MELPA packages 
that reads from the MELPA recipe and constructs a Guix package. 
This is primarily because the ELPA importer uses source tarballs, 
which we can't rely on for MELPA because they remove old tarballs 
and upload new ones whenever they rebuild the package.

So, here is my importer!

Probably the most controversial decision here is to always import 
the current head that MELPA would build. This means that when you 
run "guix import melpa" it gives you a package definition that 
should correspond to what MELPA currently has. This may not 
correspond to a release of the package, so we cannot easily give 
it a version, and thus I put the current date into the version 
string.

I imagine it would be possible to combine this importer with the 
current ELPA one in some way, to use all the metadata provided by 
the ELPA importer, but then generate an origin based on the MELPA 
recipe, but that seemed more daunting to me than writing a new 
importer.

Carlo

[0001-import-Add-importer-for-MELPA-packages.patch (text/x-diff, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#38769; Package guix-patches. (Tue, 07 Jan 2020 19:39:01 GMT) Full text and rfc822 format available.

Message #8 received at 38769 <at> debbugs.gnu.org (full text, mbox):

From: Brett Gilio <brettg <at> gnu.org>
To: Carlo Zancanaro <carlo <at> zancanaro.id.au>
Cc: 38769 <at> debbugs.gnu.org
Subject: Re: [bug#38769] [PATCH] import: Add importer for MELPA packages.
Date: Tue, 07 Jan 2020 13:39:02 -0600
Carlo Zancanaro <carlo <at> zancanaro.id.au> writes:

> Hey Guix!
>
> I have for a while wanted to write an importer for MELPA packages that
> reads from the MELPA recipe and constructs a Guix package. This is
> primarily because the ELPA importer uses source tarballs, which we
> can't rely on for MELPA because they remove old tarballs and upload
> new ones whenever they rebuild the package.
>
> So, here is my importer!
>
> Probably the most controversial decision here is to always import the
> current head that MELPA would build. This means that when you run
> "guix import melpa" it gives you a package definition that should
> correspond to what MELPA currently has. This may not correspond to a
> release of the package, so we cannot easily give it a version, and
> thus I put the current date into the version string.
>
> I imagine it would be possible to combine this importer with the
> current ELPA one in some way, to use all the metadata provided by the
> ELPA importer, but then generate an origin based on the MELPA recipe,
> but that seemed more daunting to me than writing a new importer.
>
> Carlo
>
>

Hi Carlo! Thanks for your contribution. I have not yet had a chance to
look at it, but I agree that we /should/ combine this with the ELPA
importer in its current tradition: `guix import elpa -a melpa`. That
seems preferable to me, as it would avoid the need to deprecate a
command flag in our UX.

What do you think?

-- 
Brett M. Gilio
GNU Guix, Contributor | GNU Project, Webmaster
[DFC0 C7F7 9EE6 0CA7 AE55 5E19 6722 43C4 A03F 0EEE]
<brettg <at> gnu.org> <brettg <at> posteo.net>




Information forwarded to guix-patches <at> gnu.org:
bug#38769; Package guix-patches. (Wed, 18 Mar 2020 02:56:02 GMT) Full text and rfc822 format available.

Message #11 received at 38769 <at> debbugs.gnu.org (full text, mbox):

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: Brett Gilio <brettg <at> gnu.org>
Cc: 38769 <at> debbugs.gnu.org
Subject: Re: [bug#38769] [PATCH] import: Add importer for MELPA packages.
Date: Wed, 18 Mar 2020 13:54:52 +1100
[Message part 1 (text/plain, inline)]
Hey Brett!

It's been a while, but I've finally found time to revisit this 
patch.

On Wed, Jan 08 2020, Brett Gilio wrote:
> ... we /should/ combine this with the ELPA importer in its 
> current tradition: `guix import elpa -a melpa`. That seems 
> preferable to me, as it would avoid the need to deprecate a 
> command flag in our UX.

I've done this.

Carlo

[0001-import-elpa-Fetch-MELPA-packages-with-a-stable-git-r.patch (text/x-diff, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#38769; Package guix-patches. (Sat, 30 May 2020 14:27:02 GMT) Full text and rfc822 format available.

Message #14 received at 38769 <at> debbugs.gnu.org (full text, mbox):

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
Cc: 38769 <at> debbugs.gnu.org
Subject: Re: [bug#38769] [PATCH] import: Add importer for MELPA packages.
Date: Sun, 31 May 2020 00:26:06 +1000
I just saw a message on guix-patches that reminded me that this was
still sitting around. Can anyone help me out getting this change into
Guix so Emacs packages are easier to import correctly?




Information forwarded to guix-patches <at> gnu.org:
bug#38769; Package guix-patches. (Sat, 25 Jul 2020 01:50:02 GMT) Full text and rfc822 format available.

Message #17 received at 38769 <at> debbugs.gnu.org (full text, mbox):

From: Brett Gilio <brettg <at> gnu.org>
To: Carlo Zancanaro <carlo <at> zancanaro.id.au>
Cc: 38769 <at> debbugs.gnu.org
Subject: Re: [bug#38769] [PATCH] import: Add importer for MELPA packages.
Date: Fri, 24 Jul 2020 20:49:35 -0500
Carlo Zancanaro <carlo <at> zancanaro.id.au> writes:

> I just saw a message on guix-patches that reminded me that this was
> still sitting around. Can anyone help me out getting this change into
> Guix so Emacs packages are easier to import correctly?

Hey Carlo,

Sorry nobody got back to you on this! I am just recently coming off of a
haitus from contributing. I have a few things still on my backlog, but I
have marked this bug for review ASAP! If somebody else can get to it
faster than me, great! If not, I will surely look it over soon!

Brett Gilio




Information forwarded to guix-patches <at> gnu.org:
bug#38769; Package guix-patches. (Fri, 18 Dec 2020 10:33:02 GMT) Full text and rfc822 format available.

Message #20 received at 38769 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Carlo Zancanaro <carlo <at> zancanaro.id.au>
Cc: 38769 <at> debbugs.gnu.org, Brett Gilio <brettg <at> gnu.org>
Subject: Re: [bug#38769] [PATCH] import: Add importer for MELPA packages.
Date: Fri, 18 Dec 2020 10:32:09 +0000
[Message part 1 (text/plain, inline)]
Carlo Zancanaro <carlo <at> zancanaro.id.au> writes:

> Hey Brett!
>
> It's been a while, but I've finally found time to revisit this
> patch.
>
> On Wed, Jan 08 2020, Brett Gilio wrote:
>> ... we /should/ combine this with the ELPA importer in its
>> current tradition: `guix import elpa -a melpa`. That seems
>> preferable to me, as it would avoid the need to deprecate a
>> command flag in our UX.
>
> I've done this.

I've had a go at trying this out, I tried importing ack from elpa and a
from melpa, and it seemed to work OK. The packages built at least, and
the outputs look reasonable.

Looking at the code, elpa-package->sexp is a little awkward, the code
would probably be clearer if the (or ...) bits in the package sexp were
moved out in to functions that deal with generating that part of the
package.

It seems to work though, so I'm happy to push this. Is this patch still
relevant?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#38769; Package guix-patches. (Fri, 18 Dec 2020 11:17:01 GMT) Full text and rfc822 format available.

Message #23 received at 38769 <at> debbugs.gnu.org (full text, mbox):

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 38769 <at> debbugs.gnu.org
Subject: Re: [bug#38769] [PATCH] import: Add importer for MELPA packages.
Date: Fri, 18 Dec 2020 22:16:13 +1100
Hi Chris!

On Fri, Dec 18 2020, Christopher Baines wrote:
> Looking at the code, elpa-package->sexp is a little awkward, the 
> code would probably be clearer if the (or ...) bits in the 
> package sexp were moved out in to functions that deal with 
> generating that part of the package.

I agree with you. The "quasiquote, unquote, quasiquote, unquote" 
is a bit awkward, but I don't think it's unreasonable. I'm not 
that interested in revising the patch right now, but feel free to 
extract that logic before merging if you think it's necessary.

> It seems to work though, so I'm happy to push this. Is this 
> patch still relevant?

Yep, as far as I know this is still relevant.

Carlo




Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Fri, 18 Dec 2020 12:41:01 GMT) Full text and rfc822 format available.

Notification sent to Carlo Zancanaro <carlo <at> zancanaro.id.au>:
bug acknowledged by developer. (Fri, 18 Dec 2020 12:41:01 GMT) Full text and rfc822 format available.

Message #28 received at 38769-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Carlo Zancanaro <carlo <at> zancanaro.id.au>
Cc: 38769-done <at> debbugs.gnu.org
Subject: Re: [bug#38769] [PATCH] import: Add importer for MELPA packages.
Date: Fri, 18 Dec 2020 12:40:26 +0000
[Message part 1 (text/plain, inline)]
Carlo Zancanaro <carlo <at> zancanaro.id.au> writes:

> Hi Chris!
>
> On Fri, Dec 18 2020, Christopher Baines wrote:
>> Looking at the code, elpa-package->sexp is a little awkward, the
>> code would probably be clearer if the (or ...) bits in the
>> package sexp were moved out in to functions that deal with
>> generating that part of the package.
>
> I agree with you. The "quasiquote, unquote, quasiquote, unquote" is a
> bit awkward, but I don't think it's unreasonable. I'm not that
> interested in revising the patch right now, but feel free to extract
> that logic before merging if you think it's necessary.
>
>> It seems to work though, so I'm happy to push this. Is this patch
>> still relevant?
>
> Yep, as far as I know this is still relevant.

Cool, I've gone ahead and pushed this as
b129b43475442b1da43d8209914fee215f98aa29. Hopefully it'll be helpful.

Thanks,

Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 16 Jan 2021 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 99 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.