From patchwork Sun Feb 9 21:51:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Maja_K=C4=85dzio=C5=82ka?= X-Patchwork-Id: 20200 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 1CB2D17AF9; Sun, 9 Feb 2020 21:52:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 ESMTP id D7E0F17A2F for ; Sun, 9 Feb 2020 21:52:09 +0000 (GMT) Received: from localhost ([::1]:54670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0uUr-0002AM-Cf for patchwork@mira.cbaines.net; Sun, 09 Feb 2020 16:52:09 -0500 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 X-Loop: help-debbugs@gnu.org Subject: [bug#39445] [PATCH v2 2/2] gnu: ripgrep: enable the 'pcre2' feature Resent-From: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 09 Feb 2020 21:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39445 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39445@debbugs.gnu.org Received: via spool by 39445-submit@debbugs.gnu.org id=B39445.158128506932198 (code B ref 39445); Sun, 09 Feb 2020 21:52:02 +0000 Received: (at 39445) by debbugs.gnu.org; 9 Feb 2020 21:51:09 +0000 Received: from localhost ([127.0.0.1]:53336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0uTs-0008NG-Vc for submit@debbugs.gnu.org; Sun, 09 Feb 2020 16:51:09 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:51738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0uTn-0008Mf-Ga for 39445@debbugs.gnu.org; Sun, 09 Feb 2020 16:51:06 -0500 Received: (qmail 2826 invoked by uid 1009); 9 Feb 2020 22:51:01 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25718. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.019035 secs); 09 Feb 2020 21:51:01 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 9 Feb 2020 22:51:00 +0100 From: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= Date: Sun, 9 Feb 2020 22:51:10 +0100 Message-Id: <20200209215110.6755-2-kuba@kadziolka.net> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200209215110.6755-1-kuba@kadziolka.net> References: <20200209215110.6755-1-kuba@kadziolka.net> MIME-Version: 1.0 X-Qmailux-2.08st: added fake Content-Type header X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" X-getmail-retrieved-from-mailbox: Patches * 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