| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 |
|
| 21 | (define-module (gnu packages code)
|
| 22 | #:use-module (guix packages)
|
| 23 | #:use-module (guix download)
|
| 24 | #:use-module ((guix licenses) #:prefix license:)
|
| 25 | #:use-module (guix build-system gnu)
|
| 26 | #:use-module (guix build-system cmake)
|
| 27 | #:use-module (gnu packages base)
|
| 28 | #:use-module (gnu packages compression)
|
| 29 | #:use-module (gnu packages databases)
|
| 30 | #:use-module (gnu packages emacs)
|
| 31 | #:use-module (gnu packages gcc)
|
| 32 | #:use-module (gnu packages pcre)
|
| 33 | #:use-module (gnu packages pkg-config)
|
| 34 | #:use-module (gnu packages perl)
|
| 35 | #:use-module (gnu packages texinfo)
|
| 36 | #:use-module (gnu packages autogen)
|
| 37 | #:use-module (gnu packages ncurses)
|
| 38 | #:use-module (gnu packages autotools))
|
| 39 |
|
| 40 | |
| 41 |
|
| 42 | (define-public cflow
|
| 43 | (package
|
| 44 | (name "cflow")
|
| 45 | (version "1.4")
|
| 46 | (source (origin
|
| 47 | (method url-fetch)
|
| 48 | (uri (string-append "mirror://gnu/cflow/cflow-"
|
| 49 | version ".tar.bz2"))
|
| 50 | (sha256
|
| 51 | (base32
|
| 52 | "1jkbq97ajcf834z68hbn3xfhiz921zhn39gklml1racf0kb3jzh3"))))
|
| 53 | (build-system gnu-build-system)
|
| 54 |
|
| 55 | |
| 56 | (native-inputs `(("emacs" ,emacs-no-x)))
|
| 57 |
|
| 58 | (home-page "http://www.gnu.org/software/cflow/")
|
| 59 | (synopsis "Create a graph of control flow within a program")
|
| 60 | (description
|
| 61 | "GNU cflow analyzes C source files and produces a graph charting the
|
| 62 | control flow of the program. It can output the graph in several styles and
|
| 63 | in either the POSIX format or in an extended GNU format. cflow also includes
|
| 64 | a major mode for Emacs for examining the flowcharts that it produces.")
|
| 65 | (license license:gpl3+)))
|
| 66 |
|
| 67 | (define-public complexity
|
| 68 | (package
|
| 69 | (name "complexity")
|
| 70 | (version "1.3")
|
| 71 | (source (origin
|
| 72 | (method url-fetch)
|
| 73 | (uri (string-append "mirror://gnu/complexity/complexity-"
|
| 74 | version ".tar.gz"))
|
| 75 | (sha256
|
| 76 | (base32
|
| 77 | "19bc64sxpqd5rqylqaa7dijz2x7qp2b0dg3ah3fb3qbcvd8b4wgy"))))
|
| 78 | (build-system gnu-build-system)
|
| 79 | (native-inputs
|
| 80 | `(("texinfo" ,texinfo)
|
| 81 | ("autogen" ,autogen)))
|
| 82 | (home-page "http://www.gnu.org/software/complexity/")
|
| 83 | (synopsis "Analyze complexity of C functions")
|
| 84 | (description
|
| 85 | "GNU complexity provides tools for finding procedures that are
|
| 86 | convoluted, overly long or otherwise difficult to understand. This
|
| 87 | may help in learning or reviewing unfamiliar code or perhaps
|
| 88 | highlighting your own code that seemed comprehensible when you wrote it.")
|
| 89 | (license license:gpl3+)))
|
| 90 |
|
| 91 | (define-public global |
| 92 | (package
|
| 93 | (name "global")
|
| 94 | (version "6.5.1")
|
| 95 | (source (origin
|
| 96 | (method url-fetch)
|
| 97 | (uri (string-append "mirror://gnu/global/global-"
|
| 98 | version ".tar.gz"))
|
| 99 | (sha256
|
| 100 | (base32
|
| 101 | "1y34nbazsw2p6r2jhv27z15qvm9mhy5xjchpz8pwps00shkm578f"))))
|
| 102 | (build-system gnu-build-system)
|
| 103 | (inputs `(("ncurses" ,ncurses)
|
| 104 | ("libltdl" ,libltdl)
|
| 105 | ("sqlite" ,sqlite)))
|
| 106 | (arguments
|
| 107 | `(#:configure-flags
|
| 108 | (list (string-append "--with-ncurses="
|
| 109 | (assoc-ref %build-inputs "ncurses"))
|
| 110 | (string-append "--with-sqlite3="
|
| 111 | (assoc-ref %build-inputs "sqlite")))
|
| 112 |
|
| 113 | #:phases (alist-cons-after
|
| 114 | 'install 'post-install
|
| 115 | (lambda* (#:key outputs #:allow-other-keys)
|
| 116 | |
| 117 | (let* ((out (assoc-ref outputs "out"))
|
| 118 | (data (string-append out "/share/gtags"))
|
| 119 | (lisp (string-append out "/share/emacs/site-lisp")))
|
| 120 | (install-file (string-append data "/gtags.el")
|
| 121 | lisp)
|
| 122 | (delete-file (string-append data "/gtags.el"))
|
| 123 | #t))
|
| 124 | %standard-phases)))
|
| 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.29.1")
|
| 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 | "0ah7vcqprl9hhafi68bvzaiywy7dfm28zf7kpw3xrlqzfn0vg7kp"))
|
| 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 withershins
|
| 233 | (package
|
| 234 | (name "withershins")
|
| 235 | (version "0.1")
|
| 236 | (source (origin
|
| 237 | (method url-fetch)
|
| 238 | (uri (string-append
|
| 239 | "https://github.com/cameronwhite/withershins/archive/v"
|
| 240 | version ".tar.gz"))
|
| 241 | (file-name (string-append name "-" version ".tar.gz"))
|
| 242 | (sha256
|
| 243 | (base32
|
| 244 | "08z3lyvswx7sad10637vfpwglbcbgzzcpfihw0x8lzr74f3b70bh"))))
|
| 245 | (build-system cmake-build-system)
|
| 246 | (arguments
|
| 247 | `(#:out-of-source? #f
|
| 248 | #:phases
|
| 249 | (modify-phases %standard-phases
|
| 250 | (add-after
|
| 251 | 'unpack 'find-libiberty
|
| 252 | (lambda _
|
| 253 | (let ((libiberty (assoc-ref %build-inputs "libiberty")))
|
| 254 | (substitute* "cmake/FindIberty.cmake"
|
| 255 | (("/usr/include") (string-append libiberty "/include"))
|
| 256 | (("libiberty.a iberty")
|
| 257 | (string-append "NAMES libiberty.a iberty\nPATHS \""
|
| 258 | libiberty "/lib" "\"")))
|
| 259 | #t)))
|
| 260 | (replace
|
| 261 | 'install
|
| 262 | (lambda* (#:key outputs #:allow-other-keys)
|
| 263 | (let ((out (assoc-ref outputs "out")))
|
| 264 | (mkdir-p (string-append out "/lib"))
|
| 265 | (mkdir (string-append out "/include"))
|
| 266 | (copy-file "src/withershins.hpp"
|
| 267 | (string-append out "/include/withershins.hpp"))
|
| 268 | (copy-file "src/libwithershins.a"
|
| 269 | (string-append out "/lib/libwithershins.a")))
|
| 270 | #t)))))
|
| 271 | (home-page "https://github.com/cameronwhite/withershins")
|
| 272 | (inputs
|
| 273 | `(("libiberty" ,libiberty)
|
| 274 | ("binutils" ,binutils) |
| 275 | ("zlib" ,zlib)))
|
| 276 | (synopsis "C++11 library for generating stack traces")
|
| 277 | (description
|
| 278 | "Withershins is a simple cross-platform C++11 library for generating
|
| 279 | stack traces.")
|
| 280 | |
| 281 | |
| 282 | (license license:gpl3+)))
|