summaryrefslogtreecommitdiff
path: root/gnu/packages/code.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/code.scm')
-rw-r--r--gnu/packages/code.scm141
1 files changed, 75 insertions, 66 deletions
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index df830d55a1..dccfdeb157 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2015, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016, 2017, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -9,13 +9,13 @@
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2019 Hartmut Goebel <h.goebel@goebel-consult.de>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2021 lu hui <luhuins@163.com>
+;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -68,6 +68,7 @@
#:use-module (gnu packages serialization)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages texinfo)
+ #:use-module (gnu packages tls)
#:use-module (gnu packages web)
#:use-module (gnu packages xml))
@@ -115,8 +116,7 @@ a major mode for Emacs for examining the flowcharts that it produces.")
"0lr0l9kj2w3jilz9h9y4np9pf9i9ccpy6331lanki2fnz4z8ldvd"))))
(build-system gnu-build-system)
(native-inputs
- `(("texinfo" ,texinfo)
- ("autogen" ,autogen)))
+ (list texinfo autogen))
(home-page "https://www.gnu.org/software/complexity/")
(synopsis "Analyze complexity of C functions")
(description
@@ -255,7 +255,7 @@ around in a large, deeply nested project.")
#:make-flags (list (string-append "PREFIX="
(assoc-ref %outputs "out")))))
- (inputs `(("perl" ,perl)))
+ (inputs (list perl))
(home-page "https://dwheeler.com/sloccount/")
(synopsis "Count physical source lines of code (SLOC)")
(description
@@ -269,7 +269,7 @@ COCOMO model or user-provided parameters.")
(define-public cloc
(package
(name "cloc")
- (version "1.90")
+ (version "1.92")
(source
(origin
(method git-fetch)
@@ -278,15 +278,15 @@ COCOMO model or user-provided parameters.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0ic9q6qqw5f1wafp9lpmhr0miasbdb9zr59c0jlymnzffdmnliyc"))))
+ (base32 "1hy1hskiw02b7xaxn2qz0v7znj14l49w1anx20z6rkcps7212l5l"))))
(build-system gnu-build-system)
(inputs
- `(("coreutils" ,coreutils)
- ("perl" ,perl)
- ("perl-algorithm-diff" ,perl-algorithm-diff)
- ("perl-digest-md5" ,perl-digest-md5)
- ("perl-parallel-forkmanager" ,perl-parallel-forkmanager)
- ("perl-regexp-common" ,perl-regexp-common)))
+ (list coreutils
+ perl
+ perl-algorithm-diff
+ perl-digest-md5
+ perl-parallel-forkmanager
+ perl-regexp-common))
(arguments
`(#:phases (modify-phases %standard-phases
(delete 'configure) ; nothing to configure
@@ -299,15 +299,13 @@ COCOMO model or user-provided parameters.")
(string-append "INSTALL="
(assoc-ref inputs "coreutils")
"/bin/install")
- "install")
- #t)))
+ "install"))))
(add-after 'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/cloc")
`("PERL5LIB" ":" =
- ,(string-split (getenv "PERL5LIB") #\:)))
- #t))))
+ ,(string-split (getenv "PERL5LIB") #\:)))))))
#:out-of-source? #t
;; Tests require some other packages.
#:tests? #f))
@@ -339,11 +337,9 @@ cloc can handle a greater variety of programming languages.")
;; https://gcc.gnu.org/gcc-10/porting_to.html.
`(#:configure-flags (list "CFLAGS=-fcommon")))
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ (list pkg-config))
(inputs
- `(("pcre" ,pcre)
- ("xz" ,xz)
- ("zlib" ,zlib)))
+ (list pcre xz zlib))
(home-page "https://geoff.greer.fm/ag/")
(synopsis "Fast code searching tool")
(description
@@ -425,16 +421,9 @@ features that are not supported by the standard @code{stdio} implementation.")
(substitute* "Tmain/utils.sh"
(("/bin/echo") (which "echo"))))))))
(native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("packcc" ,packcc)
- ("perl" ,perl)
- ("pkg-config" ,pkg-config)))
+ (list autoconf automake packcc perl pkg-config))
(inputs
- `(("jansson" ,jansson)
- ("libseccomp" ,libseccomp)
- ("libxml2" ,libxml2)
- ("libyaml" ,libyaml)))
+ (list jansson libseccomp libxml2 libyaml))
(home-page "https://ctags.io/")
(synopsis "Generate tag files for source code")
(description
@@ -490,9 +479,8 @@ expressions, and its ability to generate emacs-style TAGS files.")
#t)))))
(home-page "https://github.com/cameronwhite/withershins")
(inputs
- `(("libiberty" ,libiberty)
- ("binutils" ,binutils) ;for libbfd
- ("zlib" ,zlib)))
+ (list libiberty binutils ;for libbfd
+ zlib))
(synopsis "C++11 library for generating stack traces")
(description
"Withershins is a simple cross-platform C++11 library for generating
@@ -537,9 +525,7 @@ stack traces.")
(wrap-program (string-append out "/bin/geninfo")
`("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
#t)))))
- (inputs `(("perl" ,perl)
- ("perl-io-compress" ,perl-io-compress)
- ("perl-json" ,perl-json)))
+ (inputs (list perl perl-io-compress perl-json))
(home-page "http://ltp.sourceforge.net/coverage/lcov.php")
(synopsis "Code coverage tool that enhances GNU gcov")
(description "LCOV is an extension of @command{gcov}, a tool part of the
@@ -575,34 +561,31 @@ results and determine build stability.")
(define-public kcov
(package
(name "kcov")
- (version "38")
+ (version "39")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/SimonKagstrom/kcov")
- (commit version)))
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "0zqg21xwivi16csl6a5wby6679ny01bjaw4am3y4qcgjdyihifp8"))))
+ "09wf1k4dlpdhqjjgq2bibmgy8i3z32wf0zxhd2px2dvg92m4zwqr"))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #f ;no test target
+ `(#:tests? #f ; no test target
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-/bin/bash-references
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((bash (assoc-ref inputs "bash")))
(substitute* (find-files "src" ".*\\.cc?$")
- (("/bin/bash") (which "bash"))
- (("/bin/sh") (which "sh")))
- #t)))))
+ (("/bin/(bash|sh)" shell)
+ (string-append (assoc-ref inputs "bash") shell)))))))))
(inputs
- `(("curl" ,curl)
- ("elfutils" ,elfutils)
- ("libelf" ,libelf)
- ("zlib" ,zlib)))
+ (list curl elfutils libelf openssl zlib))
(native-inputs
- `(("python" ,python)))
+ (list python))
(home-page "https://github.com/SimonKagstrom/kcov")
(synopsis "Code coverage tester for compiled languages, Python and Bash")
(description "Kcov is a FreeBSD/Linux/OSX code coverage tester for compiled
@@ -647,14 +630,14 @@ possible to collect coverage information without special compiler switches.")
"-DBUILD_TESTING=FALSE")
#:tests? #f))
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ (list pkg-config))
(inputs
- `(("bash-completion" ,bash-completion)
- ("clang" ,clang)
- ("llvm" ,llvm)
- ("lua" ,lua)
- ("rct" ,rct)
- ("selene" ,selene)))
+ (list bash-completion
+ clang
+ llvm
+ lua
+ rct
+ selene))
(home-page "https://github.com/Andersbakken/rtags")
(synopsis "Indexer for the C language family with Emacs integration")
(description
@@ -680,8 +663,7 @@ importantly we give you proper follow-symbol and find-references support.")
(base32 "1f9v5s0viq4yc9iv6701h3pv7j21zz1ckl37lpp9hsnliiizv03p"))))
(build-system trivial-build-system)
(native-inputs
- `(("bash" ,bash)
- ("perl" ,perl)))
+ (list bash perl))
(arguments
`(#:modules ((guix build utils))
#:builder
@@ -702,7 +684,7 @@ importantly we give you proper follow-symbol and find-references support.")
(substitute* "colormake"
(("colormake\\.pl") (string-append bin "/colormake.pl"))
(("/bin/bash")
- (string-append (assoc-ref %build-inputs "bash") "/bin/sh")))
+ (search-input-file %build-inputs "/bin/sh")))
(install-file "colormake.1" (string-append doc "/man/man1"))
(install-files '("AUTHORS" "BUGS" "ChangeLog" "README") doc)
(install-files '("colormake" "colormake-short" "clmake"
@@ -736,7 +718,7 @@ produce colored output.")
(modify-phases %standard-phases
(delete 'configure))))
(native-inputs
- `(("graphviz" ,graphviz)))
+ (list graphviz))
(home-page "https://github.com/lindenb/makefile2graph")
(synopsis "Creates a graph of dependencies from GNU Make")
(description
@@ -748,7 +730,7 @@ independent targets.")
(define-public uncrustify
(package
(name "uncrustify")
- (version "0.69.0")
+ (version "0.74.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -757,11 +739,10 @@ independent targets.")
(file-name (git-file-name name version))
(sha256
(base32
- "0sqrg13kp8fwymq40976bq380bzw40g4ss7ihlbq45d0f90ifa1k"))))
+ "0v48vhmzxjzysbf0vhxzayl2pkassvbabvwg84xd6b8n5i74ijxd"))))
(build-system cmake-build-system)
(native-inputs
- `(("unzip" ,unzip)
- ("python" ,python-wrapper)))
+ `(("python" ,python-wrapper)))
(arguments
`(#:phases
(modify-phases %standard-phases
@@ -884,8 +865,7 @@ the C, C++, C++/CLI, Objective‑C, C#, and Java programming languages.")
'("config.sub" "config.guess")))
#t)))))
(native-inputs
- `(("texinfo" ,texinfo)
- ("automake" ,automake))) ; For up to date 'config.guess' and 'config.sub'.
+ (list texinfo automake)) ; For up to date 'config.guess' and 'config.sub'.
(synopsis "Code reformatter")
(description
"Indent is a program that makes source code easier to read by
@@ -941,3 +921,32 @@ extensions over the standard utility.")
(description "amalgamate.py aims to make it easy to use SQLite-style C
source and header amalgamation in projects.")
(license license:bsd-3))))
+
+(define-public cscope
+ (package
+ (name "cscope")
+ (version "15.9")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/cscope/cscope/"
+ "v" version "/cscope-" version ".tar.gz"))
+ (sha256
+ (base32 "0ngiv4aj3rr35k3q3wjx0y19gh7i1ydqa0cqip6sjwd8fph5ll65"))))
+ (build-system gnu-build-system)
+ (inputs (list ncurses))
+ (arguments
+ `(#:configure-flags
+ ;; Specify the correct ncurses directory to prevent incorrect fallback
+ ;; on SysV curses.
+ (list (string-append "--with-ncurses="
+ (assoc-ref %build-inputs "ncurses")))))
+ (home-page "http://cscope.sourceforge.net")
+ (synopsis "Tool for browsing source code")
+ (description
+ "Cscope is a text screen based source browsing tool. Although it is
+primarily designed to search C code (including lex and yacc files), it can
+also be used for C++ code.
+
+Using cscope, you can easily search for where symbols are used and defined.")
+ (license license:bsd-3)))