guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Canonical-packages restoration.


From: Ludovic Courtès
Subject: Re: Canonical-packages restoration.
Date: Tue, 09 Jun 2020 18:34:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]