From patchwork Mon Jul 12 05:48:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sarah Morgensen X-Patchwork-Id: 31357 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 EE72C27BC84; Mon, 12 Jul 2021 06:49:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 78E5E27BC83 for ; Mon, 12 Jul 2021 06:49:14 +0100 (BST) Received: from localhost ([::1]:45396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2oob-0004uX-JN for patchwork@mira.cbaines.net; Mon, 12 Jul 2021 01:49:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2ooR-0004ol-7X for guix-patches@gnu.org; Mon, 12 Jul 2021 01:49:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53030) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2ooR-0006YF-0G for guix-patches@gnu.org; Mon, 12 Jul 2021 01:49:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m2ooR-00041n-0J for guix-patches@gnu.org; Mon, 12 Jul 2021 01:49:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49531] [PATCH core-updates 4/4] cargo-build-system: Accept new-style package inputs. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Jul 2021 05:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49531 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49531@debbugs.gnu.org Received: via spool by 49531-submit@debbugs.gnu.org id=B49531.162606890215411 (code B ref 49531); Mon, 12 Jul 2021 05:49:02 +0000 Received: (at 49531) by debbugs.gnu.org; 12 Jul 2021 05:48:22 +0000 Received: from localhost ([127.0.0.1]:36340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2onl-00040P-Pf for submit@debbugs.gnu.org; Mon, 12 Jul 2021 01:48:22 -0400 Received: from out2.migadu.com ([188.165.223.204]:32880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2onj-00040F-HG for 49531@debbugs.gnu.org; Mon, 12 Jul 2021 01:48:20 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1626068898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mK7f3sHUfC7mUljkVEME5kFC1ft44dbXKM1L/rk+Bik=; b=jDk6+D83UPBBCkGM/jT9Hjnd1b6tpGZnZGUqEU3JoSTvrDdGxF2wos8dIxMBkRN5/ilBHY 4cJ/Ke2XqsbMkS+1EKNg1zUGtweM/9pfupUDsQPWrdvfxHoIl5H5fY5Ggi2qA+FzO83/nW Jw1CIJu3At4uJujCXFaIqOKHxwfg58g= Date: Sun, 11 Jul 2021 22:48:09 -0700 Message-Id: <598b53d80d66a229502d235507047a7717a15e8d.1626067919.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev 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" Reply-to: Sarah Morgensen X-ACL-Warn: , Sarah Morgensen via Guix-patches X-Patchwork-Original-From: Sarah Morgensen via Guix-patches via From: Sarah Morgensen X-getmail-retrieved-from-mailbox: Patches Sanitize cargo's inputs here since the package field sanitizers don't know about them. * guix/packages.scm (sanitize-inputs): Export procedure. * guix/build-system/cargo.scm (package-cargo-inputs) (package-cargo-development-inputs) (lower): Sanitize inputs before using them. --- guix/build-system/cargo.scm | 9 ++++++--- guix/packages.scm | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index 60c35eed07..a0aa9ad704 100644 --- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2019 Ivan Petkov ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2021 Efraim Flashner +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -128,13 +129,13 @@ to NAME and VERSION." (define (package-cargo-inputs p) (apply (lambda* (#:key (cargo-inputs '()) #:allow-other-keys) - cargo-inputs) + (sanitize-inputs cargo-inputs)) (package-arguments p))) (define (package-cargo-development-inputs p) (apply (lambda* (#:key (cargo-development-inputs '()) #:allow-other-keys) - cargo-development-inputs) + (sanitize-inputs cargo-development-inputs)) (package-arguments p))) (define (crate-closure inputs) @@ -259,7 +260,9 @@ any dependent crates. This can be a benefits: ,@(standard-packages))) (build-inputs `(("cargo" ,rust "cargo") ("rustc" ,rust) - ,@(expand-crate-sources cargo-inputs cargo-development-inputs) + ,@(expand-crate-sources + (sanitize-inputs cargo-inputs) + (sanitize-inputs cargo-development-inputs)) ,@native-inputs)) (outputs outputs) (build cargo-build) diff --git a/guix/packages.scm b/guix/packages.scm index dfb4c680be..56118edf16 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2019 Marius Bakke ;;; Copyright © 2020, 2021 Maxim Cournoyer ;;; Copyright © 2021 Chris Marusich +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -117,6 +118,7 @@ prepend ;syntactic keyword replace ;syntactic keyword modify-inputs + sanitize-inputs package-direct-sources package-transitive-sources