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