Commit | Line | Data |
---|---|---|
23153c90 | 1 | ;;; GNU Guix --- Functional package management for GNU |
4b3070f7 | 2 | ;;; Copyright © 2013, 2015, 2018 Ludovic Courtès <ludo@gnu.org> |
99e64a6e | 3 | ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> |
76e14638 | 4 | ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> |
cbf5eb84 | 5 | ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il> |
b15af0ce | 6 | ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
8af20b99 | 7 | ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org> |
f7fc9667 | 8 | ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com> |
4b3070f7 | 9 | ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com> |
23153c90 LC |
10 | ;;; |
11 | ;;; This file is part of GNU Guix. | |
12 | ;;; | |
13 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
14 | ;;; under the terms of the GNU General Public License as published by | |
15 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
16 | ;;; your option) any later version. | |
17 | ;;; | |
18 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
19 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | ;;; GNU General Public License for more details. | |
22 | ;;; | |
23 | ;;; You should have received a copy of the GNU General Public License | |
24 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
25 | ||
26 | (define-module (gnu packages code) | |
27 | #:use-module (guix packages) | |
28 | #:use-module (guix download) | |
d13586bf | 29 | #:use-module ((guix licenses) #:prefix license:) |
23153c90 | 30 | #:use-module (guix build-system gnu) |
76e14638 | 31 | #:use-module (guix build-system cmake) |
dc993847 | 32 | #:use-module (guix build-system trivial) |
457fc22d | 33 | #:use-module (gnu packages) |
76e14638 | 34 | #:use-module (gnu packages base) |
d13586bf | 35 | #:use-module (gnu packages compression) |
457fc22d | 36 | #:use-module (gnu packages cpp) |
e1ac691d | 37 | #:use-module (gnu packages databases) |
99e64a6e | 38 | #:use-module (gnu packages emacs) |
76e14638 | 39 | #:use-module (gnu packages gcc) |
d13586bf TČ |
40 | #:use-module (gnu packages pcre) |
41 | #:use-module (gnu packages pkg-config) | |
99e64a6e LC |
42 | #:use-module (gnu packages perl) |
43 | #:use-module (gnu packages texinfo) | |
44 | #:use-module (gnu packages autogen) | |
45 | #:use-module (gnu packages ncurses) | |
4b3070f7 FT |
46 | #:use-module (gnu packages autotools) |
47 | #:use-module (gnu packages llvm) | |
457fc22d | 48 | #:use-module (gnu packages lua) |
4b3070f7 | 49 | #:use-module (gnu packages bash)) |
23153c90 LC |
50 | |
51 | ;;; Tools to deal with source code: metrics, cross-references, etc. | |
52 | ||
99e64a6e LC |
53 | (define-public cflow |
54 | (package | |
55 | (name "cflow") | |
cb307c08 | 56 | (version "1.5") |
99e64a6e LC |
57 | (source (origin |
58 | (method url-fetch) | |
59 | (uri (string-append "mirror://gnu/cflow/cflow-" | |
60 | version ".tar.bz2")) | |
61 | (sha256 | |
62 | (base32 | |
cb307c08 | 63 | "0yq33k5ap1zpnja64n89iai4zh018ffr72wki5a6mzczd880mr3g")))) |
99e64a6e LC |
64 | (build-system gnu-build-system) |
65 | ||
66 | ;; Needed to have cflow-mode.el installed. | |
b8fc3622 | 67 | (native-inputs `(("emacs" ,emacs-minimal))) |
65d98906 OP |
68 | (arguments |
69 | '(#:configure-flags (list (string-append "CPPFLAGS=" | |
70 | "-D" "CFLOW_PREPROC=\\\"" | |
71 | (assoc-ref %build-inputs "gcc") | |
72 | "/bin/cpp\\\"")))) | |
6fd52309 | 73 | (home-page "https://www.gnu.org/software/cflow/") |
99e64a6e LC |
74 | (synopsis "Create a graph of control flow within a program") |
75 | (description | |
76 | "GNU cflow analyzes C source files and produces a graph charting the | |
77 | control flow of the program. It can output the graph in several styles and | |
e881752c | 78 | in either the POSIX format or in an extended GNU format. cflow also includes |
99e64a6e | 79 | a major mode for Emacs for examining the flowcharts that it produces.") |
d13586bf | 80 | (license license:gpl3+))) |
99e64a6e LC |
81 | |
82 | (define-public complexity | |
83 | (package | |
84 | (name "complexity") | |
1e42d8b8 | 85 | (version "1.10") |
99e64a6e LC |
86 | (source (origin |
87 | (method url-fetch) | |
88 | (uri (string-append "mirror://gnu/complexity/complexity-" | |
1e42d8b8 | 89 | version ".tar.xz")) |
99e64a6e LC |
90 | (sha256 |
91 | (base32 | |
1e42d8b8 | 92 | "0lr0l9kj2w3jilz9h9y4np9pf9i9ccpy6331lanki2fnz4z8ldvd")))) |
99e64a6e LC |
93 | (build-system gnu-build-system) |
94 | (native-inputs | |
95 | `(("texinfo" ,texinfo) | |
96 | ("autogen" ,autogen))) | |
6fd52309 | 97 | (home-page "https://www.gnu.org/software/complexity/") |
99e64a6e LC |
98 | (synopsis "Analyze complexity of C functions") |
99 | (description | |
100 | "GNU complexity provides tools for finding procedures that are | |
101 | convoluted, overly long or otherwise difficult to understand. This | |
102 | may help in learning or reviewing unfamiliar code or perhaps | |
103 | highlighting your own code that seemed comprehensible when you wrote it.") | |
d13586bf | 104 | (license license:gpl3+))) |
99e64a6e LC |
105 | |
106 | (define-public global ; a global variable | |
107 | (package | |
108 | (name "global") | |
0de57b44 | 109 | (version "6.6.2") |
99e64a6e LC |
110 | (source (origin |
111 | (method url-fetch) | |
112 | (uri (string-append "mirror://gnu/global/global-" | |
113 | version ".tar.gz")) | |
114 | (sha256 | |
115 | (base32 | |
0de57b44 | 116 | "0zvi5vxwiq0dy8mq2cgs64m8harxs0fvkmsnvi0ayb0w608lgij3")))) |
99e64a6e LC |
117 | (build-system gnu-build-system) |
118 | (inputs `(("ncurses" ,ncurses) | |
e1ac691d LC |
119 | ("libltdl" ,libltdl) |
120 | ("sqlite" ,sqlite))) | |
99e64a6e LC |
121 | (arguments |
122 | `(#:configure-flags | |
123 | (list (string-append "--with-ncurses=" | |
e1ac691d LC |
124 | (assoc-ref %build-inputs "ncurses")) |
125 | (string-append "--with-sqlite3=" | |
126 | (assoc-ref %build-inputs "sqlite"))) | |
99e64a6e | 127 | |
9d9951d6 EF |
128 | #:phases |
129 | (modify-phases %standard-phases | |
130 | (add-after 'install 'post-install | |
131 | (lambda* (#:key outputs #:allow-other-keys) | |
132 | ;; Install the Emacs Lisp file in the right place. | |
133 | (let* ((out (assoc-ref outputs "out")) | |
134 | (data (string-append out "/share/gtags")) | |
135 | (lisp (string-append out "/share/emacs/site-lisp"))) | |
136 | (install-file (string-append data "/gtags.el") lisp) | |
137 | (delete-file (string-append data "/gtags.el")) | |
138 | #t)))))) | |
6fd52309 | 139 | (home-page "https://www.gnu.org/software/global/") |
99e64a6e LC |
140 | (synopsis "Cross-environment source code tag system") |
141 | (description | |
142 | "GLOBAL is a source code tagging system that functions in the same way | |
143 | across a wide array of environments, such as different text editors, shells | |
144 | and web browsers. The resulting tags are useful for quickly moving around in | |
145 | a large, deeply nested project.") | |
d13586bf | 146 | (license license:gpl3+))) |
99e64a6e | 147 | |
23153c90 LC |
148 | (define-public sloccount |
149 | (package | |
150 | (name "sloccount") | |
151 | (version "2.26") | |
152 | (source (origin | |
153 | (method url-fetch) | |
154 | (uri (string-append "http://www.dwheeler.com/sloccount/sloccount-" | |
155 | version ".tar.gz")) | |
156 | (sha256 | |
157 | (base32 | |
158 | "0ayiwfjdh1946asah861ah9269s5xkc8p5fv1wnxs9znyaxs4zzs")))) | |
159 | (build-system gnu-build-system) | |
160 | (arguments | |
161 | '(#:phases (modify-phases %standard-phases | |
f8503e2b LC |
162 | (delete 'configure) |
163 | (add-before 'build 'make-dotl-files-older | |
23153c90 LC |
164 | (lambda _ |
165 | ;; Make the '.l' files as old as the '.c' | |
166 | ;; files to avoid triggering the rule that | |
167 | ;; requires Flex. | |
168 | (define ref | |
169 | (stat "README")) | |
170 | ||
171 | (for-each (lambda (file) | |
172 | (set-file-time file ref)) | |
173 | (find-files "." "\\.[chl]$")) | |
174 | #t)) | |
f8503e2b | 175 | (add-before 'install 'make-target-directories |
23153c90 LC |
176 | (lambda* (#:key outputs #:allow-other-keys) |
177 | (let ((out (assoc-ref outputs "out"))) | |
178 | (mkdir-p (string-append out "/bin")) | |
179 | (mkdir-p (string-append out | |
180 | "/share/man/man1")) | |
181 | (mkdir-p (string-append out | |
182 | "/share/doc"))))) | |
f8503e2b | 183 | (replace 'check |
23153c90 LC |
184 | (lambda _ |
185 | (setenv "HOME" (getcwd)) | |
186 | (setenv "PATH" | |
187 | (string-append (getcwd) ":" | |
188 | (getenv "PATH"))) | |
189 | (zero? (system* "make" "test"))))) | |
190 | ||
191 | #:make-flags (list (string-append "PREFIX=" | |
192 | (assoc-ref %outputs "out"))))) | |
193 | (inputs `(("perl" ,perl))) | |
194 | (home-page "http://www.dwheeler.com/sloccount/") | |
195 | (synopsis "Count physical source lines of code (SLOC)") | |
196 | (description | |
197 | "SLOCCount is a set of the programs for counting source lines of | |
198 | code (SLOC) in large software systems. It can automatically identify and | |
199 | measure a wide range of programming languages. It automatically estimates the | |
200 | effort, time, and money it would take to develop the software, using the | |
201 | COCOMO model or user-provided parameters.") | |
d13586bf TČ |
202 | (license license:gpl2+))) |
203 | ||
f7fc9667 AW |
204 | (define-public cloc |
205 | (package | |
206 | (name "cloc") | |
95943ed7 | 207 | (version "1.76") |
f7fc9667 AW |
208 | (source |
209 | (origin | |
210 | (method url-fetch) | |
211 | (uri (string-append | |
95943ed7 | 212 | "https://github.com/AlDanial/cloc/releases/download/v" version |
f7fc9667 AW |
213 | "/cloc-" version ".tar.gz")) |
214 | (sha256 | |
215 | (base32 | |
95943ed7 | 216 | "05srlvzwisr7y7ymvzb5yfdsrspja27ysqdmkwhiiivy84mq2gnl")))) |
f7fc9667 AW |
217 | (build-system gnu-build-system) |
218 | (inputs | |
219 | `(("coreutils" ,coreutils) | |
220 | ("perl" ,perl) | |
221 | ("perl-algorithm-diff" ,perl-algorithm-diff) | |
95943ed7 TGR |
222 | ("perl-digest-md5" ,perl-digest-md5) |
223 | ("perl-parallel-forkmanager" ,perl-parallel-forkmanager) | |
224 | ("perl-regexp-common" ,perl-regexp-common))) | |
f7fc9667 AW |
225 | (arguments |
226 | `(#:phases (modify-phases %standard-phases | |
227 | (delete 'configure) | |
228 | (delete 'build) | |
229 | (replace 'install | |
230 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
231 | (let* ((out (assoc-ref outputs "out"))) | |
53244d1f TGR |
232 | (invoke "make" "-C" "Unix" |
233 | (string-append "prefix=" out) | |
234 | (string-append "INSTALL=" | |
235 | (assoc-ref inputs "coreutils") | |
236 | "/bin/install") | |
237 | "install") | |
238 | #t))) | |
f7fc9667 AW |
239 | (add-after 'install 'wrap-program |
240 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
241 | (let ((out (assoc-ref outputs "out"))) | |
242 | (wrap-program (string-append out "/bin/cloc") | |
243 | `("PERL5LIB" ":" = | |
244 | ,(string-split (getenv "PERL5LIB") #\:))) | |
245 | #t)))) | |
246 | #:out-of-source? #t | |
247 | ;; Tests require some other packages. | |
248 | #:tests? #f)) | |
249 | (home-page "https://github.com/AlDanial/cloc") | |
250 | (synopsis "Count source lines of code (SLOC) and other source code metrics") | |
251 | (description "cloc counts blank lines, comment lines, and physical lines | |
252 | of source code in many programming languages. Given two versions of a code | |
253 | base, cloc can compute differences in blank, comment, and source lines. | |
254 | ||
255 | cloc contains code from David Wheeler's SLOCCount. Compared to SLOCCount, | |
e0f49664 | 256 | cloc can handle a greater variety of programming languages.") |
f7fc9667 AW |
257 | (license license:gpl2+))) |
258 | ||
d13586bf TČ |
259 | (define-public the-silver-searcher |
260 | (package | |
261 | (name "the-silver-searcher") | |
8af20b99 | 262 | (version "2.1.0") |
d13586bf TČ |
263 | (source (origin |
264 | (method url-fetch) | |
265 | (uri (string-append | |
392f3266 | 266 | "http://geoff.greer.fm/ag/releases/the_silver_searcher-" |
d13586bf TČ |
267 | version ".tar.gz")) |
268 | (sha256 | |
269 | (base32 | |
8af20b99 | 270 | "1m0mih1x4jpswc8ganhqh0gmwbmd2hzmz7402mxfh19s3kcjnrfl")))) |
d13586bf TČ |
271 | (build-system gnu-build-system) |
272 | (native-inputs | |
392f3266 | 273 | `(("pkg-config" ,pkg-config))) |
d13586bf TČ |
274 | (inputs |
275 | `(("pcre" ,pcre) | |
276 | ("xz" ,xz) | |
277 | ("zlib" ,zlib))) | |
d13586bf TČ |
278 | (home-page "http://geoff.greer.fm/ag/") |
279 | (synopsis "Fast code searching tool") | |
280 | (description | |
6acff0f9 TGR |
281 | "The Silver Searcher (@command{ag}) is a tool for quickly searching large |
282 | numbers of files. It's intended primarily for source code repositories, and | |
283 | respects files like @file{.gitignore} and @file{.hgignore}. It's also an order | |
284 | of magnitude faster than its inspiration, @command{ack}, and less specialised | |
285 | tools such as @command{grep}.") | |
d13586bf | 286 | (license license:asl2.0))) |
76e14638 | 287 | |
a4e6356e RW |
288 | (define-public trio |
289 | (package | |
290 | (name "trio") | |
291 | (version "1.16") | |
292 | (source (origin | |
293 | (method url-fetch) | |
294 | (uri (string-append "mirror://sourceforge/ctrio/trio/trio-" | |
295 | version ".tar.gz")) | |
296 | (sha256 | |
297 | (base32 | |
298 | "02pwd5m5vq7hbrffgm2na1dfc249z50yyr5jv73vdw15bd7ygl44")))) | |
299 | (build-system gnu-build-system) | |
300 | (home-page "http://daniel.haxx.se/projects/trio/") | |
301 | (synopsis "Portable and extendable printf and string functions") | |
302 | (description | |
303 | "Trio is a set of @code{printf} and string functions designed be used by | |
304 | applications with a focus on portability or with the need for additional | |
305 | features that are not supported by the standard @code{stdio} implementation.") | |
306 | ;; This license is very similar to the ISC license, but the wording is | |
307 | ;; slightly different. | |
308 | (license (license:non-copyleft | |
309 | "http://sourceforge.net/p/ctrio/git/ci/master/tree/README")))) | |
310 | ||
76e14638 RW |
311 | (define-public withershins |
312 | (package | |
313 | (name "withershins") | |
314 | (version "0.1") | |
315 | (source (origin | |
316 | (method url-fetch) | |
317 | (uri (string-append | |
318 | "https://github.com/cameronwhite/withershins/archive/v" | |
319 | version ".tar.gz")) | |
320 | (file-name (string-append name "-" version ".tar.gz")) | |
321 | (sha256 | |
322 | (base32 | |
323 | "08z3lyvswx7sad10637vfpwglbcbgzzcpfihw0x8lzr74f3b70bh")))) | |
324 | (build-system cmake-build-system) | |
325 | (arguments | |
326 | `(#:out-of-source? #f | |
76e14638 RW |
327 | #:phases |
328 | (modify-phases %standard-phases | |
329 | (add-after | |
330 | 'unpack 'find-libiberty | |
331 | (lambda _ | |
25734108 | 332 | (let ((libiberty (assoc-ref %build-inputs "libiberty"))) |
76e14638 | 333 | (substitute* "cmake/FindIberty.cmake" |
25734108 RW |
334 | (("/usr/include") (string-append libiberty "/include")) |
335 | (("libiberty.a iberty") | |
336 | (string-append "NAMES libiberty.a iberty\nPATHS \"" | |
337 | libiberty "/lib" "\""))) | |
76e14638 RW |
338 | #t))) |
339 | (replace | |
340 | 'install | |
341 | (lambda* (#:key outputs #:allow-other-keys) | |
f3860753 TGR |
342 | (let* ((out (assoc-ref outputs "out")) |
343 | (include (string-append out "/include")) | |
344 | (lib (string-append out "/lib"))) | |
345 | (mkdir-p include) | |
346 | (install-file "src/withershins.hpp" include) | |
347 | (mkdir-p lib) | |
348 | (install-file "src/libwithershins.a" lib)) | |
76e14638 RW |
349 | #t))))) |
350 | (home-page "https://github.com/cameronwhite/withershins") | |
351 | (inputs | |
25734108 | 352 | `(("libiberty" ,libiberty) |
76e14638 RW |
353 | ("binutils" ,binutils) ;for libbfd |
354 | ("zlib" ,zlib))) | |
355 | (synopsis "C++11 library for generating stack traces") | |
356 | (description | |
357 | "Withershins is a simple cross-platform C++11 library for generating | |
358 | stack traces.") | |
359 | ;; Sources are released under Expat license, but since BFD is licensed | |
360 | ;; under the GPLv3+ the combined work is GPLv3+ as well. | |
361 | (license license:gpl3+))) | |
0084aaf3 LC |
362 | |
363 | (define-public lcov | |
364 | (package | |
365 | (name "lcov") | |
b15af0ce | 366 | (version "1.13") |
0084aaf3 LC |
367 | (source (origin |
368 | (method url-fetch) | |
de67e922 LF |
369 | (uri (string-append "mirror://sourceforge/ltp/Coverage%20Analysis" |
370 | "/LCOV-" version "/lcov-" version ".tar.gz")) | |
0084aaf3 LC |
371 | (sha256 |
372 | (base32 | |
b15af0ce | 373 | "08wabnb0gcjqk0qc65a6cgbbmz6b8lvam3p7byh0dk42hj3jr5s4")))) |
0084aaf3 LC |
374 | (build-system gnu-build-system) |
375 | (arguments | |
b15af0ce TGR |
376 | '(#:make-flags |
377 | (let ((out (assoc-ref %outputs "out"))) | |
378 | (list (string-append "PREFIX=" out))) | |
379 | #:phases | |
380 | (modify-phases %standard-phases | |
381 | (delete 'configure)) ; no configure script | |
382 | #:tests? #f)) ; no 'check' target | |
0084aaf3 LC |
383 | (inputs `(("perl" ,perl))) |
384 | (home-page "http://ltp.sourceforge.net/coverage/lcov.php") | |
385 | (synopsis "Code coverage tool that enhances GNU gcov") | |
386 | (description | |
387 | "LCOV is an extension of @command{gcov}, a tool part of the | |
388 | GNU@tie{}Binutils, which provides information about what parts of a program | |
389 | are actually executed (i.e., \"covered\") while running a particular test | |
390 | case. The extension consists of a set of Perl scripts which build on the | |
391 | textual @command{gcov} output to implement the following enhanced | |
392 | functionality such as HTML output.") | |
393 | (license license:gpl2+))) | |
4b3070f7 FT |
394 | |
395 | (define-public rtags | |
396 | (package | |
397 | (name "rtags") | |
af147cdd | 398 | (version "2.18") |
4b3070f7 | 399 | (home-page "https://github.com/Andersbakken/rtags") |
457fc22d FT |
400 | (source |
401 | (origin | |
402 | (method url-fetch) | |
403 | (uri | |
404 | (string-append home-page "/archive/v" version ".tar.gz")) | |
405 | (file-name (string-append name "-" version ".tar.gz")) | |
406 | (patches (search-patches "rtags-separate-rct.patch")) | |
407 | (modules '((guix build utils))) | |
408 | (snippet | |
409 | ;; Part of spliting rct with rtags. | |
410 | ;; Substitute #include "rct/header.h" with #include <rct/header.h>. | |
411 | '(with-directory-excursion "src" | |
412 | (delete-file-recursively "rct") ;remove bundled copy | |
413 | (let ((files (find-files "." ".*\\.cpp|.*\\.h"))) | |
414 | (substitute* files | |
415 | (("#include ?\"rct/(.*.h)\"" all header) | |
416 | (string-append "#include <rct/" header ">")))))) | |
417 | (sha256 | |
418 | (base32 | |
af147cdd | 419 | "0scjbp1z201q8njvrxqz7lk2m9b6k2rxd5q1shrng6532r7ndif2")))) |
4b3070f7 FT |
420 | (build-system cmake-build-system) |
421 | (arguments | |
457fc22d FT |
422 | '(#:configure-flags |
423 | '("-DRTAGS_NO_ELISP_FILES=1" | |
424 | "-DCMAKE_BUILD_TYPE=RelWithDebInfo" | |
425 | "-DCMAKE_CXX_FLAGS=-std=c++11" | |
426 | "-DBUILD_TESTING=FALSE") | |
4b3070f7 | 427 | #:tests? #f)) |
457fc22d FT |
428 | (native-inputs |
429 | `(("pkg-config" ,pkg-config))) | |
4b3070f7 | 430 | (inputs |
457fc22d FT |
431 | `(("bash-completion" ,bash-completion) |
432 | ("clang" ,clang) | |
4b3070f7 | 433 | ("llvm" ,llvm) |
457fc22d FT |
434 | ("lua" ,lua) |
435 | ("rct" ,rct) | |
436 | ("selene" ,selene))) | |
4b3070f7 FT |
437 | (synopsis "Indexer for the C language family with Emacs integration") |
438 | (description | |
439 | "RTags is a client/server application that indexes C/C++ code and keeps a | |
440 | persistent file-based database of references, declarations, definitions, | |
441 | symbolnames etc. There’s also limited support for ObjC/ObjC++. It allows you | |
442 | to find symbols by name (including nested class and namespace scope). Most | |
443 | importantly we give you proper follow-symbol and find-references support.") | |
444 | (license license:gpl3+))) | |
dc993847 OP |
445 | |
446 | (define-public colormake | |
447 | (package | |
448 | (name "colormake") | |
449 | (version "0.9.20140503") | |
450 | (source | |
451 | (origin | |
452 | (method url-fetch) | |
453 | (uri (string-append "https://github.com/pagekite/Colormake/archive/" | |
454 | version ".tar.gz")) | |
455 | (file-name (string-append name "-" version ".tar.gz")) | |
456 | (sha256 | |
457 | (base32 | |
458 | "08ldss9zd8ls6bjahvxhffpsjcysifr720yf3jz9db2mlklzmyd3")))) | |
459 | (build-system trivial-build-system) | |
460 | (native-inputs | |
461 | `(("bash" ,bash) | |
462 | ("gzip" ,gzip) | |
463 | ("perl" ,perl) | |
464 | ("tar" ,tar))) | |
465 | (arguments | |
466 | `(#:modules ((guix build utils)) | |
467 | #:builder | |
468 | (begin | |
469 | (use-modules (guix build utils)) | |
470 | ;; bootstrap | |
471 | (setenv "PATH" (string-append | |
472 | (assoc-ref %build-inputs "tar") "/bin" ":" | |
473 | (assoc-ref %build-inputs "gzip") "/bin")) | |
474 | (invoke "tar" "xvf" (assoc-ref %build-inputs "source")) | |
475 | (chdir (string-append (string-capitalize ,name) "-" ,version)) | |
476 | (patch-shebang "colormake.pl" | |
477 | (list (string-append (assoc-ref %build-inputs "perl") | |
478 | "/bin"))) | |
479 | (let* ((out (assoc-ref %outputs "out")) | |
480 | (bin (string-append out "/bin")) | |
481 | (doc (string-append out "/share/doc")) | |
482 | (install-files (lambda (files directory) | |
483 | (for-each (lambda (file) | |
484 | (install-file file directory)) | |
485 | files)))) | |
486 | (substitute* "colormake" | |
487 | (("colormake\\.pl") (string-append bin "/colormake.pl")) | |
488 | (("/bin/bash") | |
489 | (string-append (assoc-ref %build-inputs "bash") "/bin/sh"))) | |
490 | (install-file "colormake.1" (string-append doc "/man/man1")) | |
491 | (install-files '("AUTHORS" "BUGS" "ChangeLog" "README") doc) | |
492 | (install-files '("colormake" "colormake-short" "clmake" | |
493 | "clmake-short" "colormake.pl") | |
494 | bin))))) | |
495 | (home-page "http://bre.klaki.net/programs/colormake/") | |
496 | (synopsis "Wrapper around @command{make} to produce colored output") | |
497 | (description "This package provides a wrapper around @command{make} to | |
498 | produce colored output.") | |
499 | (license license:gpl2+))) |