From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id u62yMWC/315ORgAA0tVLHw (envelope-from ) for ; Tue, 09 Jun 2020 16:57:04 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 8CdHLWC/316+egAAB5/wlQ (envelope-from ) for ; Tue, 09 Jun 2020 16:57:04 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2D1DE9401CD for ; Tue, 9 Jun 2020 16:57:04 +0000 (UTC) Received: from localhost ([::1]:39550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihYc-0003zk-Ty for larch@yhetil.org; Tue, 09 Jun 2020 12:57:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jihDA-0005Dw-3H for guix-devel@gnu.org; Tue, 09 Jun 2020 12:34:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45107) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihD9-00027x-Nn for guix-devel@gnu.org; Tue, 09 Jun 2020 12:34:51 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=34618 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jihD8-00057G-U9; Tue, 09 Jun 2020 12:34:51 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Mathieu Othacehe Subject: Re: Canonical-packages restoration. References: <87zh9co7xq.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 Prairial an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 09 Jun 2020 18:34:48 +0200 In-Reply-To: <87zh9co7xq.fsf@gnu.org> (Mathieu Othacehe's message of "Tue, 09 Jun 2020 12:22:09 +0200") Message-ID: <875zc0gpuf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: 0.49 X-TUID: wgHMAyjuEmBk Hi, Mathieu Othacehe 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".=20 What if, instead, we removed those =E2=80=9Ccanonical=E2=80=9D packages ent= irely from the reference graph? Do you think that=E2=80=99s 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=E2=80=99t there pieces of code that expect these things to be 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) "/bi= n") > (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=E2=80=99s why initially I didn=E2=80=99t push =E2=80=98let-sy= stem=E2=80=99: https://issues.guix.gnu.org/29296#4 Perhaps we could avoid the expander =3D #f special case. Thanks, Ludo=E2=80=99.