all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sarah Morgensen via Guix-patches via <guix-patches@gnu.org>
To: 49531@debbugs.gnu.org
Subject: [bug#49531] [PATCH core-updates 4/4] cargo-build-system: Accept new-style package inputs.
Date: Sun, 11 Jul 2021 22:48:09 -0700	[thread overview]
Message-ID: <598b53d80d66a229502d235507047a7717a15e8d.1626067919.git.iskarian@mgsn.dev> (raw)
In-Reply-To: <cover.1626067919.git.iskarian@mgsn.dev>

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 <ivanppetkov@gmail.com>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; 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 <mbakke@fastmail.com>
 ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; 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
-- 
2.31.1





  parent reply	other threads:[~2021-07-12  5:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12  5:35 [bug#49531] [PATCH core-updates 0/4] import: {utils, go, crate}: Emit new-style package inputs Sarah Morgensen via Guix-patches via
2021-07-12  5:48 ` [bug#49531] [PATCH core-updates 1/4] import: utils: " Sarah Morgensen via Guix-patches via
2021-07-20 21:22   ` [bug#49531] [PATCH core-updates 0/4] import: {utils, go, crate}: " Ludovic Courtès
2021-07-20 21:36     ` Ludovic Courtès
2021-07-21  3:03       ` Sarah Morgensen
2021-07-12  5:48 ` [bug#49531] [PATCH core-updates 2/4] import: go: " Sarah Morgensen via Guix-patches via
2021-07-12  5:48 ` [bug#49531] [PATCH core-updates 3/4] import: crate: " Sarah Morgensen via Guix-patches via
2021-07-12 14:41   ` [bug#49531] [PATCH core-updates v2 " Sarah Morgensen via Guix-patches via
2021-07-12  5:48 ` Sarah Morgensen via Guix-patches via [this message]
2021-07-20 21:29   ` [bug#49531] Removing input labels for Rust #:cargo-inputs & co.? Ludovic Courtès
2021-07-21  7:50     ` [bug#49531] [PATCH core-updates 0/4] import: {utils, go, crate}: Emit new-style package inputs Sarah Morgensen
2021-07-22  6:44     ` [bug#49531] Removing input labels for Rust #:cargo-inputs & co.? Efraim Flashner
2024-01-20 21:06       ` bug#49531: " Maxim Cournoyer
2021-07-21  2:59 ` [bug#49531] [PATCH core-updates v2] import: go: Emit new-style package inputs Sarah Morgensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=598b53d80d66a229502d235507047a7717a15e8d.1626067919.git.iskarian@mgsn.dev \
    --to=guix-patches@gnu.org \
    --cc=49531@debbugs.gnu.org \
    --cc=iskarian@mgsn.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.