From: zimoun <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>, "Xinglu Chen" <public@yoctocell.xyz>
Cc: 48999@debbugs.gnu.org
Subject: [bug#48999] [PATCH] import: hackage: Accept local source for package.
Date: Wed, 30 Jun 2021 16:10:51 +0200 [thread overview]
Message-ID: <86pmw3789g.fsf@gmail.com> (raw)
In-Reply-To: <877dibpv8o.fsf@gnu.org>
Hi,
On Wed, 30 Jun 2021 at 11:17, Ludovic Courtès <ludo@gnu.org> wrote:
>>> Xinglu Chen <public@yoctocell.xyz> skribis:
>>>> (define-values (ghc-haskeme deps)
>>>> (call-with-input-file "haskeme.cabal"
>>>> (lambda (port)
>>>> (hackage->guix-package
>>>> "haskeme"
>>>> #:port port
>>>> #:source (local-file "." "haskeme-checkout"
>>>> #:recursive? #t
>>>> #:select? hg-predicate)))))
>>>>
>>>> ghc-haskeme
>>>>
>>>> Invoking ‘guix build -f guix.scm’ would then always build an up-to-date
>>>> version of the package.
[...]
>>> What I don’t get is that this functionality doesn’t seem to be available
>>> from the CLI, which the patch doesn’t change. Or am I missing
>>> something?
>>
>> No, I don’t think this functionality is available from the CLI since
>> ‘hackage->guix-package’ is not called with the #:source keyword
>> argument.
>
> IOW, this functionality is not accessible, unless you use the Scheme API
> as in the example above, right?
>
>> Once all the other importers (or those where it makes sense to do
>> this) get this functionality, it would be a good idea to add an option
>> for reading a .cabal/setup.py/whatever file and generating a package
>> definition from that.
>
> ‘guix import hackage’ could support it even if other importers don’t
> have equivalent functionality, no?
From my understanding, there are 2 levels:
1. simplify the Scheme snippet for developing local “foreign” package,
i.e., “guix build -f guix.scm” with a simpler ’guix.scm’ file.
2. an option to import local package,
e.g., “guix import hackage --path=.”
and this for (almost) all the importers.
Cheers,
simon
next prev parent reply other threads:[~2021-06-30 14:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-13 9:46 [bug#48999] [PATCH] import: hackage: Accept local source for package Xinglu Chen
2021-06-29 9:44 ` Ludovic Courtès
2021-06-29 19:00 ` Xinglu Chen
2021-06-30 9:17 ` Ludovic Courtès
2021-06-30 14:10 ` zimoun [this message]
2021-07-04 10:43 ` Xinglu Chen
2021-07-04 11:53 ` [bug#48999] [PATCH v2 0/3] Import Haskell packages from the local filesystem Xinglu Chen
2021-07-04 11:54 ` [bug#48999] [PATCH v2 1/3] import: hackage: Accept local source for package Xinglu Chen
2021-07-04 11:54 ` [bug#48999] [PATCH v2 2/3] import: utils: Add predicates for checking VCS repositories Xinglu Chen
2021-07-04 11:54 ` [bug#48999] [PATCH v2 3/3] scripts: import: hackage: Add option to import package from local filesystem Xinglu Chen
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=86pmw3789g.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=48999@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=public@yoctocell.xyz \
/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).