summaryrefslogtreecommitdiff
path: root/gnu/packages/code.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-05-27 21:22:55 +0200
committerMarius Bakke <marius@gnu.org>2020-05-27 21:49:57 +0200
commit58056d5bf27e802a689eb1a1800304494a88a1f9 (patch)
tree7b57549d98f0e55439785c9cf0f54b3ee3397096 /gnu/packages/code.scm
parentd1c6b0979f763980729bb11a98d2e003a37e403d (diff)
gnu: Add Universal Ctags.
* gnu/packages/code.scm (universal-ctags): New public variable.
Diffstat (limited to 'gnu/packages/code.scm')
-rw-r--r--gnu/packages/code.scm84
1 files changed, 83 insertions, 1 deletions
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index d6aacadfe71..2285b519a08 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -13,6 +13,7 @@
13;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> 13;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
14;;; Copyright © 2019 Hartmut Goebel <h.goebel@goebel-consult.de> 14;;; Copyright © 2019 Hartmut Goebel <h.goebel@goebel-consult.de>
15;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> 15;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
16;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
16;;; 17;;;
17;;; This file is part of GNU Guix. 18;;; This file is part of GNU Guix.
18;;; 19;;;
@@ -43,12 +44,14 @@
43 #:use-module (gnu packages autotools) 44 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages base) 45 #:use-module (gnu packages base)
45 #:use-module (gnu packages bash) 46 #:use-module (gnu packages bash)
47 #:use-module (gnu packages c)
46 #:use-module (gnu packages compression) 48 #:use-module (gnu packages compression)
47 #:use-module (gnu packages cpp) 49 #:use-module (gnu packages cpp)
48 #:use-module (gnu packages emacs) 50 #:use-module (gnu packages emacs)
49 #:use-module (gnu packages gcc) 51 #:use-module (gnu packages gcc)
50 #:use-module (gnu packages graphviz) 52 #:use-module (gnu packages graphviz)
51 #:use-module (gnu packages llvm) 53 #:use-module (gnu packages llvm)
54 #:use-module (gnu packages linux)
52 #:use-module (gnu packages lua) 55 #:use-module (gnu packages lua)
53 #:use-module (gnu packages ncurses) 56 #:use-module (gnu packages ncurses)
54 #:use-module (gnu packages pcre) 57 #:use-module (gnu packages pcre)
@@ -57,7 +60,9 @@
57 #:use-module (gnu packages pkg-config) 60 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages python) 61 #:use-module (gnu packages python)
59 #:use-module (gnu packages sqlite) 62 #:use-module (gnu packages sqlite)
60 #:use-module (gnu packages texinfo)) 63 #:use-module (gnu packages texinfo)
64 #:use-module (gnu packages web)
65 #:use-module (gnu packages xml))
61 66
62;;; Tools to deal with source code: metrics, cross-references, etc. 67;;; Tools to deal with source code: metrics, cross-references, etc.
63 68
@@ -321,6 +326,83 @@ features that are not supported by the standard @code{stdio} implementation.")
321 (license (license:non-copyleft 326 (license (license:non-copyleft
322 "http://sourceforge.net/p/ctrio/git/ci/master/tree/README")))) 327 "http://sourceforge.net/p/ctrio/git/ci/master/tree/README"))))
323 328
329(define-public universal-ctags
330 ;; The project is unable to decide whether to use 1.0 or 6.0 as the
331 ;; first public release version (it started as a fork of another ctags
332 ;; project that was on version 5.8), and five years later have been
333 ;; unable to tag a release. Thus, we just take the master branch.
334 (let ((commit "0c78c0c4a68030df0d025c90bad291108b5e7107")
335 (revision "0"))
336 (package
337 (name "universal-ctags")
338 (version (git-version "0.0.0" revision commit))
339 (source
340 (origin
341 (method git-fetch)
342 (uri (git-reference
343 (url "https://github.com/universal-ctags/ctags")
344 (commit commit)))
345 (file-name (git-file-name name version))
346 (sha256
347 (base32
348 "0lnxc3kwi6srw0015m16vyjfdc7pdr9d1qzxjsbfv3c69ag87jhc"))
349 (modules '((guix build utils)))
350 (snippet
351 '(begin
352 ;; Remove the bundled PackCC and associated build rules.
353 (substitute* "Makefile.am"
354 (("\\$\\(packcc_verbose\\)\\$\\(PACKCC\\)")
355 "packcc")
356 (("\\$\\(PEG_SRCS\\) \\$\\(PEG_HEADS\\): packcc\\$\\(EXEEXT\\)")
357 "$(PEG_SRCS) $(PEG_HEADS):")
358 (("noinst_PROGRAMS \\+= packcc")
359 ""))
360 (delete-file-recursively "misc/packcc")
361 #t))))
362 (build-system gnu-build-system)
363 (arguments
364 '(#:phases (modify-phases %standard-phases
365 (add-after 'unpack 'make-files-writable
366 (lambda _
367 (for-each make-file-writable (find-files "."))
368 #t))
369 (add-before 'bootstrap 'patch-optlib2c
370 (lambda _
371 ;; The autogen.sh script calls out to optlib2c to
372 ;; generate translations, so we can not wait for the
373 ;; patch-source-shebangs phase.
374 (patch-shebang "misc/optlib2c")
375 #t))
376 (add-before 'check 'patch-tests
377 (lambda _
378 (substitute* "misc/units"
379 (("SHELL=/bin/sh")
380 (string-append "SHELL=" (which "sh"))))
381 (substitute* "Tmain/utils.sh"
382 (("/bin/echo") (which "echo")))
383 #t)))))
384 (native-inputs
385 `(("autoconf" ,autoconf)
386 ("automake" ,automake)
387 ("packcc" ,packcc)
388 ("perl" ,perl)
389 ("pkg-config" ,pkg-config)))
390 (inputs
391 `(("jansson" ,jansson)
392 ("libseccomp" ,libseccomp)
393 ("libxml2" ,libxml2)
394 ("libyaml" ,libyaml)))
395 (home-page "https://ctags.io/")
396 (synopsis "Generate tag files for source code")
397 (description
398 "Universal Ctags generates an index (or tag) file of language objects
399found in source files for many popular programming languages. This index
400makes it easy for text editors and other tools to locate the indexed items.
401Universal Ctags improves on traditional ctags because of its multilanguage
402support, its ability for the user to define new languages searched by regular
403expressions, and its ability to generate emacs-style TAGS files.")
404 (license license:gpl2+))))
405
324(define-public withershins 406(define-public withershins
325 (package 407 (package
326 (name "withershins") 408 (name "withershins")