unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <m.othacehe@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 38612@debbugs.gnu.org
Subject: [bug#38612] Pass system and target arguments to gexp->file.
Date: Mon, 30 Dec 2019 09:40:00 +0100	[thread overview]
Message-ID: <87eewm6wbj.fsf@gmail.com> (raw)
In-Reply-To: <87k16e92t7.fsf@gnu.org>


Hey,

> Uh, it’s “the right thing” but it’s getting ugly.  :-/
>
> If we take a step back, what’s the minimal change that would solve the
> problem you’re looking at?
>
> Apologies for the back-and-forth, it’s a tricky area!

I'm glad I can have your support on this topic :)

Here's a small recap of the situation. As you may know I'm trying to get
"guix system build install.scm --target=xxx" to work.

My board needs specific initrd kernel modules to boot. As target is not
passed to lower-object in system-derivation procedure of (gnu services),
raw-initrd will try to locate those (arm specific) modules in the host
x86 kernel, where they do not exist, and fail.

The same thing happens for operating-system-boot-parameters-file which
contains a gexp->file call.

Now, while this problem is quite specific, we need to find a generic
solution to those target issues. Forcing the user of (guix gexp) to pass
a target argument implies the use of monadic style to read
%current-target-system safely.

On the other hand, defaulting to the current target inside (guix gexp)
as proposed in my patch is kinda ugly as you noticed :p

Could %current-target-system be set outside of the monadic context so
that we can access it from wherever we want?

That would also solve the issue I have with canonical-package procedure[1],
that read %current-target-system outside of the monadic context, where
is is always #f.

Thanks for your help,

Mathieu
[1]: https://lists.gnu.org/archive/html/guix-devel/2019-12/msg00353.html

  reply	other threads:[~2019-12-30  8:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-14 17:21 [bug#38612] Pass system and target arguments to gexp->file Mathieu Othacehe
2019-12-15 14:50 ` Mathieu Othacehe
2019-12-20 21:45   ` Ludovic Courtès
2019-12-24 14:11     ` Mathieu Othacehe
2019-12-25  9:42       ` Mathieu Othacehe
2019-12-26 18:04         ` Ludovic Courtès
2019-12-26 18:54           ` Mathieu Othacehe
2019-12-27 18:05             ` Ludovic Courtès
2019-12-29  9:33               ` Mathieu Othacehe
2019-12-29 22:36                 ` Ludovic Courtès
2019-12-30  8:40                   ` Mathieu Othacehe [this message]
2019-12-26 17:58       ` Ludovic Courtès
2019-12-26 18:19         ` Mathieu Othacehe
2019-12-20 21:41 ` Ludovic Courtès
2019-12-24 14:08   ` Mathieu Othacehe

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=87eewm6wbj.fsf@gmail.com \
    --to=m.othacehe@gmail.com \
    --cc=38612@debbugs.gnu.org \
    --cc=ludo@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).