Hi, Mathieu Othacehe <othac...@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’.