unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Mathieu Othacehe <othacehe@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Canonical-packages restoration.
Date: Tue, 09 Jun 2020 18:34:48 +0200	[thread overview]
Message-ID: <875zc0gpuf.fsf@gnu.org> (raw)
In-Reply-To: <87zh9co7xq.fsf@gnu.org> (Mathieu Othacehe's message of "Tue, 09 Jun 2020 12:22:09 +0200")

Hi,

Mathieu Othacehe <othacehe@gnu.org> skribis:

> With f30d84d32db0f4f6cb84e139868e1727a7dc0a51 and
> dfc8ccbf5da96a67eb1cade499f0def21e7fdb02, I did remove most of the
> "canonical-package" calls because they were breaking system
> cross-compilation.
>
> Now, I'd like to somehow restore them, using the new "let-system". 

What if, instead, we removed those “canonical” packages entirely from
the reference graph?  Do you think that’s an option?

> My idea is to define something like:
>
> (define (canonical-package* package)
>   (let ((canonical
>          (module-ref (resolve-interface '(gnu packages base))
>                      'canonical-package)))
>     (let-system (system target)
>       (if target
>           package
>           (canonical package)))))

Aren’t there pieces of code that expect these things to be <package>
records?

> However, it seems that nesting a "let-system" inside "file-append" does
> not work:
>
> (use-modules (guix))
> (use-modules (gnu))
>
> (run-with-store (open-connection)
>   (mlet* %store-monad
>       ((drv (lower-object
>              (computed-file "computed"
>                             #~(begin
>                                 (mkdir #$output)
>                                 (symlink #$(file-append
>                                             (let-system (s t) glibc) "/bin")
>                                          (string-append #$output "/ref"))))))
>        (output -> (derivation->output-path drv)))
>     (mbegin %store-monad
>       (built-derivations (list drv))
>       (return (format #t "~a~%" output)))))
>
> and it prevents me from going further. Does this stuff make any sense?
> If yes I can try to fix it, but I just want to be sure first :)

Bah yes, that’s why initially I didn’t push ‘let-system’:

  https://issues.guix.gnu.org/29296#4

Perhaps we could avoid the expander = #f special case.

Thanks,
Ludo’.


  parent reply	other threads:[~2020-06-09 16:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 10:22 Canonical-packages restoration Mathieu Othacehe
2020-06-09 11:18 ` Jan Nieuwenhuizen
2020-06-09 11:30   ` Mathieu Othacehe
2020-06-09 16:34 ` Ludovic Courtès [this message]
2020-06-10  9:35   ` Mathieu Othacehe
2020-06-10 15:24     ` 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=875zc0gpuf.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=othacehe@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).