| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 |
|
| 22 | (define-module (gnu packages code)
|
| 23 | #:use-module (guix packages)
|
| 24 | #:use-module (guix download)
|
| 25 | #:use-module ((guix licenses) #:prefix license:)
|
| 26 | #:use-module (guix build-system gnu)
|
| 27 | #:use-module (guix build-system cmake)
|
| 28 | #:use-module (gnu packages base)
|
| 29 | #:use-module (gnu packages compression)
|
| 30 | #:use-module (gnu packages databases)
|
| 31 | #:use-module (gnu packages emacs)
|
| 32 | #:use-module (gnu packages gcc)
|
| 33 | #:use-module (gnu packages pcre)
|
| 34 | #:use-module (gnu packages pkg-config)
|
| 35 | #:use-module (gnu packages perl)
|
| 36 | #:use-module (gnu packages texinfo)
|
| 37 | #:use-module (gnu packages autogen)
|
| 38 | #:use-module (gnu packages ncurses)
|
| 39 | #:use-module (gnu packages autotools))
|
| 40 |
|
| 41 | |
| 42 |
|
| 43 | (define-public cflow
|
| 44 | (package
|
| 45 | (name "cflow")
|
| 46 | (version "1.5")
|
| 47 | (source (origin
|
| 48 | (method url-fetch)
|
| 49 | (uri (string-append "mirror://gnu/cflow/cflow-"
|
| 50 | version ".tar.bz2"))
|
| 51 | (sha256
|
| 52 | (base32
|
| 53 | "0yq33k5ap1zpnja64n89iai4zh018ffr72wki5a6mzczd880mr3g"))))
|
| 54 | (build-system gnu-build-system)
|
| 55 |
|
| 56 | |
| 57 | (native-inputs `(("emacs" ,emacs-minimal)))
|
| 58 |
|
| 59 | (home-page "http://www.gnu.org/software/cflow/")
|
| 60 | (synopsis "Create a graph of control flow within a program")
|
| 61 | (description
|
| 62 | "GNU cflow analyzes C source files and produces a graph charting the
|
| 63 | control flow of the program. It can output the graph in several styles and
|
| 64 | in either the POSIX format or in an extended GNU format. cflow also includes
|
| 65 | a major mode for Emacs for examining the flowcharts that it produces.")
|
| 66 | (license license:gpl3+)))
|
| 67 |
|
| 68 | (define-public complexity
|
| 69 | (package
|
| 70 | (name "complexity")
|
| 71 | (version "1.10")
|
| 72 | (source (origin
|
| 73 | (method url-fetch)
|
| 74 | (uri (string-append "mirror://gnu/complexity/complexity-"
|
| 75 | version ".tar.xz"))
|
| 76 | (sha256
|
| 77 | (base32
|
| 78 | "0lr0l9kj2w3jilz9h9y4np9pf9i9ccpy6331lanki2fnz4z8ldvd"))))
|
| 79 | (build-system gnu-build-system)
|
| 80 | (native-inputs
|
| 81 | `(("texinfo" ,texinfo)
|
| 82 | ("autogen" ,autogen)))
|
| 83 | (home-page "http://www.gnu.org/software/complexity/")
|
| 84 | (synopsis "Analyze complexity of C functions")
|
| 85 | (description
|
| 86 | "GNU complexity provides tools for finding procedures that are
|
| 87 | convoluted, overly long or otherwise difficult to understand. This
|
| 88 | may help in learning or reviewing unfamiliar code or perhaps
|
| 89 | highlighting your own code that seemed comprehensible when you wrote it.")
|
| 90 | (license license:gpl3+)))
|
| 91 |
|
| 92 | (define-public global |
| 93 | (package
|
| 94 | (name "global")
|
| 95 | (version "6.5.4")
|
| 96 | (source (origin
|
| 97 | (method url-fetch)
|
| 98 | (uri (string-append "mirror://gnu/global/global-"
|
| 99 | version ".tar.gz"))
|
| 100 | (sha256
|
| 101 | (base32
|
| 102 | "19hxajpwld6qx0faz4rzyh1hfs25ycjmws6bas8pavx4hskf05mg"))))
|
| 103 | (build-system gnu-build-system)
|
| 104 | (inputs `(("ncurses" ,ncurses)
|
| 105 | ("libltdl" ,libltdl)
|
| 106 | ("sqlite" ,sqlite)))
|
| 107 | (arguments
|
| 108 | `(#:configure-flags
|
| 109 | (list (string-append "--with-ncurses="
|
| 110 | (assoc-ref %build-inputs "ncurses"))
|
| 111 | (string-append "--with-sqlite3="
|
| 112 | (assoc-ref %build-inputs "sqlite")))
|
| 113 |
|
| 114 | #:phases
|
| 115 | (modify-phases %standard-phases
|
| 116 | (add-after 'install 'post-install
|
| 117 | (lambda* (#:key outputs #:allow-other-keys)
|
| 118 | |
| 119 | (let* ((out (assoc-ref outputs "out"))
|
| 120 | (data (string-append out "/share/gtags"))
|
| 121 | (lisp (string-append out "/share/emacs/site-lisp")))
|
| 122 | (install-file (string-append data "/gtags.el") lisp)
|
| 123 | (delete-file (string-append data "/gtags.el"))
|
| 124 | #t))))))
|
| 125 | (home-page "http://www.gnu.org/software/global/")
|
| 126 | (synopsis "Cross-environment source code tag system")
|
| 127 | (description
|
| 128 | "GLOBAL is a source code tagging system that functions in the same way
|
| 129 | across a wide array of environments, such as different text editors, shells
|
| 130 | and web browsers. The resulting tags are useful for quickly moving around in
|
| 131 | a large, deeply nested project.")
|
| 132 | (license license:gpl3+)))
|
| 133 |
|
| 134 | (define-public sloccount
|
| 135 | (package
|
| 136 | (name "sloccount")
|
| 137 | (version "2.26")
|
| 138 | (source (origin
|
| 139 | (method url-fetch)
|
| 140 | (uri (string-append "http://www.dwheeler.com/sloccount/sloccount-"
|
| 141 | version ".tar.gz"))
|
| 142 | (sha256
|
| 143 | (base32
|
| 144 | "0ayiwfjdh1946asah861ah9269s5xkc8p5fv1wnxs9znyaxs4zzs"))))
|
| 145 | (build-system gnu-build-system)
|
| 146 | (arguments
|
| 147 | '(#:phases (modify-phases %standard-phases
|
| 148 | (delete 'configure)
|
| 149 | (add-before 'build 'make-dotl-files-older
|
| 150 | (lambda _
|
| 151 | |
| 152 | |
| 153 | |
| 154 | (define ref
|
| 155 | (stat "README"))
|
| 156 |
|
| 157 | (for-each (lambda (file)
|
| 158 | (set-file-time file ref))
|
| 159 | (find-files "." "\\.[chl]$"))
|
| 160 | #t))
|
| 161 | (add-before 'install 'make-target-directories
|
| 162 | (lambda* (#:key outputs #:allow-other-keys)
|
| 163 | (let ((out (assoc-ref outputs "out")))
|
| 164 | (mkdir-p (string-append out "/bin"))
|
| 165 | (mkdir-p (string-append out
|
| 166 | "/share/man/man1"))
|
| 167 | (mkdir-p (string-append out
|
| 168 | "/share/doc")))))
|
| 169 | (replace 'check
|
| 170 | (lambda _
|
| 171 | (setenv "HOME" (getcwd))
|
| 172 | (setenv "PATH"
|
| 173 | (string-append (getcwd) ":"
|
| 174 | (getenv "PATH")))
|
| 175 | (zero? (system* "make" "test")))))
|
| 176 |
|
| 177 | #:make-flags (list (string-append "PREFIX="
|
| 178 | (assoc-ref %outputs "out")))))
|
| 179 | (inputs `(("perl" ,perl)))
|
| 180 | (home-page "http://www.dwheeler.com/sloccount/")
|
| 181 | (synopsis "Count physical source lines of code (SLOC)")
|
| 182 | (description
|
| 183 | "SLOCCount is a set of the programs for counting source lines of
|
| 184 | code (SLOC) in large software systems. It can automatically identify and
|
| 185 | measure a wide range of programming languages. It automatically estimates the
|
| 186 | effort, time, and money it would take to develop the software, using the
|
| 187 | COCOMO model or user-provided parameters.")
|
| 188 | (license license:gpl2+)))
|
| 189 |
|
| 190 | (define-public the-silver-searcher
|
| 191 | (package
|
| 192 | (name "the-silver-searcher")
|
| 193 | (version "0.32.0")
|
| 194 | (source (origin
|
| 195 | (method url-fetch)
|
| 196 | (uri (string-append
|
| 197 | "https://github.com/ggreer/the_silver_searcher/archive/"
|
| 198 | version ".tar.gz"))
|
| 199 | (sha256
|
| 200 | (base32
|
| 201 | "1k543cjpignwvy8avhchz8pkqrqcgcryps36ycy8mz2w5rbhicn5"))
|
| 202 | (file-name (string-append name "-" version ".tar.gz"))))
|
| 203 | (build-system gnu-build-system)
|
| 204 | (native-inputs
|
| 205 | `(("autoconf" ,autoconf)
|
| 206 | ("automake" ,automake)
|
| 207 | ("libtool" ,libtool)
|
| 208 | ("pkg-config" ,pkg-config)))
|
| 209 | (inputs
|
| 210 | `(("pcre" ,pcre)
|
| 211 | ("xz" ,xz)
|
| 212 | ("zlib" ,zlib)))
|
| 213 | (arguments
|
| 214 | `(#:phases
|
| 215 | |
| 216 | |
| 217 | (alist-cons-before 'configure 'autoconf
|
| 218 | (lambda _
|
| 219 | (substitute* "build.sh"
|
| 220 | (("./configure") "true")
|
| 221 | (("make -j4") "true"))
|
| 222 | (zero? (system* "sh" "build.sh")))
|
| 223 | %standard-phases)))
|
| 224 | (home-page "http://geoff.greer.fm/ag/")
|
| 225 | (synopsis "Fast code searching tool")
|
| 226 | (description
|
| 227 | "The silver searcher, or 'ag', is tool for quickly searching through
|
| 228 | files, but compared to grep is much faster and respects files like .gitignore,
|
| 229 | .hgignore, etc.")
|
| 230 | (license license:asl2.0)))
|
| 231 |
|
| 232 | (define-public trio
|
| 233 | (package
|
| 234 | (name "trio")
|
| 235 | (version "1.16")
|
| 236 | (source (origin
|
| 237 | (method url-fetch)
|
| 238 | (uri (string-append "mirror://sourceforge/ctrio/trio/trio-"
|
| 239 | version ".tar.gz"))
|
| 240 | (sha256
|
| 241 | (base32
|
| 242 | "02pwd5m5vq7hbrffgm2na1dfc249z50yyr5jv73vdw15bd7ygl44"))))
|
| 243 | (build-system gnu-build-system)
|
| 244 | (home-page "http://daniel.haxx.se/projects/trio/")
|
| 245 | (synopsis "Portable and extendable printf and string functions")
|
| 246 | (description
|
| 247 | "Trio is a set of @code{printf} and string functions designed be used by
|
| 248 | applications with a focus on portability or with the need for additional
|
| 249 | features that are not supported by the standard @code{stdio} implementation.")
|
| 250 | |
| 251 | |
| 252 | (license (license:non-copyleft
|
| 253 | "http://sourceforge.net/p/ctrio/git/ci/master/tree/README"))))
|
| 254 |
|
| 255 | (define-public withershins
|
| 256 | (package
|
| 257 | (name "withershins")
|
| 258 | (version "0.1")
|
| 259 | (source (origin
|
| 260 | (method url-fetch)
|
| 261 | (uri (string-append
|
| 262 | "https://github.com/cameronwhite/withershins/archive/v"
|
| 263 | version ".tar.gz"))
|
| 264 | (file-name (string-append name "-" version ".tar.gz"))
|
| 265 | (sha256
|
| 266 | (base32
|
| 267 | "08z3lyvswx7sad10637vfpwglbcbgzzcpfihw0x8lzr74f3b70bh"))))
|
| 268 | (build-system cmake-build-system)
|
| 269 | (arguments
|
| 270 | `(#:out-of-source? #f
|
| 271 | #:phases
|
| 272 | (modify-phases %standard-phases
|
| 273 | (add-after
|
| 274 | 'unpack 'find-libiberty
|
| 275 | (lambda _
|
| 276 | (let ((libiberty (assoc-ref %build-inputs "libiberty")))
|
| 277 | (substitute* "cmake/FindIberty.cmake"
|
| 278 | (("/usr/include") (string-append libiberty "/include"))
|
| 279 | (("libiberty.a iberty")
|
| 280 | (string-append "NAMES libiberty.a iberty\nPATHS \""
|
| 281 | libiberty "/lib" "\"")))
|
| 282 | #t)))
|
| 283 | (replace
|
| 284 | 'install
|
| 285 | (lambda* (#:key outputs #:allow-other-keys)
|
| 286 | (let ((out (assoc-ref outputs "out")))
|
| 287 | (mkdir-p (string-append out "/lib"))
|
| 288 | (mkdir (string-append out "/include"))
|
| 289 | (copy-file "src/withershins.hpp"
|
| 290 | (string-append out "/include/withershins.hpp"))
|
| 291 | (copy-file "src/libwithershins.a"
|
| 292 | (string-append out "/lib/libwithershins.a")))
|
| 293 | #t)))))
|
| 294 | (home-page "https://github.com/cameronwhite/withershins")
|
| 295 | (inputs
|
| 296 | `(("libiberty" ,libiberty)
|
| 297 | ("binutils" ,binutils) |
| 298 | ("zlib" ,zlib)))
|
| 299 | (synopsis "C++11 library for generating stack traces")
|
| 300 | (description
|
| 301 | "Withershins is a simple cross-platform C++11 library for generating
|
| 302 | stack traces.")
|
| 303 | |
| 304 | |
| 305 | (license license:gpl3+)))
|
| 306 |
|
| 307 | (define-public lcov
|
| 308 | (package
|
| 309 | (name "lcov")
|
| 310 | (version "1.12")
|
| 311 | (source (origin
|
| 312 | (method url-fetch)
|
| 313 | (uri (string-append "mirror://sourceforge/ltp/Coverage%20Analysis"
|
| 314 | "/LCOV-" version "/lcov-" version ".tar.gz"))
|
| 315 | (sha256
|
| 316 | (base32
|
| 317 | "19wfifdpxxivhq9adbphanjfga9bg9spms9v7c3589wndjff8x5l"))))
|
| 318 | (build-system gnu-build-system)
|
| 319 | (arguments
|
| 320 | '(#:make-flags (let ((out (assoc-ref %outputs "out")))
|
| 321 | (list (string-append "PREFIX=" out)
|
| 322 | (string-append "BIN_DIR=" out "/bin")
|
| 323 | (string-append "MAN_DIR=" out "/share/man")))
|
| 324 | #:phases (modify-phases %standard-phases
|
| 325 | (delete 'configure))
|
| 326 | #:tests? #f)) |
| 327 | (inputs `(("perl" ,perl)))
|
| 328 | (home-page "http://ltp.sourceforge.net/coverage/lcov.php")
|
| 329 | (synopsis "Code coverage tool that enhances GNU gcov")
|
| 330 | (description
|
| 331 | "LCOV is an extension of @command{gcov}, a tool part of the
|
| 332 | GNU@tie{}Binutils, which provides information about what parts of a program
|
| 333 | are actually executed (i.e., \"covered\") while running a particular test
|
| 334 | case. The extension consists of a set of Perl scripts which build on the
|
| 335 | textual @command{gcov} output to implement the following enhanced
|
| 336 | functionality such as HTML output.")
|
| 337 | (license license:gpl2+)))
|