From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2CeRBa0W9V6XAQAA0tVLHw (envelope-from ) for ; Thu, 25 Jun 2020 21:27:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YJFxAa0W9V5WfAAAB5/wlQ (envelope-from ) for ; Thu, 25 Jun 2020 21:27:09 +0000 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 8FD0E94066D for ; Thu, 25 Jun 2020 21:27:08 +0000 (UTC) Received: from localhost ([::1]:44176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joZOl-0002Me-I5 for larch@yhetil.org; Thu, 25 Jun 2020 17:27:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joZOh-0002Kr-Fn for guix-patches@gnu.org; Thu, 25 Jun 2020 17:27:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58094) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1joZOh-0004V8-6G for guix-patches@gnu.org; Thu, 25 Jun 2020 17:27:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1joZOh-0002rI-2H for guix-patches@gnu.org; Thu, 25 Jun 2020 17:27:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42049] [PATCH 4/4] gnu: crates-io: Use propagated-phases. References: <20200625212523.25016-1-kuba@kadziolka.net> In-Reply-To: <20200625212523.25016-1-kuba@kadziolka.net> Resent-From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Jun 2020 21:27:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42049 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42049@debbugs.gnu.org Received: via spool by 42049-submit@debbugs.gnu.org id=B42049.159312040710943 (code B ref 42049); Thu, 25 Jun 2020 21:27:03 +0000 Received: (at 42049) by debbugs.gnu.org; 25 Jun 2020 21:26:47 +0000 Received: from localhost ([127.0.0.1]:41404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joZOR-0002qR-ET for submit@debbugs.gnu.org; Thu, 25 Jun 2020 17:26:47 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:49954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joZOP-0002qH-0o for 42049@debbugs.gnu.org; Thu, 25 Jun 2020 17:26:45 -0400 Received: (qmail 32573 invoked by uid 1009); 25 Jun 2020 23:26:44 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25853. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.066227 secs); 25 Jun 2020 21:26:44 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 25 Jun 2020 23:26:44 +0200 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Date: Thu, 25 Jun 2020 23:26:43 +0200 Message-Id: <20200625212643.26344-1-kuba@kadziolka.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Qmailux-2.08st: added fake Content-Type header Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) 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" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 2.49 X-TUID: cGyxrs116emI * gnu/packages/crates-io.scm (rust-metadeps-1.1)[arguments]: Don't skip build, skip tests instead. Add rust-lazy-static-0.2 as development input. (rust-clang-sys-0.28)[arguments]: Propagate phase, give it a descriptive name. [inputs]: Move libclang... [propagated-inputs]: ...here. (rust-clang-sys-0.26)[arguments]: Use substitute-keyword-arguments to avoid duplicating the code of the phase. (rust-bindgen-0.52, rust-aom-sys-0.1): Don't duplicate inputs and phases of dependencies. --- gnu/packages/crates-io.scm | 74 ++++++++++++-------------------------- 1 file changed, 22 insertions(+), 52 deletions(-) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 5a4b513f1a..8d57f4f8d0 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -535,24 +535,11 @@ text or blue underlined text, on ANSI terminals.") "0ix3djcf84kk53h6fac73n7jc614745n7kbmikxwi3s73b6vzgsr")))) (build-system cargo-build-system) (arguments - `(;#:skip-build? #t - #:cargo-inputs + `(#:cargo-inputs (("rust-bindgen" ,rust-bindgen-0.51) - ("rust-metadeps" ,rust-metadeps-1.1)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'set-environmental-variable - (lambda* (#:key inputs #:allow-other-keys) - (let ((clang (assoc-ref inputs "libclang"))) - (setenv "LIBCLANG_PATH" - (string-append clang "/lib"))) - #t))))) - (native-inputs - `(("pkg-config" ,pkg-config))) + ("rust-metadeps" ,rust-metadeps-1.1)))) (inputs - `(("libaom" ,libaom) - ("libclang" ,clang) - ("llvm" ,llvm))) + `(("libaom" ,libaom))) (home-page "https://github.com/rust-av/aom-rs") (synopsis "FFI bindings to aom") (description "This package provides FFI bindings to aom.") @@ -1338,17 +1325,7 @@ that uses Serde for transforming structs into bytes and vice versa!") #:cargo-development-inputs (("rust-clap" ,rust-clap-2) ("rust-diff" ,rust-diff-0.1) - ("rust-shlex" ,rust-shlex-0.1)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'set-environmental-variable - (lambda* (#:key inputs #:allow-other-keys) - (let ((clang (assoc-ref inputs "libclang"))) - (setenv "LIBCLANG_PATH" - (string-append clang "/lib"))) - #t))))) - (inputs - `(("libclang" ,clang))) + ("rust-shlex" ,rust-shlex-0.1)))) (home-page "https://rust-lang.github.io/rust-bindgen/") (synopsis "Automatically generates Rust FFI bindings to C and C++ libraries") @@ -1391,8 +1368,7 @@ that uses Serde for transforming structs into bytes and vice versa!") #:cargo-development-inputs (("rust-clap" ,rust-clap-2) ("rust-diff" ,rust-diff-0.1) - ("rust-shlex" ,rust-shlex-0.1)))) - (inputs `()))) + ("rust-shlex" ,rust-shlex-0.1)))))) (define-public rust-bindgen-0.50 (package @@ -2968,15 +2944,14 @@ for computer graphics.") (("rust-glob" ,rust-glob-0.3) ("rust-libc" ,rust-libc-0.2) ("rust-libloading" ,rust-libloading-0.5)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'set-environmental-variable - (lambda* (#:key inputs #:allow-other-keys) - (let ((clang (assoc-ref inputs "libclang"))) - (setenv "LIBCLANG_PATH" - (string-append clang "/lib"))) - #t))))) - (inputs + #:propagated-phases + ((add-after 'unpack 'bindgen:set-libclang-path + (lambda* (#:key inputs #:allow-other-keys) + (let ((clang (assoc-ref inputs "libclang"))) + (setenv "LIBCLANG_PATH" + (string-append clang "/lib"))) + #t))))) + (propagated-inputs `(("libclang" ,clang))) (home-page "https://github.com/KyleMayes/clang-sys") (synopsis "Rust bindings for libclang") @@ -2998,18 +2973,11 @@ for computer graphics.") (base32 "1r50dwy5hj5gq07dn0qf8222d07qv0970ymx0j8n9779yayc3w3f")))) (arguments - `(#:cargo-inputs - (("rust-glob" ,rust-glob-0.2) - ("rust-libc" ,rust-libc-0.2) - ("rust-libloading" ,rust-libloading-0.5)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'set-environmental-variable - (lambda* (#:key inputs #:allow-other-keys) - (let ((clang (assoc-ref inputs "libclang"))) - (setenv "LIBCLANG_PATH" - (string-append clang "/lib"))) - #t))))))) + (substitute-keyword-arguments (package-arguments rust-clang-sys-0.28) + (#:cargo-inputs + `(("rust-glob" ,rust-glob-0.2) + ("rust-libc" ,rust-libc-0.2) + ("rust-libloading" ,rust-libloading-0.5))))))) (define-public rust-clang-sys-0.23 (package @@ -12712,11 +12680,13 @@ for Rust structs.") "1hjla9ypycqw1snd2qf87cckcc0d5z5qvxpcijn5yrrs3f825cbk")))) (build-system cargo-build-system) (arguments - `(#:skip-build? #t + `(#:tests? #f ;; Test files aren't shipped to crates.io #:cargo-inputs (("rust-error-chain" ,rust-error-chain-0.10) ("rust-toml" ,rust-toml-0.2) - ("rust-pkg-config" ,rust-pkg-config-0.3)))) + ("rust-pkg-config" ,rust-pkg-config-0.3)) + #:cargo-development-inputs + (("rust-lazy-static" ,rust-lazy-static-0.2)))) (home-page "https://github.com/joshtriplett/metadeps") (synopsis "Run pkg-config from declarative dependencies in Cargo.toml") (description "Run pkg-config from declarative dependencies in Cargo.toml.") -- 2.26.2