From patchwork Sun Aug 22 08:04:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 32223 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 7BE2027BC82; Sun, 22 Aug 2021 09:07:11 +0100 (BST) 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, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 ESMTPS id E0A3E27BC6B for ; Sun, 22 Aug 2021 09:07:10 +0100 (BST) Received: from localhost ([::1]:59788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHiVZ-0005vH-Sf for patchwork@mira.cbaines.net; Sun, 22 Aug 2021 04:07:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHiVS-0005uq-Sz for guix-patches@gnu.org; Sun, 22 Aug 2021 04:07:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mHiVS-0000Km-LT for guix-patches@gnu.org; Sun, 22 Aug 2021 04:07:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mHiVS-00083K-Cc for guix-patches@gnu.org; Sun, 22 Aug 2021 04:07:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50162] [PATCH] gnu: global: Add ctags support. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Aug 2021 08:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50162 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50162@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162961962130945 (code B ref -1); Sun, 22 Aug 2021 08:07:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Aug 2021 08:07:01 +0000 Received: from localhost ([127.0.0.1]:38116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHiVR-000833-Bz for submit@debbugs.gnu.org; Sun, 22 Aug 2021 04:07:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:34960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHiVP-00082v-S2 for submit@debbugs.gnu.org; Sun, 22 Aug 2021 04:07:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHiVP-0005uh-GL for guix-patches@gnu.org; Sun, 22 Aug 2021 04:06:59 -0400 Received: from flashner.co.il ([178.62.234.194]:59130) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHiVN-0008FU-Si for guix-patches@gnu.org; Sun, 22 Aug 2021 04:06:59 -0400 Received: from localhost (unknown [141.226.169.107]) by flashner.co.il (Postfix) with ESMTPSA id 962B440214 for ; Sun, 22 Aug 2021 08:06:24 +0000 (UTC) Date: Sun, 22 Aug 2021 11:04:14 +0300 From: Efraim Flashner Message-ID: <086db0822919d2c43b93dccd3f88be8588685b2f.1629619162.git.efraim@flashner.co.il> Mail-Followup-To: guix-patches@gnu.org MIME-Version: 1.0 Content-Disposition: inline X-TUID: Tk8iKK0Rel3F Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/code.scm (global)[inputs]: Add bash-minimal, universal-ctags, python-pygments. [arguments]: Add configure-flags to find ctags. Add phases to install plugins and to wrap python script with PYTHONPATH. --- I've been using this variant of global for a couple of weeks now to get global to work with Guix. --- gnu/packages/code.scm | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) base-commit: 9e3b68203cba2b1bd96e524d3ae9dfc3336a72f7 diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index a414cde3de..04b354b71e 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm @@ -64,6 +64,7 @@ #:use-module (gnu packages perl-compression) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages serialization) #:use-module (gnu packages sqlite) #:use-module (gnu packages texinfo) @@ -137,17 +138,26 @@ highlighting your own code that seemed comprehensible when you wrote it.") (base32 "0g4aslm2zajq605py11s4rs1wdnzcqhkh7bc2xl5az42adzzg839")))) (build-system gnu-build-system) - (inputs `(("coreutils" ,coreutils) - ("ncurses" ,ncurses) - ("libltdl" ,libltdl) - ("sqlite" ,sqlite) - ("python-wrapper" ,python-wrapper))) + (inputs + `(("bash" ,bash-minimal) ; for wrap-program + ("coreutils" ,coreutils) + ("ctags" ,universal-ctags) + ("libltdl" ,libltdl) + ("ncurses" ,ncurses) + ("python-pygments" ,python-pygments) + ("python-wrapper" ,python-wrapper) + ("sqlite" ,sqlite))) (arguments `(#:configure-flags (list (string-append "--with-ncurses=" (assoc-ref %build-inputs "ncurses")) (string-append "--with-sqlite3=" (assoc-ref %build-inputs "sqlite")) + (string-append "--with-universal-ctags=" + (assoc-ref %build-inputs "ctags") "/bin/ctags") + (string-append "--sysconfdir=" + (assoc-ref %outputs "out") "/share/gtags") + "--localstatedir=/var" ; This needs to be a writable location. "--disable-static") #:phases @@ -158,6 +168,20 @@ highlighting your own code that seemed comprehensible when you wrote it.") (assoc-ref inputs "coreutils") "/bin/echo"))) (substitute* "globash/globash.in" (("/bin/echo") echo))))) + (add-after 'post-install 'install-plugins + (lambda _ + (with-directory-excursion "plugin-factory" + (invoke "make" "install")))) + (add-before 'install 'dont-install-to-/var + (lambda _ + (substitute* "gozilla/Makefile" + (("DESTDIR\\)\\$\\{localstatedir\\}") "TMPDIR)")))) + (add-after 'install-plugins 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (wrap-program + (string-append (assoc-ref outputs "out") + "/share/gtags/script/pygments_parser.py") + `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))) (add-after 'install 'post-install (lambda* (#:key outputs #:allow-other-keys) ;; Install the plugin files in the right place.