From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id iJbgGdMykWZ9QwEAqHPOHw:P1 (envelope-from ) for ; Fri, 12 Jul 2024 13:42:43 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id iJbgGdMykWZ9QwEAqHPOHw (envelope-from ) for ; Fri, 12 Jul 2024 15:42:43 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1720791763; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: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; bh=uykApSBzAEP2zXz8s36Cgf1l2TCgwiCSPDv+sYn8QbU=; b=NlQfoso7A+rHUVjm4W3rNsy+VhOCiHXK6XJrioQfLQWkco4vZuXTzGsf5MmB6dGM/E9uhX 3wYM5bNnVb0iddXuA6bdrNIVIr9f9d8iIf1SWQ42pPDtO9vPAqAbwsPqNQuTEGl9fzBJlT DTMkOd5iXPYyzi8r6ZqXFK6lNokR71HMPVJhk/1UGtdI7efpvK589CGGZSe0GXZ3R3QQMC 9MiNsy/3PuRFEtlwZx0BLuMxA7kL2RDUma6DhDLx143qgBh24d5S+yqJXj14Jr1E+tnGFu OxeNTXpMH1oqw0ugHaT+98iyEXr+ZDbmrhZ0MqzSIEDn/g9u+sOxP7rVcyxZQw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720791763; a=rsa-sha256; cv=none; b=RylsHrD6qn3GEUCU88wRwTiYocr3WXDeUa4ypOtory7dFRKrrl3Op4Tv3GUwWhZR/47Kqz r7wLAG58o+ixtai23XWezJJX5ofmZ88cfDchCh2Jqm1E7qzTzx2DrdFk1e6OHR+7WvpI7u VcqMbHTmwmKmrlCLQGZvojHSWJyNQ2P24Hx4Oo6cWUwtAYGVbnnYC5aJpk90MvDB/MY+hs 4ukEtSm55S4+PiiE7vjujzrwhYzKOBauNx2AmIvi1qJpD9u+Zl7BhZAfYzKPllYxmbVpMz 3oOCHx/gjG6ytArR++15yvdWtlytp8w2CV7NYVuT6FfoQmo4mnL2xYlEzTSTiQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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" 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 4DBDC19EF0 for ; Fri, 12 Jul 2024 15:42:43 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSGXE-0002vl-Pz; Fri, 12 Jul 2024 09:42:04 -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 1sSGXC-0002ov-Sd for guix-patches@gnu.org; Fri, 12 Jul 2024 09:42:02 -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 1sSGXC-0001Nu-KF for guix-patches@gnu.org; Fri, 12 Jul 2024 09:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sSGXB-0001Dj-QL; Fri, 12 Jul 2024 09:42:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70985] [PATCH v3 5/6] gnu: rust: Guard against unsupported rust targets. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, guix-patches@gnu.org Resent-Date: Fri, 12 Jul 2024 13:42:01 +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: 70985@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-Xcc: Efraim Flashner Received: via spool by 70985-submit@debbugs.gnu.org id=B70985.17207917124649 (code B ref 70985); Fri, 12 Jul 2024 13:42:01 +0000 Received: (at 70985) by debbugs.gnu.org; 12 Jul 2024 13:41:52 +0000 Received: from localhost ([127.0.0.1]:53508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSGX2-0001Ct-HS for submit@debbugs.gnu.org; Fri, 12 Jul 2024 09:41:52 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSGWy-0001CJ-MG for 70985@debbugs.gnu.org; Fri, 12 Jul 2024 09:41:50 -0400 Received: from localhost (unknown [213.31.211.195]) by mira.cbaines.net (Postfix) with ESMTPSA id 4F37227BBEC for <70985@debbugs.gnu.org>; Fri, 12 Jul 2024 14:41:47 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 2f8ca744 for <70985@debbugs.gnu.org>; Fri, 12 Jul 2024 13:41:46 +0000 (UTC) From: Christopher Baines Date: Fri, 12 Jul 2024 14:41:44 +0100 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: <7783ce71e892ea74f025323e0a4d323ee8e720fc.1720791705.git.mail@cbaines.net> References: <7783ce71e892ea74f025323e0a4d323ee8e720fc.1720791705.git.mail@cbaines.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 4DBDC19EF0 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -4.90 X-Spam-Score: -4.90 X-TUID: t+TArdFFfvBD 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.. * gnu/packages/rust.scm (make-rust-sysroot/implementation): Guard against unsupported rust targets. Change-Id: Ia0d5c889c6f5cd3478ad985c79feb9ba1c472c29 --- gnu/packages/rust.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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)) ;; 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) (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)) -- 2.45.2