From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Andreas Enge <andreas@enge.fr>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: What should "guix build --source" produce? (was Re: Dependency cycle issues when using a Gexp-based snippet)
Date: Fri, 11 Sep 2020 14:22:44 -0400 [thread overview]
Message-ID: <87lfhg6umj.fsf@gmail.com> (raw)
In-Reply-To: <20200908072249.GA1469@jurong> (Andreas Enge's message of "Tue, 8 Sep 2020 09:22:49 +0200")
Andreas Enge <andreas@enge.fr> writes:
> Hello Mark,
>
> On Tue, Sep 08, 2020 at 12:07:01AM -0400, Mark H Weaver wrote:
>> > + (let ((coreutils #+(canonical-package coreutils)))
>> > + (substitute* "configure"
>> > + (("/bin/pwd")
>> > + (string-append coreutils "/bin/pwd")))
>> > + (substitute* "src/corelib/global/global.pri"
>> > + (("/bin/ls")
>> > + (string-append coreutils "/bin/ls"))))
>> > + #t)))))
>>
>> In my opinion, "guix build --source PACKAGE" should produce sources that
>> can be used to build the package on any system that the upstream package
>> supports, not just on Guix systems.
>
> that sounds good to me, in particular taking your subsequent arguments into
> account. Guix sources could be just as useful as Debian sources in this
> respect. Could this not be the elusive boundary between preparing the source
> and adding a phase to the build arguments?
Yes, this sounds like it! How about the following section, to help
contributors decide between the two?
--8<---------------cut here---------------start------------->8---
1 file changed, 14 insertions(+)
doc/contributing.texi | 14 ++++++++++++++
modified doc/contributing.texi
@@ -369,6 +369,7 @@ needed is to review and apply the patch.
* Package Naming:: What's in a name?
* Version Numbers:: When the name is not enough.
* Synopses and Descriptions:: Helping users find the right package.
+* Snippets versus Phases:: Whether to use a snippet, or a build phase.
* Python Modules:: A touch of British comedy.
* Perl Modules:: Little pearls.
* Java Packages:: Coffee break.
@@ -599,6 +600,19 @@ Gettext}):
for the X11 resize-and-rotate (RandR) extension. @dots{}")
@end example
+@node Snippets versus phases
+@subsection Snippets versus phases
+
+@cindex snippets, when to use
+The boundary between using an origin snippet versus a build phase to
+modify the sources of a package can be elusive. Origin snippets are
+typically used to remove unnecessary files such as bundled libraries,
+nonfree sources, or to apply simple substitutions. The source derived
+from an origin should produce a source that can be used to build the
+package on any system that the upstream package supports (i.e., act as
+the corresponding source). In particular, origin patches or snippets
+must not embed store items in the sources; such patching should rather
+be done using build phases.
@node Python Modules
@subsection Python Modules
--8<---------------cut here---------------end--------------->8---
Thanks,
Maxim
next prev parent reply other threads:[~2020-09-11 18:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 2:10 Dependency cycle issues when using a Gexp-based snippet maxim.cournoyer
2020-08-24 21:09 ` Ludovic Courtès
2020-09-02 15:08 ` Maxim Cournoyer
2020-09-07 9:30 ` Ludovic Courtès
2020-09-14 16:55 ` Maxim Cournoyer
2020-09-16 10:08 ` Ludovic Courtès
2020-09-07 18:30 ` Mark H Weaver
2020-09-16 10:00 ` Ludovic Courtès
2020-09-08 4:07 ` What should "guix build --source" produce? (was Re: Dependency cycle issues when using a Gexp-based snippet) Mark H Weaver
2020-09-08 7:22 ` Andreas Enge
2020-09-11 18:22 ` Maxim Cournoyer [this message]
2020-09-11 18:42 ` zimoun
2020-09-11 20:40 ` Andreas Enge
2020-09-11 18:26 ` Maxim Cournoyer
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=87lfhg6umj.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=andreas@enge.fr \
--cc=guix-devel@gnu.org \
/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).