From: 宋文武 <iyzsong@outlook.com>
To: zimoun <zimon.toutoune@gmail.com>
Cc: guix-devel@gnu.org
Subject: Make mutiple packages from outputs (Was: A plan for parameterized packages)
Date: Mon, 16 Nov 2020 19:25:16 +0800 [thread overview]
Message-ID: <OS0P286MB0178B0868A696957C1E6FD2BA3E30@OS0P286MB0178.JPNP286.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <86mtzis4lf.fsf@gmail.com> (zimoun's message of "Sun, 15 Nov 2020 22:16:44 +0100")
zimoun <zimon.toutoune@gmail.com> writes:
> Dear,
>
> On Sun, 15 Nov 2020 at 21:46, Danny Milosavljevic <dannym@scratchpost.org> wrote:
>
>> * Enable/disable building the documentation. I really don't need a 40 MiB
>> manual stored onto a 16 MiB firmware flash chip. If that's better done as an
>> extra output, fair enough.
>
> Related (I hope) is: build packages with several outputs. For instance,
> ’git’ has several 'outputs' ("send-email", "svn", etc.), so the list of
> "inputs" provides e.g., "subversion" even if I am only interested by
> e.g., "git:send-email". This matters about closure.
>
> And it is maybe an occasion to revisit the museum, i.e., the TODO file:
>
> ** extend ‘propagated-build-inputs’ with support for multiple outputs
>
> #+BEGIN_SRC scheme
> (outputs '("out" "include"))
> (propagated-build-inputs
> `(((("i1" ,p1 "o1")
> ("i2" ,p2))
> => "include")
> ("i3" ,p3)))
> #+END_SRC
>
> For one reference:
>
> <https://lists.gnu.org/archive/html/guix-devel/2020-06/msg00284.html>
>
>
> All the best,
> simon
I'd like to suggest another plan: Make every ‘output’ become a <package>
object, so ‘propagated-build-inputs’ doesn’t need to change. Then we’ll
have something like debian’s source/binary packages [1] and archlinux’s
base/split packages [2].
Example:
--8<---------------cut here---------------start------------->8---
(define-public %gtk+
(source-package
(name "gtk+")
(version "3.24.20")
(source ...)
(inputs ...)
(native-inputs ...)
(outputs
`(("out" .
(binary-package
(name "gtk+") ; version inherit from source
(propagated ...) ; per output propagated-inputs here
(native-search-paths ...)
(synopsis ...) ; can override package metadata
(description ...)))
("gtk-update-icon-cache" .
(binary-package
(name "gtk-update-icon-cache")
...))))
(arguments ...)
(home-page ...)
(synopsis ...)
(descirption ...)
(license ...)))
(define-public gtk+
(source-package->binary-package %gtk+ "out"))
(define-public gtk-update-icon-cache
(source-package->binary-package %gtk+ "gtk-update-icon-cache"))
--8<---------------cut here---------------end--------------->8---
[1] https://sources.debian.org/src/gtk+3.0/3.24.23-2/debian/control/
[2] https://github.com/archlinux/svntogit-packages/blob/packages/gtk3/trunk/PKGBUILD
We'll have to build some compatibility layer with existing ‘package’ and
adjust UI though. I think this is possible and will bring various
benefits!
next prev parent reply other threads:[~2020-11-16 11:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-15 16:33 A plan for parameterized packages Ludovic Courtès
2020-11-15 17:30 ` Nicolò Balzarotti
2020-11-15 17:40 ` Nicolò Balzarotti
2020-11-15 17:44 ` Pierre Neidhardt
2020-11-15 18:09 ` zimoun
2020-11-16 11:50 ` Ludovic Courtès
2020-11-16 12:03 ` Pierre Neidhardt
2020-11-16 14:05 ` zimoun
2020-11-15 17:37 ` zimoun
2020-11-16 11:54 ` Ludovic Courtès
2020-11-15 18:51 ` Taylan Kammer
2020-11-15 20:46 ` Danny Milosavljevic
2020-11-15 21:16 ` zimoun
2020-11-16 11:25 ` 宋文武 [this message]
2020-11-16 14:53 ` Make mutiple packages from outputs Ludovic Courtès
2020-11-16 15:10 ` Make mutiple packages from outputs (Was: A plan for parameterized packages) zimoun
2020-11-15 21:24 ` A plan for parameterized packages raingloom
2020-11-16 1:54 ` Ryan Prior
2020-11-16 5:38 ` Clozure size zimoun
2020-11-18 1:30 ` A plan for parameterized packages Denis 'GNUtoo' Carikli
2020-11-20 11:39 ` Ludovic Courtès
2020-11-20 14:38 ` zimoun
2020-11-20 19:44 ` Christopher Baines
2020-11-16 14:51 ` Ludovic Courtès
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=OS0P286MB0178B0868A696957C1E6FD2BA3E30@OS0P286MB0178.JPNP286.PROD.OUTLOOK.COM \
--to=iyzsong@outlook.com \
--cc=guix-devel@gnu.org \
--cc=zimon.toutoune@gmail.com \
/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).