all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "(" <paren@disroot.org>
To: "zimoun" <zimon.toutoune@gmail.com>, "jgart" <jgart@dismail.de>,
	"Guix Help" <help-guix@gnu.org>
Subject: Re: which package gets built first?
Date: Fri, 04 Nov 2022 16:39:29 +0000	[thread overview]
Message-ID: <CO3NRID7T8GO.3W18QTG1RQ0G4@guix-framework> (raw)
In-Reply-To: <86wn8b3v8e.fsf@gmail.com>

Heya,

On Fri Nov 4, 2022 at 9:49 AM GMT, zimoun wrote:
> Other said, the CLI is somehow parsed from right to left.

Probably because:

  args: (pkg1 pkg2 pkg3)
  cmds: ()

  args: (pkg2 pkg3)
  cmds: ((install . pkg1))

  args: (pkg3)
  cmds: ((install . pkg2)
         (install . pkg1))

  args: ()
  cmds: ((install . pkg3)
         (install . pkg2)
         (install . pkg1))

I suppose we could add a reverse in this procedure, defined within
guix/scripts/package.scm's options->installable:

  (define to-install
    (filter-map (match-lambda
                  (('install . (? package? p))
                   ;; When given a package via `-e', install the first of its
                   ;; outputs (XXX).
                   (package->manifest-entry* (transform p) "out"))
                  (('install . (? string? spec))
                   (if (store-path? spec)
                       (store-item->manifest-entry spec)
                       (let-values (((package output)
                                     (specification->package+output spec)))
                         (package->manifest-entry* (transform package)
                                                   output))))
                  (('install . obj)
                   (leave (G_ "cannot install non-package object: ~s~%")
                          obj))
                  (_
                   #f))
                opts))

    -- (


  reply	other threads:[~2022-11-04 16:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04  5:34 which package gets built first? jgart
2022-11-04  5:35 ` jgart
2022-11-04  9:49 ` zimoun
2022-11-04 16:39   ` ( [this message]
2022-11-04 19:40     ` zimoun

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CO3NRID7T8GO.3W18QTG1RQ0G4@guix-framework \
    --to=paren@disroot.org \
    --cc=help-guix@gnu.org \
    --cc=jgart@dismail.de \
    --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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.