From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id yEyINQU+kWauAwAAe85BDQ:P1 (envelope-from ) for ; Fri, 12 Jul 2024 14:30:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id yEyINQU+kWauAwAAe85BDQ (envelope-from ) for ; Fri, 12 Jul 2024 16:30:29 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=gyRNqsul; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1720794629; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=veSNzN+PGIMOP7fdnLtsSjYf0Am1sAYfUakBLHDASBA=; b=GTV7eHTACEy98EvYZBpTijY1g2vCsyzJKHgPaAynLVJTFhNlg/bW16GV5QQb7U2QHPms/I N45jWrGAN3eVMZbFChOUcSyBQ0Y46+nz/0XLFA8gM7iAXk92Ht5zTthGw53dIhEsEhLTrE rU1UMYTCCCqXeQeO4nMqCuG9P0Xq+xa+98xx+EyXKj3BfsQLN5h5hJVjlNYr5tY70ZZKWp ItTwhThW6f+hGqVB5tZyOEYTv13sWQV7H29UeU4ZkJfY7aDGXkllalWdnnrjo0RqJdF2mF tNSDCKEWPHbCiRN2CgPBZX0aqwrvyR2UDFKxg43Syxq/BtLAXmU+toANLJ26Zg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=gyRNqsul; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720794629; a=rsa-sha256; cv=none; b=XX00rJisys8rpRBfutSOf+zebRRKdnvUQLnT/XOTzVVYv2RFjCKxXX6h4TLqOY5639I2X2 mOwlvY5XQJD5yGA1zWHoqaNMDbWziSLJqKBLCGRZDKqYDbdVS303pjzbKe7NGOjGX8NPNv hZe/zs8qE5Mv9jz5N0LbmkpVWUAM2ErRHK7a9uMl1C+u26oE3R0tOuwjWpyfi1SOs0oThZ ee84cmIs/DJCUO+qFoTuWVayhmxm9URKzHsWCEL7rPgNrmpjwAuCBxRdVCfJAtJa4Y7lic VyRJ6s4xjamaoD7rw0idYH7eoSCWnXtN4tSIFLZbKy84nHFiyg74JKyMZlifGw== 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 73B2E6CAE6 for ; Fri, 12 Jul 2024 16:30:29 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSHHn-0002pv-IU; Fri, 12 Jul 2024 10:30:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sSHHf-0002Sr-Ar for guix-patches@gnu.org; Fri, 12 Jul 2024 10:30:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sSHHe-00075Y-QA for guix-patches@gnu.org; Fri, 12 Jul 2024 10:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sSHHe-0002mw-V2 for guix-patches@gnu.org; Fri, 12 Jul 2024 10:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70985] [PATCH v3 5/6] gnu: rust: Guard against unsupported rust targets. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 12 Jul 2024 14:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70985 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 70985@debbugs.gnu.org Received: via spool by 70985-submit@debbugs.gnu.org id=B70985.172079455010534 (code B ref 70985); Fri, 12 Jul 2024 14:30:02 +0000 Received: (at 70985) by debbugs.gnu.org; 12 Jul 2024 14:29:10 +0000 Received: from localhost ([127.0.0.1]:54573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSHGn-0002jo-Te for submit@debbugs.gnu.org; Fri, 12 Jul 2024 10:29:10 -0400 Received: from mail-qk1-f171.google.com ([209.85.222.171]:53450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSHGl-0002jc-CY for 70985@debbugs.gnu.org; Fri, 12 Jul 2024 10:29:08 -0400 Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-79ef72bb8c8so103868985a.2 for <70985@debbugs.gnu.org>; Fri, 12 Jul 2024 07:29:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720794486; x=1721399286; darn=debbugs.gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=veSNzN+PGIMOP7fdnLtsSjYf0Am1sAYfUakBLHDASBA=; b=gyRNqsulHsM+v/UXr6mPKrfr0+td6zJX0j7Ojd/K/RzCd1fu1SOGSFaybplmwVZh1N 4Yl6a0zwHtRoWBYkvE/JGHscVg/C+zuObWsemG1mz+yGzdoCnozq2pBf/vCRwbRQEyGH aNflUKTnKR7tdoBRiFvtgwXoiBX1x382jT/CNVfmUnoCKy2Ax8rTYdQB4rtctX1qGJDV u3ayjwSrEdj4fJabsluQJ4MMQ08QdTBdJji88IgFHzvDrsBJ5NcK+lLcjhlNGv9H7NKR 9WNIvFqDol9fWiRjXNhWfuCP09Qz9fpWsQlKMLHKonPTByoN2Y9djnfcIY1HhQG9mY6Y sKTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720794486; x=1721399286; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=veSNzN+PGIMOP7fdnLtsSjYf0Am1sAYfUakBLHDASBA=; b=BdQ9Mj6IdqttEnQyxo95aTmaHbkjw4QLaaVx/V9QdIXarxf5ThbEqR9gB9HSd+eg/b D0TWyaJZAPqfZ83R0ctHACkvKgt4Ss5jPUspKPt/zPan4rACNUxGqQF7Ws9ySkCIzDBE xxvOMg5uFXGItY7utHhQLUR2ZCcVvhFVohPxYbdWZSYeGs9gUkTPXWqFCqca/+wG3pZB vAi5GmYU1l/Fnbp0d1sHyL9nGCZaBQDCj8mZFonlbJUu2pcfco6/+tkQOXV5LKQ95DF+ Y9cjq65S82SiZQNkqZKuWNvTx0/Rh7K4gY9t2Ib4OVLiYd02jkSOxKDMZcRDtfDyzh5Q aLUw== X-Gm-Message-State: AOJu0YxaclQ71pJekQk+Y/wh1qGHJ9kX3cktOeVVxuqKxMeu7vQxtcMx Iaiz6dgoRbCfDumwp39Mytfcll+TeM+pZl87GERxL2j63jyrfu1WvMlMxcMr X-Google-Smtp-Source: AGHT+IFQUlQtwN+n1tr6/WM7Qm6UBHRIwlAf8eNG6VPjCa6cT1+JUuTbAzqUwuqCJNgvqYiRAW02Cw== X-Received: by 2002:a05:6214:5002:b0:6b5:4435:fe50 with SMTP id 6a1803df08f44-6b61bf1b90cmr136740646d6.37.1720794486342; Fri, 12 Jul 2024 07:28:06 -0700 (PDT) Received: from localhost (ool-ad039216.dyn.optonline.net. [173.3.146.22]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b61baa24efsm35269826d6.142.2024.07.12.07.28.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jul 2024 07:28:05 -0700 (PDT) Date: Fri, 12 Jul 2024 17:28:04 +0300 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Christopher Baines , 70985@debbugs.gnu.org References: <7783ce71e892ea74f025323e0a4d323ee8e720fc.1720791705.git.mail@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="o/D4t53RoYsaTejo" Content-Disposition: inline In-Reply-To: X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -4.00 X-Migadu-Queue-Id: 73B2E6CAE6 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -4.00 X-TUID: gOw5AReDF6+t --o/D4t53RoYsaTejo Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I like this. We can always add more platforms later with their platform-rust-target later as needed. On Fri, Jul 12, 2024 at 02:41:44PM +0100, Christopher Baines wrote: > As cross-libc may return #f in this case, and the config.toml file > construction will also fail if the platform rust-target is #f.. >=20 > * gnu/packages/rust.scm (make-rust-sysroot/implementation): Guard against > unsupported rust targets. >=20 > Change-Id: Ia0d5c889c6f5cd3478ad985c79feb9ba1c472c29 > --- > gnu/packages/rust.scm | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) >=20 > diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm > index a385344473..8119f4560a 100644 > --- a/gnu/packages/rust.scm > +++ b/gnu/packages/rust.scm > @@ -73,7 +73,9 @@ (define-module (gnu packages rust) > #:use-module (ice-9 match) > #:use-module (ice-9 optargs) > #:use-module (srfi srfi-1) > - #:use-module (srfi srfi-26)) > + #:use-module (srfi srfi-26) > + #:use-module (srfi srfi-34) > + #:use-module (srfi srfi-35)) > =20 > ;; This is the hash for the empty file, and the reason it's relevant is = not > ;; the most obvious. > @@ -1309,6 +1311,13 @@ (define*-public (make-rust-sysroot target) > =20 > (define make-rust-sysroot/implementation > (mlambda (target base-rust) > + (unless (platform-rust-target (lookup-platform-by-target target)) > + (raise > + (condition > + (&package-unsupported-target-error > + (package base-rust) > + (target target))))) > + > (package > (inherit base-rust) > (name (string-append "rust-sysroot-for-" target)) > --=20 > 2.45.2 >=20 >=20 >=20 --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --o/D4t53RoYsaTejo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmaRPWwACgkQQarn3Mo9 g1GyLw/9ENHYfAbUz/t6L2R24zjxVVvUykYpqscV1mSRcbJeoG6fCby09IRUO7Lo /k1ReuqBjpD1swLwj5XSe0B3WOZl6mJ2/oWJgts8f8Gidsqf1Luq7PFnCUpkbuS0 ACB14m6kZ8zCsZGtZTwDheTQ9l2OOOyCPVY+k5nU8t+Y0KZjAkii5KVvLdZc2Gv3 zB4NiTMBYoVT5MXRfqThkx8U5hwvxkwJhaCq49VqIAbg/KDTe+dS3+R4ZDyNQfhz xSJ34GX6K7UgC1WezU57iYz/3WmeoHznxcIhDlGFjlwhWlE4ptp46PU86Q2CigL4 e7njDBSiaQcjIuPZAtbkx4CUKa1bGHVjebwaC/UnRe5wC4+Up5ICMI/IMae/ongn Q2av/+5jB9N/FdeFs24G8594r3B/MhKaCDCj+qdU3rp7PxiK7zAIysonqK6drcvp wVfc5VxUqSUkidJ8D+6cLzZz1QKuF7V5BgdqeTPgtG99bGhvUYWIhGVF2hgwpIt1 JEKl6G8FC3vRiSrUIJbN1SPK0+Cb45q2p8j8iSc7H7SkLV3nuGGruoZlTKx0uCSo NWzscRAyRlkng8z/sa+nYy14QmvZoUPFeTg7GOWXKJoeRO3US/aqs1fF55ZzoWaY LpHms0pxJMXvJigsnanxPi+UbBDP3OiXrt+8pmahekEQ2g3EskQ= =WsDJ -----END PGP SIGNATURE----- --o/D4t53RoYsaTejo--