From patchwork Tue Mar 18 14:26:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 40343 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 420AC27BBEA; Tue, 18 Mar 2025 14:31:26 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI, PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EEF3B27BBE2 for ; Tue, 18 Mar 2025 14:31:25 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuXyK-0007An-Is; Tue, 18 Mar 2025 10:31:12 -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 1tuXxb-0006Q8-LA for guix-patches@gnu.org; Tue, 18 Mar 2025 10:30:30 -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 1tuXxX-0001xy-5e for guix-patches@gnu.org; Tue, 18 Mar 2025 10:30:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=s7xZt4cQLBfnnSWkcwL6+4CaT6WsRgs4zxV7rKgM8RE=; b=PkY65wcuwJmruzuhd5Nlcm2OuaG1zgfi96/VQJzB1ZEefQ1vYE+ZGlh0OjsQvHZEtWmik3A2RCsollHOswV6QppIddL9gEPu2jxA3rrOfNAD0Y1fZxWaL/zv98QYpl/w5tlDprlxvPB2Dc53Mkvu1qQoA/C/2I+2KRsnL89rQu755+aEnG475+xS4CJ0m+3sRbf9BznNo4y/5/+JXsekZZC1bObXPbZ9U7u8FqJTR7wmzEAzgk5+DtsD332nEwCwl+h5segLmyS41S1KLycNywvDqc3IGKG/BP4iXXlc5zy0376XphpgusERf2c6k7F6PiFYrhRj31EqzKAkEJtabw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tuXxW-0004yT-Mt; Tue, 18 Mar 2025 10:30:22 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77093] [PATCH rust-team v2 13/17] import: crate: crate-name->package-name: Move to (guix build-system cargo). Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: divya@subvertising.org, efraim@flashner.co.il, steve@futurile.net, guix-patches@gnu.org Resent-Date: Tue, 18 Mar 2025 14:30:22 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77093 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77093@debbugs.gnu.org Cc: Hilton Chain , Efraim Flashner , Divya Ranjan Pattanaik , Efraim Flashner , Steve George X-Debbugs-Original-Xcc: Divya Ranjan Pattanaik , Efraim Flashner , Steve George Received: via spool by 77093-submit@debbugs.gnu.org id=B77093.174230818218460 (code B ref 77093); Tue, 18 Mar 2025 14:30:22 +0000 Received: (at 77093) by debbugs.gnu.org; 18 Mar 2025 14:29:42 +0000 Received: from localhost ([127.0.0.1]:41748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tuXwr-0004na-LK for submit@debbugs.gnu.org; Tue, 18 Mar 2025 10:29:42 -0400 Received: from mx.boiledscript.com ([2a01:4f8:10b:392::42]:47174) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tuXvD-0004WO-71 for 77093@debbugs.gnu.org; Tue, 18 Mar 2025 10:28:00 -0400 From: Hilton Chain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=mail; t=1742308078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=geOOtBEsBNx2ONmmiPLL/kMPcijDpsDJ3ulRZK3Fa/w=; b=EuETuZnwfYW37KeMPeFIi+aiciz3xzhePgYXIHSLCbF5OxeyJESkPTG8h1JnM1Qzgpfn6P Mv3LlPmNhsIbTfvnbirQJnVy/izl1cK7wwQpmZ9FgS1DP23v0a/dHk5a8OqFYrYScStMk6 9TmdpADlDw6ijMMYYh3WebxGTBnYEZSHQc+ickk7aCyS4N8Y3MhCfhzdpNpuOqS0j5Au5f 6X/HZhjT9MvX2ba7UoWHJ3D0IbEnPV/5JNDuONO5dzRLf0HOMl3VprRuiW0VS2F8EJYPPR CzWXXFtl+fUhG40a9l56cUiC0qbLdNjef+e3MgelJgSpp/QpSymy4TyAsHprqA== Date: Tue, 18 Mar 2025 22:26:56 +0800 Message-ID: <68e9dbe1fba53dc68b274d78b7ee084db36c0f77.1742306960.git.hako@ultrarare.space> In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/import/crate.scm (crate-name->package-name): Move to... * guix/build-system/cargo.scm (crate-name->package-name): ...here and export. Change-Id: Ie9813179d6c40d159956cc1e2ae59a74dea0a42d --- guix/build-system/cargo.scm | 6 +++++- guix/import/crate.scm | 5 ----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index 4486c706a1..7a07003262 100644 --- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -44,7 +44,8 @@ (define-module (guix build-system cargo) %crate-base-url crate-url crate-url? - crate-uri)) + crate-uri + crate-name->package-name)) (define %crate-base-url (make-parameter "https://crates.io")) @@ -58,6 +59,9 @@ (define (crate-uri name version) to NAME and VERSION." (string-append crate-url name "/" version "/download")) +(define (crate-name->package-name name) + (downstream-package-name "rust-" name)) + (define (default-rust target) "Return the default Rust package." ;; Lazily resolve the binding to avoid a circular dependency. diff --git a/guix/import/crate.scm b/guix/import/crate.scm index 5a8caeb3e1..14e6e28c5b 100644 --- a/guix/import/crate.scm +++ b/guix/import/crate.scm @@ -481,10 +481,6 @@ (define (guix-package->crate-name package) (match parts ((name _ ...) name)))) -(define (crate-name->package-name name) - (downstream-package-name "rust-" name)) - - ;;; ;;; Updater @@ -528,4 +524,3 @@ (define %crate-updater (description "Updater for crates.io packages") (pred crate-package?) (import import-release))) -