| 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 | |
| 26 | |
| 27 | |
| 28 | |
| 29 |
|
| 30 | (define-module (gnu packages code)
|
| 31 | #:use-module (guix packages)
|
| 32 | #:use-module (guix download)
|
| 33 | #:use-module (guix git-download)
|
| 34 | #:use-module ((guix licenses) #:prefix license:)
|
| 35 | #:use-module (guix build-system gnu)
|
| 36 | #:use-module (guix build-system cmake)
|
| 37 | #:use-module (guix build-system trivial)
|
| 38 | #:use-module (gnu packages)
|
| 39 | #:use-module (gnu packages autogen)
|
| 40 | #:use-module (gnu packages autotools)
|
| 41 | #:use-module (gnu packages base)
|
| 42 | #:use-module (gnu packages bash)
|
| 43 | #:use-module (gnu packages compression)
|
| 44 | #:use-module (gnu packages cpp)
|
| 45 | #:use-module (gnu packages databases)
|
| 46 | #:use-module (gnu packages emacs)
|
| 47 | #:use-module (gnu packages gcc)
|
| 48 | #:use-module (gnu packages graphviz)
|
| 49 | #:use-module (gnu packages pcre)
|
| 50 | #:use-module (gnu packages perl)
|
| 51 | #:use-module (gnu packages pkg-config)
|
| 52 | #:use-module (gnu packages python)
|
| 53 | #:use-module (gnu packages texinfo)
|
| 54 | #:use-module (gnu packages ncurses)
|
| 55 | #:use-module (gnu packages llvm)
|
| 56 | #:use-module (gnu packages lua))
|
| 57 |
|
| 58 | |
| 59 |
|
| 60 | (define-public cflow
|
| 61 | (package
|
| 62 | (name "cflow")
|
| 63 | (version "1.5")
|
| 64 | (source (origin
|
| 65 | (method url-fetch)
|
| 66 | (uri (string-append "mirror://gnu/cflow/cflow-"
|
| 67 | version ".tar.bz2"))
|
| 68 | (sha256
|
| 69 | (base32
|
| 70 | "0yq33k5ap1zpnja64n89iai4zh018ffr72wki5a6mzczd880mr3g"))))
|
| 71 | (build-system gnu-build-system)
|
| 72 |
|
| 73 | |
| 74 | (native-inputs `(("emacs" ,emacs-minimal)))
|
| 75 | (arguments
|
| 76 | '(#:configure-flags (list (string-append "CPPFLAGS="
|
| 77 | "-D" "CFLOW_PREPROC=\\\""
|
| 78 | (assoc-ref %build-inputs "gcc")
|
| 79 | "/bin/cpp\\\""))))
|
| 80 | (home-page "https://www.gnu.org/software/cflow/")
|
| 81 | (synopsis "Create a graph of control flow within a program")
|
| 82 | (description
|
| 83 | "GNU cflow analyzes C source files and produces a graph charting the
|
| 84 | control flow of the program. It can output the graph in several styles and
|
| 85 | in either the POSIX format or in an extended GNU format. cflow also includes
|
| 86 | a major mode for Emacs for examining the flowcharts that it produces.")
|
| 87 | (license license:gpl3+)))
|
| 88 |
|
| 89 | (define-public complexity
|
| 90 | (package
|
| 91 | (name "complexity")
|
| 92 | (version "1.10")
|
| 93 | (source (origin
|
| 94 | (method url-fetch)
|
| 95 | (uri (string-append "mirror://gnu/complexity/complexity-"
|
| 96 | version ".tar.xz"))
|
| 97 | (sha256
|
| 98 | (base32
|
| 99 | "0lr0l9kj2w3jilz9h9y4np9pf9i9ccpy6331lanki2fnz4z8ldvd"))))
|
| 100 | (build-system gnu-build-system)
|
| 101 | (native-inputs
|
| 102 | `(("texinfo" ,texinfo)
|
| 103 | ("autogen" ,autogen)))
|
| 104 | (home-page "https://www.gnu.org/software/complexity/")
|
| 105 | (synopsis "Analyze complexity of C functions")
|
| 106 | (description
|
| 107 | "GNU complexity provides tools for finding procedures that are
|
| 108 | convoluted, overly long or otherwise difficult to understand. This
|
| 109 | may help in learning or reviewing unfamiliar code or perhaps
|
| 110 | highlighting your own code that seemed comprehensible when you wrote it.")
|
| 111 | (license license:gpl3+)))
|
| 112 |
|
| 113 | (define-public global |
| 114 | (package
|
| 115 | (name "global")
|
| 116 | (version "6.6.2")
|
| 117 | (source (origin
|
| 118 | (method url-fetch)
|
| 119 | (uri (string-append "mirror://gnu/global/global-"
|
| 120 | version ".tar.gz"))
|
| 121 | (sha256
|
| 122 | (base32
|
| 123 | "0zvi5vxwiq0dy8mq2cgs64m8harxs0fvkmsnvi0ayb0w608lgij3"))))
|
| 124 | (build-system gnu-build-system)
|
| 125 | (inputs `(("ncurses" ,ncurses)
|
| 126 | ("libltdl" ,libltdl)
|
| 127 | ("sqlite" ,sqlite)))
|
| 128 | (arguments
|
| 129 | `(#:configure-flags
|
| 130 | (list (string-append "--with-ncurses="
|
| 131 | (assoc-ref %build-inputs "ncurses"))
|
| 132 | (string-append "--with-sqlite3="
|
| 133 | (assoc-ref %build-inputs "sqlite")))
|
| 134 |
|
| 135 | #:phases
|
| 136 | (modify-phases %standard-phases
|
| 137 | (add-after 'install 'post-install
|
| 138 | (lambda* (#:key outputs #:allow-other-keys)
|
| 139 | |
| 140 | (let* ((out (assoc-ref outputs "out"))
|
| 141 | (data (string-append out "/share/gtags"))
|
| 142 | (lisp (string-append out "/share/emacs/site-lisp")))
|
| 143 | (install-file (string-append data "/gtags.el") lisp)
|
| 144 | (delete-file (string-append data "/gtags.el"))
|
| 145 | #t))))))
|
| 146 | (home-page "https://www.gnu.org/software/global/")
|
| 147 | (synopsis "Cross-environment source code tag system")
|
| 148 | (description
|
| 149 | "GNU GLOBAL is a source code tagging system that functions in the same
|
| 150 | way across a wide array of environments, such as different text editors,
|
| 151 | shells and web browsers. The resulting tags are useful for quickly moving
|
| 152 | around in a large, deeply nested project.")
|
| 153 | (license license:gpl3+)))
|
| 154 |
|
| 155 | (define-public sloccount
|
| 156 | (package
|
| 157 | (name "sloccount")
|
| 158 | (version "2.26")
|
| 159 | (source (origin
|
| 160 | (method url-fetch)
|
| 161 | (uri (string-append "http://www.dwheeler.com/sloccount/sloccount-"
|
| 162 | version ".tar.gz"))
|
| 163 | (sha256
|
| 164 | (base32
|
| 165 | "0ayiwfjdh1946asah861ah9269s5xkc8p5fv1wnxs9znyaxs4zzs"))))
|
| 166 | (build-system gnu-build-system)
|
| 167 | (arguments
|
| 168 | '(#:phases (modify-phases %standard-phases
|
| 169 | (delete 'configure)
|
| 170 | (add-before 'build 'make-dotl-files-older
|
| 171 | (lambda _
|
| 172 | |
| 173 | |
| 174 | |
| 175 | (define ref
|
| 176 | (stat "README"))
|
| 177 |
|
| 178 | (for-each (lambda (file)
|
| 179 | (set-file-time file ref))
|
| 180 | (find-files "." "\\.[chl]$"))
|
| 181 | #t))
|
| 182 | (add-before 'install 'make-target-directories
|
| 183 | (lambda* (#:key outputs #:allow-other-keys)
|
| 184 | (let ((out (assoc-ref outputs "out")))
|
| 185 | (mkdir-p (string-append out "/bin"))
|
| 186 | (mkdir-p (string-append out
|
| 187 | "/share/man/man1"))
|
| 188 | (mkdir-p (string-append out
|
| 189 | "/share/doc")))))
|
| 190 | (replace 'check
|
| 191 | (lambda _
|
| 192 | (setenv "HOME" (getcwd))
|
| 193 | (setenv "PATH"
|
| 194 | (string-append (getcwd) ":"
|
| 195 | (getenv "PATH")))
|
| 196 | (zero? (system* "make" "test")))))
|
| 197 |
|
| 198 | #:make-flags (list (string-append "PREFIX="
|
| 199 | (assoc-ref %outputs "out")))))
|
| 200 | (inputs `(("perl" ,perl)))
|
| 201 | (home-page "http://www.dwheeler.com/sloccount/")
|
| 202 | (synopsis "Count physical source lines of code (SLOC)")
|
| 203 | (description
|
| 204 | "SLOCCount is a set of the programs for counting source lines of
|
| 205 | code (SLOC) in large software systems. It can automatically identify and
|
| 206 | measure a wide range of programming languages. It automatically estimates the
|
| 207 | effort, time, and money it would take to develop the software, using the
|
| 208 | COCOMO model or user-provided parameters.")
|
| 209 | (license license:gpl2+)))
|
| 210 |
|
| 211 | (define-public cloc
|
| 212 | (package
|
| 213 | (name "cloc")
|
| 214 | (version "1.78")
|
| 215 | (source
|
| 216 | (origin
|
| 217 | (method url-fetch)
|
| 218 | (uri (string-append
|
| 219 | "https://github.com/AlDanial/cloc/releases/download/" version
|
| 220 | "/cloc-" version ".tar.gz"))
|
| 221 | (sha256
|
| 222 | (base32
|
| 223 | "1j9lwy9xf43kpv1csqdxzch6y1hnsv881ddqd357f8v58dhr4s68"))))
|
| 224 | (build-system gnu-build-system)
|
| 225 | (inputs
|
| 226 | `(("coreutils" ,coreutils)
|
| 227 | ("perl" ,perl)
|
| 228 | ("perl-algorithm-diff" ,perl-algorithm-diff)
|
| 229 | ("perl-digest-md5" ,perl-digest-md5)
|
| 230 | ("perl-parallel-forkmanager" ,perl-parallel-forkmanager)
|
| 231 | ("perl-regexp-common" ,perl-regexp-common)))
|
| 232 | (arguments
|
| 233 | `(#:phases (modify-phases %standard-phases
|
| 234 | (delete 'configure)
|
| 235 | (delete 'build)
|
| 236 | (replace 'install
|
| 237 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 238 | (let* ((out (assoc-ref outputs "out")))
|
| 239 | (invoke "make" "-C" "Unix"
|
| 240 | (string-append "prefix=" out)
|
| 241 | (string-append "INSTALL="
|
| 242 | (assoc-ref inputs "coreutils")
|
| 243 | "/bin/install")
|
| 244 | "install")
|
| 245 | #t)))
|
| 246 | (add-after 'install 'wrap-program
|
| 247 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 248 | (let ((out (assoc-ref outputs "out")))
|
| 249 | (wrap-program (string-append out "/bin/cloc")
|
| 250 | `("PERL5LIB" ":" =
|
| 251 | ,(string-split (getenv "PERL5LIB") #\:)))
|
| 252 | #t))))
|
| 253 | #:out-of-source? #t
|
| 254 | |
| 255 | #:tests? #f))
|
| 256 | (home-page "https://github.com/AlDanial/cloc")
|
| 257 | (synopsis "Count source lines of code (SLOC) and other source code metrics")
|
| 258 | (description "cloc counts blank lines, comment lines, and physical lines
|
| 259 | of source code in many programming languages. Given two versions of a code
|
| 260 | base, cloc can compute differences in blank, comment, and source lines.
|
| 261 |
|
| 262 | cloc contains code from David Wheeler's SLOCCount. Compared to SLOCCount,
|
| 263 | cloc can handle a greater variety of programming languages.")
|
| 264 | (license license:gpl2+)))
|
| 265 |
|
| 266 | (define-public the-silver-searcher
|
| 267 | (package
|
| 268 | (name "the-silver-searcher")
|
| 269 | (version "2.2.0")
|
| 270 | (source (origin
|
| 271 | (method url-fetch)
|
| 272 | (uri (string-append
|
| 273 | "https://geoff.greer.fm/ag/releases/the_silver_searcher-"
|
| 274 | version ".tar.gz"))
|
| 275 | (sha256
|
| 276 | (base32
|
| 277 | "0w1icjqd8hd45rn1y6nbfznk1a6ip54whwbfbhxp7ws2hn3ilqnr"))))
|
| 278 | (build-system gnu-build-system)
|
| 279 | (native-inputs
|
| 280 | `(("pkg-config" ,pkg-config)))
|
| 281 | (inputs
|
| 282 | `(("pcre" ,pcre)
|
| 283 | ("xz" ,xz)
|
| 284 | ("zlib" ,zlib)))
|
| 285 | (home-page "https://geoff.greer.fm/ag/")
|
| 286 | (synopsis "Fast code searching tool")
|
| 287 | (description
|
| 288 | "The Silver Searcher (@command{ag}) is a tool for quickly searching large
|
| 289 | numbers of files. It's intended primarily for source code repositories, and
|
| 290 | respects files like @file{.gitignore} and @file{.hgignore}. It's also an order
|
| 291 | of magnitude faster than its inspiration, @command{ack}, and less specialised
|
| 292 | tools such as @command{grep}.")
|
| 293 | (license license:asl2.0)))
|
| 294 |
|
| 295 | (define-public trio
|
| 296 | (package
|
| 297 | (name "trio")
|
| 298 | (version "1.16")
|
| 299 | (source (origin
|
| 300 | (method url-fetch)
|
| 301 | (uri (string-append "mirror://sourceforge/ctrio/trio/trio-"
|
| 302 | version ".tar.gz"))
|
| 303 | (sha256
|
| 304 | (base32
|
| 305 | "02pwd5m5vq7hbrffgm2na1dfc249z50yyr5jv73vdw15bd7ygl44"))))
|
| 306 | (build-system gnu-build-system)
|
| 307 | (home-page "http://daniel.haxx.se/projects/trio/")
|
| 308 | (synopsis "Portable and extendable printf and string functions")
|
| 309 | (description
|
| 310 | "Trio is a set of @code{printf} and string functions designed be used by
|
| 311 | applications with a focus on portability or with the need for additional
|
| 312 | features that are not supported by the standard @code{stdio} implementation.")
|
| 313 | |
| 314 | |
| 315 | (license (license:non-copyleft
|
| 316 | "http://sourceforge.net/p/ctrio/git/ci/master/tree/README"))))
|
| 317 |
|
| 318 | (define-public withershins
|
| 319 | (package
|
| 320 | (name "withershins")
|
| 321 | (version "0.1")
|
| 322 | (source (origin
|
| 323 | (method url-fetch)
|
| 324 | (uri (string-append
|
| 325 | "https://github.com/cameronwhite/withershins/archive/v"
|
| 326 | version ".tar.gz"))
|
| 327 | (file-name (string-append name "-" version ".tar.gz"))
|
| 328 | (sha256
|
| 329 | (base32
|
| 330 | "08z3lyvswx7sad10637vfpwglbcbgzzcpfihw0x8lzr74f3b70bh"))))
|
| 331 | (build-system cmake-build-system)
|
| 332 | (arguments
|
| 333 | `(#:out-of-source? #f
|
| 334 | #:phases
|
| 335 | (modify-phases %standard-phases
|
| 336 | (add-after
|
| 337 | 'unpack 'find-libiberty
|
| 338 | (lambda _
|
| 339 | (let ((libiberty (assoc-ref %build-inputs "libiberty")))
|
| 340 | (substitute* "cmake/FindIberty.cmake"
|
| 341 | (("/usr/include") (string-append libiberty "/include"))
|
| 342 | (("libiberty.a iberty")
|
| 343 | (string-append "NAMES libiberty.a iberty\nPATHS \""
|
| 344 | libiberty "/lib" "\"")))
|
| 345 | #t)))
|
| 346 | (replace
|
| 347 | 'install
|
| 348 | (lambda* (#:key outputs #:allow-other-keys)
|
| 349 | (let* ((out (assoc-ref outputs "out"))
|
| 350 | (include (string-append out "/include"))
|
| 351 | (lib (string-append out "/lib")))
|
| 352 | (mkdir-p include)
|
| 353 | (install-file "src/withershins.hpp" include)
|
| 354 | (mkdir-p lib)
|
| 355 | (install-file "src/libwithershins.a" lib))
|
| 356 | #t)))))
|
| 357 | (home-page "https://github.com/cameronwhite/withershins")
|
| 358 | (inputs
|
| 359 | `(("libiberty" ,libiberty)
|
| 360 | ("binutils" ,binutils) |
| 361 | ("zlib" ,zlib)))
|
| 362 | (synopsis "C++11 library for generating stack traces")
|
| 363 | (description
|
| 364 | "Withershins is a simple cross-platform C++11 library for generating
|
| 365 | stack traces.")
|
| 366 | |
| 367 | |
| 368 | (license license:gpl3+)))
|
| 369 |
|
| 370 | (define-public lcov
|
| 371 | (package
|
| 372 | (name "lcov")
|
| 373 | (version "1.13")
|
| 374 | (source (origin
|
| 375 | (method url-fetch)
|
| 376 | (uri (string-append "mirror://sourceforge/ltp/Coverage%20Analysis"
|
| 377 | "/LCOV-" version "/lcov-" version ".tar.gz"))
|
| 378 | (sha256
|
| 379 | (base32
|
| 380 | "08wabnb0gcjqk0qc65a6cgbbmz6b8lvam3p7byh0dk42hj3jr5s4"))))
|
| 381 | (build-system gnu-build-system)
|
| 382 | (arguments
|
| 383 | '(#:make-flags
|
| 384 | (let ((out (assoc-ref %outputs "out")))
|
| 385 | (list (string-append "PREFIX=" out)))
|
| 386 | #:phases
|
| 387 | (modify-phases %standard-phases
|
| 388 | (delete 'configure)) |
| 389 | #:tests? #f)) |
| 390 | (inputs `(("perl" ,perl)))
|
| 391 | (home-page "http://ltp.sourceforge.net/coverage/lcov.php")
|
| 392 | (synopsis "Code coverage tool that enhances GNU gcov")
|
| 393 | (description
|
| 394 | "LCOV is an extension of @command{gcov}, a tool part of the
|
| 395 | GNU@tie{}Binutils, which provides information about what parts of a program
|
| 396 | are actually executed (i.e., \"covered\") while running a particular test
|
| 397 | case. The extension consists of a set of Perl scripts which build on the
|
| 398 | textual @command{gcov} output to implement the following enhanced
|
| 399 | functionality such as HTML output.")
|
| 400 | (license license:gpl2+)))
|
| 401 |
|
| 402 | (define-public rtags
|
| 403 | (package
|
| 404 | (name "rtags")
|
| 405 | (version "2.18")
|
| 406 | (source
|
| 407 | (origin
|
| 408 | (method git-fetch)
|
| 409 | (uri (git-reference
|
| 410 | (url "https://github.com/Andersbakken/rtags.git")
|
| 411 | (commit (string-append "v" version))))
|
| 412 | (file-name (git-file-name name version))
|
| 413 | (patches (search-patches "rtags-separate-rct.patch"))
|
| 414 | (modules '((guix build utils)))
|
| 415 | (snippet
|
| 416 | |
| 417 | |
| 418 | '(with-directory-excursion "src"
|
| 419 | (delete-file-recursively "rct") |
| 420 | (let ((files (find-files "." ".*\\.cpp|.*\\.h")))
|
| 421 | (substitute* files
|
| 422 | (("#include ?\"rct/(.*.h)\"" all header)
|
| 423 | (string-append "#include <rct/" header ">")))
|
| 424 | #t)))
|
| 425 | (sha256
|
| 426 | (base32
|
| 427 | "0raqjbkl1ykga4ahgl9xw49cgh3cyqcf42z36z7d6fz1fw192kg0"))))
|
| 428 | (build-system cmake-build-system)
|
| 429 | (arguments
|
| 430 | '(#:build-type "RelWithDebInfo"
|
| 431 | #:configure-flags
|
| 432 | '("-DRTAGS_NO_ELISP_FILES=1"
|
| 433 | "-DCMAKE_CXX_FLAGS=-std=c++11"
|
| 434 | "-DBUILD_TESTING=FALSE")
|
| 435 | #:tests? #f))
|
| 436 | (native-inputs
|
| 437 | `(("pkg-config" ,pkg-config)))
|
| 438 | (inputs
|
| 439 | `(("bash-completion" ,bash-completion)
|
| 440 | ("clang" ,clang)
|
| 441 | ("llvm" ,llvm)
|
| 442 | ("lua" ,lua)
|
| 443 | ("rct" ,rct)
|
| 444 | ("selene" ,selene)))
|
| 445 | (home-page "https://github.com/Andersbakken/rtags")
|
| 446 | (synopsis "Indexer for the C language family with Emacs integration")
|
| 447 | (description
|
| 448 | "RTags is a client/server application that indexes C/C++ code and keeps a
|
| 449 | persistent file-based database of references, declarations, definitions,
|
| 450 | symbolnames etc. There’s also limited support for ObjC/ObjC++. It allows you
|
| 451 | to find symbols by name (including nested class and namespace scope). Most
|
| 452 | importantly we give you proper follow-symbol and find-references support.")
|
| 453 | (license license:gpl3+)))
|
| 454 |
|
| 455 | (define-public colormake
|
| 456 | (package
|
| 457 | (name "colormake")
|
| 458 | (version "0.9.20140503")
|
| 459 | (source
|
| 460 | (origin
|
| 461 | (method url-fetch)
|
| 462 | (uri (string-append "https://github.com/pagekite/Colormake/archive/"
|
| 463 | version ".tar.gz"))
|
| 464 | (file-name (string-append name "-" version ".tar.gz"))
|
| 465 | (sha256
|
| 466 | (base32
|
| 467 | "08ldss9zd8ls6bjahvxhffpsjcysifr720yf3jz9db2mlklzmyd3"))))
|
| 468 | (build-system trivial-build-system)
|
| 469 | (native-inputs
|
| 470 | `(("bash" ,bash)
|
| 471 | ("gzip" ,gzip)
|
| 472 | ("perl" ,perl)
|
| 473 | ("tar" ,tar)))
|
| 474 | (arguments
|
| 475 | `(#:modules ((guix build utils))
|
| 476 | #:builder
|
| 477 | (begin
|
| 478 | (use-modules (guix build utils))
|
| 479 | |
| 480 | (setenv "PATH" (string-append
|
| 481 | (assoc-ref %build-inputs "tar") "/bin" ":"
|
| 482 | (assoc-ref %build-inputs "gzip") "/bin"))
|
| 483 | (invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
|
| 484 | (chdir (string-append (string-capitalize ,name) "-" ,version))
|
| 485 | (patch-shebang "colormake.pl"
|
| 486 | (list (string-append (assoc-ref %build-inputs "perl")
|
| 487 | "/bin")))
|
| 488 | (let* ((out (assoc-ref %outputs "out"))
|
| 489 | (bin (string-append out "/bin"))
|
| 490 | (doc (string-append out "/share/doc"))
|
| 491 | (install-files (lambda (files directory)
|
| 492 | (for-each (lambda (file)
|
| 493 | (install-file file directory))
|
| 494 | files))))
|
| 495 | (substitute* "colormake"
|
| 496 | (("colormake\\.pl") (string-append bin "/colormake.pl"))
|
| 497 | (("/bin/bash")
|
| 498 | (string-append (assoc-ref %build-inputs "bash") "/bin/sh")))
|
| 499 | (install-file "colormake.1" (string-append doc "/man/man1"))
|
| 500 | (install-files '("AUTHORS" "BUGS" "ChangeLog" "README") doc)
|
| 501 | (install-files '("colormake" "colormake-short" "clmake"
|
| 502 | "clmake-short" "colormake.pl")
|
| 503 | bin)
|
| 504 | #t))))
|
| 505 | (home-page "http://bre.klaki.net/programs/colormake/")
|
| 506 | (synopsis "Wrapper around @command{make} to produce colored output")
|
| 507 | (description "This package provides a wrapper around @command{make} to
|
| 508 | produce colored output.")
|
| 509 | (license license:gpl2+)))
|
| 510 |
|
| 511 | (define-public makefile2graph
|
| 512 | (package
|
| 513 | (name "makefile2graph")
|
| 514 | (version "1.5.0")
|
| 515 | (source (origin
|
| 516 | (method url-fetch)
|
| 517 | (uri (string-append "https://github.com/lindenb/" name
|
| 518 | "/archive/v" version ".tar.gz"))
|
| 519 | (sha256
|
| 520 | (base32
|
| 521 | "0h1vchkpmm9h6s87p5nf0ksjxcmsxpx8k62a508w428n570wcr4l"))
|
| 522 | (file-name (string-append name "-" version ".tar.gz"))))
|
| 523 | (build-system gnu-build-system)
|
| 524 | (arguments
|
| 525 | '(#:test-target "test"
|
| 526 | #:make-flags (list "CC=gcc" (string-append "prefix=" %output))
|
| 527 | #:phases
|
| 528 | (modify-phases %standard-phases
|
| 529 | (delete 'configure))))
|
| 530 | (native-inputs
|
| 531 | `(("graphviz" ,graphviz)))
|
| 532 | (home-page "https://github.com/lindenb/makefile2graph")
|
| 533 | (synopsis "Creates a graph of dependencies from GNU Make")
|
| 534 | (description
|
| 535 | "@code{make2graph} creates a graph of dependencies from GNU Make. The
|
| 536 | output is a graphviz-dot file, a Gexf-XML file or a list of the deepest
|
| 537 | independent targets.")
|
| 538 | (license license:expat)))
|
| 539 |
|
| 540 | (define-public uncrustify
|
| 541 | (package
|
| 542 | (name "uncrustify")
|
| 543 | (version "0.67")
|
| 544 | (source (origin
|
| 545 | (method url-fetch)
|
| 546 | (uri (string-append
|
| 547 | "https://github.com/uncrustify/uncrustify/archive/"
|
| 548 | "uncrustify-" version ".zip"))
|
| 549 | (sha256
|
| 550 | (base32
|
| 551 | "0n13kq0nsm35fxhdp0f275n4x0w88hdv3bdjy0hgvv42x0dx5zyp"))))
|
| 552 | (build-system cmake-build-system)
|
| 553 | (native-inputs
|
| 554 | `(("unzip" ,unzip)))
|
| 555 | (arguments
|
| 556 | `(#:phases
|
| 557 | (modify-phases %standard-phases
|
| 558 | (add-after 'unpack 'unpack-etc
|
| 559 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 560 | |
| 561 | (let* ((output (assoc-ref outputs "out"))
|
| 562 | (etcdir (string-append output "/etc")))
|
| 563 | (for-each (lambda (l)
|
| 564 | (install-file l etcdir))
|
| 565 | (find-files "etc" "\\.cfg$")))
|
| 566 | #t)))))
|
| 567 | (home-page "http://uncrustify.sourceforge.net/")
|
| 568 | (synopsis "Code formatter for C and other related languages")
|
| 569 | (description
|
| 570 | "Beautify source code in many languages of the C family (C, C++, C#,
|
| 571 | Objective@tie{}C, D, Java, Pawn, and Vala). Features:
|
| 572 | @itemize
|
| 573 | @item Indent and align code.
|
| 574 | @item Reformat comments (a little bit).
|
| 575 | @item Fix inter-character spacing.
|
| 576 | @item Add or remove parens / braces.
|
| 577 | @item Supports embedded SQL @code{EXEC SQL} stuff.
|
| 578 | @item Highly configurable - More than 600 configurable options.
|
| 579 | @end itemize\n")
|
| 580 | (license license:gpl2+)))
|
| 581 |
|
| 582 | (define-public astyle
|
| 583 | (package
|
| 584 | (name "astyle")
|
| 585 | (version "3.1")
|
| 586 | (source
|
| 587 | (origin
|
| 588 | (method url-fetch)
|
| 589 | (uri (string-append "mirror://sourceforge/astyle/astyle/astyle%20"
|
| 590 | version "/astyle_" version "_linux.tar.gz"))
|
| 591 | (sha256
|
| 592 | (base32
|
| 593 | "1ms54wcs7hg1bsywqwf2lhdfizgbk7qxc9ghasxk8i99jvwlrk6b"))))
|
| 594 | (build-system gnu-build-system)
|
| 595 | (arguments
|
| 596 | `(#:tests? #f |
| 597 | #:make-flags (list (string-append "prefix=" %output)
|
| 598 | "INSTALL=install"
|
| 599 | "all")
|
| 600 | #:phases
|
| 601 | (modify-phases %standard-phases
|
| 602 | (replace 'configure
|
| 603 | (lambda _ (chdir "build/gcc") #t))
|
| 604 | (add-after 'install 'install-libs
|
| 605 | (lambda* (#:key outputs #:allow-other-keys)
|
| 606 | |
| 607 | (let* ((output (assoc-ref outputs "out"))
|
| 608 | (libdir (string-append output "/lib")))
|
| 609 | (begin
|
| 610 | (mkdir-p libdir)
|
| 611 | (for-each (lambda (l)
|
| 612 | (copy-file
|
| 613 | l (string-append libdir "/" (basename l))))
|
| 614 | (find-files "bin" "lib*"))))
|
| 615 | #t)))))
|
| 616 | (home-page "http://astyle.sourceforge.net/")
|
| 617 | (synopsis "Source code indenter, formatter, and beautifier")
|
| 618 | (description
|
| 619 | "Artistic Style is a source code indenter, formatter, and beautifier for
|
| 620 | the C, C++, C++/CLI, Objective‑C, C#, and Java programming languages.")
|
| 621 | (license license:lgpl3+)))
|
| 622 |
|
| 623 | (define-public indent
|
| 624 | (package
|
| 625 | (name "indent")
|
| 626 | (version "2.2.10")
|
| 627 | (source (origin
|
| 628 | (method url-fetch)
|
| 629 | (uri (string-append "mirror://gnu/indent/indent-" version
|
| 630 | ".tar.gz"))
|
| 631 | (sha256 (base32
|
| 632 | "0f9655vqdvfwbxvs1gpa7py8k1z71aqh8hp73f65vazwbfz436wa"))))
|
| 633 | (build-system gnu-build-system)
|
| 634 | (arguments
|
| 635 | `(#:phases
|
| 636 | (modify-phases %standard-phases
|
| 637 | (add-after 'unpack 'fix-docdir
|
| 638 | (lambda _
|
| 639 | |
| 640 | |
| 641 | |
| 642 | (substitute* "doc/Makefile.in"
|
| 643 | (("^docdir = .*$") "docdir = @docdir@\n"))
|
| 644 | #t)))))
|
| 645 | (synopsis "Code reformatter")
|
| 646 | (description
|
| 647 | "Indent is a program that makes source code easier to read by
|
| 648 | reformatting it in a consistent style. It can change the style to one of
|
| 649 | several different styles such as GNU, BSD or K&R. It has some flexibility to
|
| 650 | deal with incomplete or malformed syntax. GNU indent offers several
|
| 651 | extensions over the standard utility.")
|
| 652 | (license license:gpl3+)
|
| 653 | (home-page "https://www.gnu.org/software/indent/")))
|
| 654 |
|
| 655 | (define-public indent-2.2.12
|
| 656 | (package
|
| 657 | (inherit indent)
|
| 658 | (version "2.2.12")
|
| 659 | (source (origin
|
| 660 | (method url-fetch)
|
| 661 | (uri (string-append "mirror://gnu/indent/indent-" version
|
| 662 | ".tar.gz"))
|
| 663 | (sha256
|
| 664 | (base32
|
| 665 | "12xvcd16cwilzglv9h7sgh4h1qqjd1h8s48ji2dla58m4706hzg7"))))
|
| 666 | (native-inputs `(("texinfo" ,texinfo)))))
|
| 667 |
|
| 668 | (define-public amalgamate
|
| 669 | (let* ((commit "c91f07eea1133aa184f652b8f1398eaf03586208")
|
| 670 | (revision "0")
|
| 671 | (version (git-version "1.1.1" revision commit)))
|
| 672 | (package
|
| 673 | (name "amalgamate")
|
| 674 | (version version)
|
| 675 | (home-page "https://github.com/edlund/amalgamate")
|
| 676 | (source
|
| 677 | (origin
|
| 678 | (method git-fetch)
|
| 679 | (uri (git-reference
|
| 680 | (url home-page)
|
| 681 | (commit commit)))
|
| 682 | (sha256
|
| 683 | (base32
|
| 684 | "0cllaraw8mxs8q2nr28nhgzkb417gj2wcklqg59w84f4lc78k3yb"))
|
| 685 | (file-name (git-file-name name version))
|
| 686 | (modules '((guix build utils)))
|
| 687 | (snippet
|
| 688 | '(substitute* "test.sh"
|
| 689 | (("test_command \"cc -Wall -Wextra -o source.out source.c\"" all)
|
| 690 | "test_command \"gcc -Wall -Wextra -o source.out source.c\"")))))
|
| 691 | (build-system gnu-build-system)
|
| 692 | (inputs
|
| 693 | `(("python" ,python-wrapper)))
|
| 694 | (arguments
|
| 695 | `(#:phases
|
| 696 | (modify-phases %standard-phases
|
| 697 | (delete 'configure)
|
| 698 | (delete 'build)
|
| 699 | (replace 'install
|
| 700 | (lambda* (#:key outputs #:allow-other-keys)
|
| 701 | (let* ((out (assoc-ref outputs "out"))
|
| 702 | (bin (string-append out "/bin")))
|
| 703 | (install-file "amalgamate.py" bin))))
|
| 704 | (replace 'check
|
| 705 | (lambda _
|
| 706 | (invoke "./test.sh"))))))
|
| 707 | (synopsis "Tool for amalgamating C source and header files")
|
| 708 | |
| 709 | |
| 710 | (description "amalgamate.py aims to make it easy to use SQLite-style C
|
| 711 | source and header amalgamation in projects.")
|
| 712 | (license license:bsd-3))))
|