From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:45973) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0uUl-0002A8-Hn for guix-patches@gnu.org; Sun, 09 Feb 2020 16:52:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0uUk-0001eT-H3 for guix-patches@gnu.org; Sun, 09 Feb 2020 16:52:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47363) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0uUk-0001dk-E1 for guix-patches@gnu.org; Sun, 09 Feb 2020 16:52:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j0uUk-0008OR-5d for guix-patches@gnu.org; Sun, 09 Feb 2020 16:52:02 -0500 Subject: [bug#39445] [PATCH v2 2/2] gnu: ripgrep: enable the 'pcre2' feature Resent-Message-ID: From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Date: Sun, 9 Feb 2020 22:51:10 +0100 Message-Id: <20200209215110.6755-2-kuba@kadziolka.net> In-Reply-To: <20200209215110.6755-1-kuba@kadziolka.net> References: <20200209215110.6755-1-kuba@kadziolka.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 39445@debbugs.gnu.org * gnu/packages/rust-apps.scm (ripgrep)[arguments]: Add #:cargo-build-flags to specify the feature. Replace the 'install phase to work around the cargo-build-system a bit. --- gnu/packages/rust-apps.scm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index ddc9f6ed37..26b5445d98 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm @@ -242,9 +242,21 @@ provides defaults for 80% of the use cases.") (install-file manpage (string-append (assoc-ref outputs "out") "/share/man/man1")))) - #t))))) + #t)) + (replace 'install + ;; Adapted from (guix build cargo-build-system). The flags need to + ;; be passed to `cargo install' too, as otherwise it will build + ;; another binary, without the features. + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (mkdir-p out) + (setenv "CARGO_TARGET_DIR" "./target") + (invoke "cargo" "install" "--path" "." "--root" out + "--features" "pcre2"))))) + #:cargo-build-flags '("--release" "--features" "pcre2"))) (native-inputs - `(("asciidoc" ,asciidoc))) + `(("asciidoc" ,asciidoc) + ,@(package-native-inputs rust-pcre2-sys-0.2))) (home-page "https://github.com/BurntSushi/ripgrep") (synopsis "Line-oriented search tool") (description -- 2.25.0