From patchwork Fri Aug 5 05:10:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kiasoc5 X-Patchwork-Id: 41293 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 8B4E927BBEA; Fri, 5 Aug 2022 06:12:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4023627BBE9 for ; Fri, 5 Aug 2022 06:12:11 +0100 (BST) Received: from localhost ([::1]:60116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJpd4-00047r-Eo for patchwork@mira.cbaines.net; Fri, 05 Aug 2022 01:12:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJpcx-00047h-71 for guix-patches@gnu.org; Fri, 05 Aug 2022 01:12:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37693) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJpcw-0000MC-Lj for guix-patches@gnu.org; Fri, 05 Aug 2022 01:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJpcw-0002Vl-CK for guix-patches@gnu.org; Fri, 05 Aug 2022 01:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56984] [PATCH] gnu: ugrep: Use gexps and add zstd lib to inputs. References: <20220804203726.44fb38aa@aria> In-Reply-To: <20220804203726.44fb38aa@aria> Resent-From: kiasoc5 Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 05 Aug 2022 05:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56984 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56984@debbugs.gnu.org Received: via spool by 56984-submit@debbugs.gnu.org id=B56984.16596762799465 (code B ref 56984); Fri, 05 Aug 2022 05:12:02 +0000 Received: (at 56984) by debbugs.gnu.org; 5 Aug 2022 05:11:19 +0000 Received: from localhost ([127.0.0.1]:55675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJpcF-0002SZ-Cj for submit@debbugs.gnu.org; Fri, 05 Aug 2022 01:11:19 -0400 Received: from knopi.disroot.org ([178.21.23.139]:48084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJpcD-0002SS-SC for 56984@debbugs.gnu.org; Fri, 05 Aug 2022 01:11:18 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 3C00640D6C; Fri, 5 Aug 2022 07:11:17 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HTcvG1CmiEx0; Fri, 5 Aug 2022 07:11:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1659676275; bh=cILgHEwgQZLcrHAWTotdgQBY8r5DYP805qoaLQ+44zQ=; h=From:To:Cc:Subject:Date:Reply-To; b=JftHoqsJxWB6W9S/26npzbLAKcgsou+NocZwJ8YMw60VRp9INiL7jIxxW3GZxAved 2mqNt8yN2AJERlLHc7XnO24to488wRK/SBuJuSi6hTDuzFpn8iYJp2l8YGS/9j94Ok gHnRSpurJziIYACVm2cuuczvef9dsCnuDqt19m4npEVTfUNI5CcdNMuCNIiufzDE4V NxEGFS1nOvOWXcf94gzCnHJKpjtOq22pl+dmunqHiQI33SbnJ9aVdfSs9p8Is0fRU3 aWXu39TifBIbjLL5WOIYzyTU/sVG6LssBCBRhPOw9GFICC3A/7T2XnZtNybTyPEC8t exXfw9xNNMIzQ== Date: Fri, 5 Aug 2022 01:10:00 -0400 Message-Id: <20220805050959.344944-1-kiasoc5@disroot.org> Mime-Version: 1.0 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: , Cc: kiasoc5 Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: paren@disroot.org X-ACL-Warn: , kiasoc5 via Guix-patches X-Patchwork-Original-From: kiasoc5 via Guix-patches via From: kiasoc5 X-getmail-retrieved-from-mailbox: Patches Last email had old version of patch, please use this one. Sorry paren for using cc instead of reply-to. * gnu/packages/search.scm (ugrep)[snippets]: Use gexps. Remove trailing #t. [snippets]: Use gexps. [arguments]: Likewise. [inputs]: Add zstd lib. --- gnu/packages/search.scm | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index db5579a708..65a642c259 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -32,6 +32,7 @@ (define-module (gnu packages search) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) @@ -681,14 +682,12 @@ (define-public ugrep (sha256 (base32 "03b3lahc3zzsznaqnrk47f1cnd5jwakvwrkz0r4m2crk09cpfv57")) (file-name (git-file-name name version)) - (modules '((guix build utils))) - (snippet - '(begin + (snippet #~(begin + (use-modules (guix build utils)) (delete-file-recursively "bin") ; pre-built executables (for-each delete-file (find-files "tests" "^archive\\..*")) (for-each delete-file (find-files "tests" "^.*\\.pdf$")) - (for-each delete-file (find-files "tests" "^.*\\.class$")) - #t)))) + (for-each delete-file (find-files "tests" "^.*\\.class$")))))) (build-system gnu-build-system) (inputs (list bzip2 @@ -696,18 +695,20 @@ (define-public ugrep lz4 lzip ;; lzma pcre2 - zlib)) + zlib + `(,zstd "lib")) (arguments - `(#:tests? #f ; no way to rebuild the binary input files - #:test-target "test" - #:phases - (modify-phases %standard-phases - (add-before 'check 'check-setup - (lambda _ - ;; Unpatch shebangs in tests. - (substitute* '("tests/Hello.bat" - "tests/Hello.sh") - (("#!/gnu/store/.*/bin/sh") "#!/bin/sh"))))))) + (list + #:tests? #f ; no way to rebuild the binary input files + #:test-target "test" + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'check-setup + (lambda _ + ;; Unpatch shebangs in tests. + (substitute* '("tests/Hello.bat" + "tests/Hello.sh") + (("#!/gnu/store/.*/bin/sh") "#!/bin/sh"))))))) (home-page "https://github.com/Genivia/ugrep/") (synopsis "Faster grep with an interactive query UI") (description "Ugrep is a ultra fast searcher of file systems, text