From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4NybC084LWEZwwAAgWs5BA (envelope-from ) for ; Mon, 30 Aug 2021 21:58:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id mClBB084LWHYPAAA1q6Kng (envelope-from ) for ; Mon, 30 Aug 2021 19:58:07 +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 BC46BF7C9 for ; Mon, 30 Aug 2021 21:58:06 +0200 (CEST) Received: from localhost ([::1]:40420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKnPx-00045o-Rd for larch@yhetil.org; Mon, 30 Aug 2021 15:58:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKnPt-00045R-Vw for guix-patches@gnu.org; Mon, 30 Aug 2021 15:58:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48839) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKnPt-00008H-OP for guix-patches@gnu.org; Mon, 30 Aug 2021 15:58:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKnPt-0001S9-NC for guix-patches@gnu.org; Mon, 30 Aug 2021 15:58:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50162] [PATCH] gnu: global: Add ctags support. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 30 Aug 2021 19:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50162 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Efraim Flashner Cc: 50162@debbugs.gnu.org Received: via spool by 50162-submit@debbugs.gnu.org id=B50162.16303534695558 (code B ref 50162); Mon, 30 Aug 2021 19:58:01 +0000 Received: (at 50162) by debbugs.gnu.org; 30 Aug 2021 19:57:49 +0000 Received: from localhost ([127.0.0.1]:60385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKnPg-0001Ra-UK for submit@debbugs.gnu.org; Mon, 30 Aug 2021 15:57:49 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:38447) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKnPe-0001RL-Hr for 50162@debbugs.gnu.org; Mon, 30 Aug 2021 15:57:48 -0400 Received: by mail-qk1-f180.google.com with SMTP id f22so17030609qkm.5 for <50162@debbugs.gnu.org>; Mon, 30 Aug 2021 12:57:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=wmK0fWEX6FDwygoSfumFkAHvlCClz4bHIc9HXSZ+gx8=; b=DitGD3m8nF151yOqhsHGnEquyxINv/Ou50CWphsrSn4l53pFlfqCVFg9ZDn5CdlGev sv/WwuoHoyy0TqR2WSSO1BxTe6xkCKk6gA5UoLBkOm62KqTBV/PjhC1dC5SzOHdkBv9V OWuW2wTdnziPqtmWOXPST/X9AhVi4t1b/HVY1nzM/7Xdi1u2IsKgpPH/tugfvWR4G//W /kjswomD/8kFkRZjQk0bBK3HpLe4xeKfGUQhPNfD1ywfsK8jDkny+RukStI98g24G70G X09MnKl4zUu8abUoaqHTsVkYGmW781JkW4H9qv0lHmE80cAVEyvIBnAmfKQ7UGfFoDN+ 8Vvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=wmK0fWEX6FDwygoSfumFkAHvlCClz4bHIc9HXSZ+gx8=; b=IbbTfAXzdBCkVZJHIkoPZCIhxBLF+yGvjB6zIMSMKN39EY06LKE3teNUGHoEQ0dzOO rw1aMduvUZl/peopQGayEak6A/Ebv/sA9uqN/u5G83675CaCbS3VbhHdaVHkeLBCVmBM 7bXPoRhJOx95gPbL2eHej7k+1b5I2yxL6/9chR1OglMBIFrxJDDcP8Tf/kd4h/G4vsdW mMcs5wYUwRzoiC0lUUUsRcBMhgOLrOcPwAo/Zivcc7nm+3r1qjnVtHMhlVZ6vt1i0d2l dNpiOyv3C6//VUhDgDN7/FkC43+AAavf+NdtyqwYTPgqQf+5tL51u3kshlT9pXg5oH/C aFAA== X-Gm-Message-State: AOAM531y3n7mjj6FEfD2p/9Mc7VjKn6j/ncyN0v4Y7zsyFaeYx747cor ILMCjz7L2w+wlDNoCQ2oN0Y3b+JUo6esWg== X-Google-Smtp-Source: ABdhPJwwkCtCmydvcg/0Jop+okS2O6wlSgp9zXm8euyCKYfjHoMENaB4bDI2Pl+Ny5dUB/j+2IjELQ== X-Received: by 2002:a37:e315:: with SMTP id y21mr20949372qki.70.1630353460919; Mon, 30 Aug 2021 12:57:40 -0700 (PDT) Received: from hurd (dsl-10-141-212.b2b2c.ca. [72.10.141.212]) by smtp.gmail.com with ESMTPSA id a185sm11941937qkg.128.2021.08.30.12.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Aug 2021 12:57:40 -0700 (PDT) From: Maxim Cournoyer References: <086db0822919d2c43b93dccd3f88be8588685b2f.1629619162.git.efraim@flashner.co.il> Date: Mon, 30 Aug 2021 15:57:39 -0400 In-Reply-To: <086db0822919d2c43b93dccd3f88be8588685b2f.1629619162.git.efraim@flashner.co.il> (Efraim Flashner's message of "Sun, 22 Aug 2021 11:04:14 +0300") Message-ID: <87h7f6ln7w.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630353486; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=wmK0fWEX6FDwygoSfumFkAHvlCClz4bHIc9HXSZ+gx8=; b=VZqYg7dvpmFJcRL3d30YZq3XNY3Zf5Vh9hpk+46wvBJ2Z8n42NB4lgaF5KnqV/lwPGG0li HBXnHTtU0kBv6+/XDGQ6Buky7oPOB0afSi/Y3RqjO8TYCuTMS47VtpSIKCkfk7cKXfTFMX AEvqYtGIysD0dTZmVJu+QBlwazJvnnRLNpv1r5lRzOUVIntPEopVtu0jij7I7/RSc82Hj2 sfhc9nS0a1Xj6KV1qmAfHswUs8Uw3+P7Qboo6ll+h0xspRTb3Be/ZwxsHh4Y5PC0lAy/ew Ph3i0ubqfBM64hStwk/a7Vy7Qe1vL8yDh0+R9Ie+hLIMrKolajj2vopGiQ2vEg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630353486; a=rsa-sha256; cv=none; b=tpnUFWtu1Rhq/3P/rRB99uIPnwsyqr4+epAX7vEUwlE9K4Lkm7uidGsOwjhb0Y/dxuUSg1 +S/KEEKK4jFIJcZs9zKWhSnZxMs1PLQ56VHof5T95Y8Lp5Zx7zMk/cW+jVxpyOpsrb0o0h k2/cbdTN474zX2CkKMduid+J0fAIJBLlN3OcH/DXveiAmY3GxCSqUxe1tDDmIjLGc9NVBh ajwUGb0g+zbZ68KHMWtKj6DRL/E408rOgHGQTIXUiTC3civviVrkAGErmQ/UVthFBD2D+w vQ7/P01iY6WVHDjcA+mhLL1Ld9ZXLCoTdi+i8ThMYj6GtQm+wpmPAFc0Lf/kwg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=DitGD3m8; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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-Migadu-Spam-Score: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=DitGD3m8; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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-Migadu-Queue-Id: BC46BF7C9 X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: tlNbWsjubms0 Hello! Efraim Flashner writes: > * 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(-) > > 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 This is news to me; must we now provide bash-minimal every time wrap-program is used? > + ("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. I have built it (but not tested it), but the rest this LGTM! Feel free to push. Thank you, Maxim