gnu: r-zoo: Update to 1.8-7.
[jackhill/guix/guix.git] / gnu / packages / version-control.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
6 ;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
7 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
8 ;;; Copyright © 2014, 2016, 2019 Eric Bavier <bavier@member.fsf.org>
9 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
10 ;;; Copyright © 2015, 2018 Kyle Meyer <kyle@kyleam.com>
11 ;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
13 ;;; Copyright © 2016, 2017, 2018 ng0 <ng0@n0.is>
14 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
15 ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
16 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
17 ;;; Copyright © 2017 André <eu@euandre.org>
18 ;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
20 ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
21 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
22 ;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
23 ;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com>
24 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
25 ;;; Copyright © 2019 Jovany Leandro G.C <bit4bit@riseup.net>
26 ;;; Copyright © 2019 Kei Kebreau <kkebreau@posteo.net>
27 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
28 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
29 ;;;
30 ;;; This file is part of GNU Guix.
31 ;;;
32 ;;; GNU Guix is free software; you can redistribute it and/or modify it
33 ;;; under the terms of the GNU General Public License as published by
34 ;;; the Free Software Foundation; either version 3 of the License, or (at
35 ;;; your option) any later version.
36 ;;;
37 ;;; GNU Guix is distributed in the hope that it will be useful, but
38 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
39 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40 ;;; GNU General Public License for more details.
41 ;;;
42 ;;; You should have received a copy of the GNU General Public License
43 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
44
45 (define-module (gnu packages version-control)
46 #:use-module ((guix licenses) #:prefix license:)
47 #:use-module (guix utils)
48 #:use-module (guix packages)
49 #:use-module (guix download)
50 #:use-module (guix git-download)
51 #:use-module (guix build-system cmake)
52 #:use-module (guix build-system gnu)
53 #:use-module (guix build-system go)
54 #:use-module (guix build-system python)
55 #:use-module (guix build-system trivial)
56 #:use-module (gnu packages apr)
57 #:use-module (gnu packages autotools)
58 #:use-module (gnu packages documentation)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages bash)
61 #:use-module (gnu packages bison)
62 #:use-module (gnu packages boost)
63 #:use-module (gnu packages check)
64 #:use-module (gnu packages cook)
65 #:use-module (gnu packages curl)
66 #:use-module (gnu packages docbook)
67 #:use-module (gnu packages ed)
68 #:use-module (gnu packages file)
69 #:use-module (gnu packages flex)
70 #:use-module (gnu packages gettext)
71 #:use-module (gnu packages gl)
72 #:use-module (gnu packages groff)
73 #:use-module (gnu packages guile)
74 #:use-module (gnu packages image)
75 #:use-module (gnu packages linux)
76 #:use-module (gnu packages maths)
77 #:use-module (gnu packages nano)
78 #:use-module (gnu packages ncurses)
79 #:use-module (gnu packages ssh)
80 #:use-module (gnu packages web)
81 #:use-module (gnu packages openstack)
82 #:use-module (gnu packages pcre)
83 #:use-module (gnu packages perl)
84 #:use-module (gnu packages perl-check)
85 #:use-module (gnu packages pkg-config)
86 #:use-module (gnu packages python)
87 #:use-module (gnu packages python-web)
88 #:use-module (gnu packages python-xyz)
89 #:use-module (gnu packages readline)
90 #:use-module (gnu packages rsync)
91 #:use-module (gnu packages sqlite)
92 #:use-module (gnu packages admin)
93 #:use-module (gnu packages xml)
94 #:use-module (gnu packages emacs)
95 #:use-module (gnu packages compression)
96 #:use-module (gnu packages sdl)
97 #:use-module (gnu packages swig)
98 #:use-module (gnu packages sync)
99 #:use-module (gnu packages tcl)
100 #:use-module (gnu packages textutils)
101 #:use-module (gnu packages time)
102 #:use-module (gnu packages tls)
103 #:use-module (gnu packages)
104 #:use-module (ice-9 match)
105 #:use-module (srfi srfi-1))
106
107 (define-public bazaar
108 (package
109 (name "bazaar")
110 (version "2.7.0")
111 (source
112 (origin
113 (method url-fetch)
114 (uri (string-append "https://launchpad.net/bzr/"
115 (version-major+minor version) "/" version
116 "/+download/bzr-" version ".tar.gz"))
117 (patches (search-patches "bazaar-CVE-2017-14176.patch"))
118 (sha256
119 (base32
120 "1cysix5k3wa6y7jjck3ckq3abls4gvz570s0v0hxv805nwki4i8d"))))
121 (build-system python-build-system)
122 (inputs
123 ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh'
124 ;; require Zsh.
125 `(("gettext" ,gettext-minimal)))
126 (arguments
127 `(#:tests? #f ; no test target
128 #:python ,python-2 ; Python 3 apparently not yet supported, see
129 ; https://answers.launchpad.net/bzr/+question/229048
130 #:phases
131 (modify-phases %standard-phases
132 (add-after 'unpack 'fix-mandir
133 (lambda _
134 (substitute* "setup.py"
135 (("man/man1") "share/man/man1"))
136 #t)))))
137 (home-page "https://gnu.org/software/bazaar")
138 (synopsis "Version control system supporting both distributed and centralized workflows")
139 (description
140 "GNU Bazaar is a version control system that allows you to record
141 changes to project files over time. It supports both a distributed workflow
142 as well as the classic centralized workflow.")
143 (license license:gpl2+)))
144
145 (define-public git
146 (package
147 (name "git")
148 ;; XXX When updating Git, check if the special 'git-source' input to cgit
149 ;; needs to be updated as well.
150 (version "2.25.0")
151 (source (origin
152 (method url-fetch)
153 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
154 version ".tar.xz"))
155 (sha256
156 (base32
157 "1l58v42aazj0x9276gk8r9mwyl9pgp9w99aakz4xfhzv7wd2jq60"))))
158 (build-system gnu-build-system)
159 (native-inputs
160 `(("native-perl" ,perl)
161 ("gettext" ,gettext-minimal)
162 ("git-manpages"
163 ,(origin
164 (method url-fetch)
165 (uri (string-append
166 "mirror://kernel.org/software/scm/git/git-manpages-"
167 version ".tar.xz"))
168 (sha256
169 (base32
170 "1gf8b1k6i4dlwskwq7dd2vz9bzc3m1qnknj9daq2vp39vmxpg5nk"))))
171 ;; For subtree documentation.
172 ("asciidoc" ,asciidoc)
173 ("docbook-xsl" ,docbook-xsl)
174 ("xmlto" ,xmlto)))
175 (inputs
176 `(("curl" ,curl)
177 ("expat" ,expat)
178 ("openssl" ,openssl)
179 ("perl" ,perl)
180 ("python" ,python-2) ; CAVEAT: incompatible with python-3 according to INSTALL
181 ("zlib" ,zlib)
182
183 ;; Note: we keep this in inputs rather than native-inputs to work around
184 ;; a problem in 'patch-shebangs'; see <https://bugs.gnu.org/31952>.
185 ("bash-for-tests" ,bash)
186
187 ;; For PCRE support in git grep (USE_LIBPCRE2).
188 ("pcre" ,pcre2)
189
190 ;; For 'gitweb.cgi'.
191 ("perl-cgi" ,perl-cgi)
192
193 ;; For 'git-svn'.
194 ("subversion" ,subversion)
195 ("perl-term-readkey" ,perl-term-readkey)
196
197 ;; For 'git-send-email'.
198 ("perl-authen-sasl" ,perl-authen-sasl)
199 ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
200 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
201
202 ;; For 'git gui', 'gitk', and 'git citool'.
203 ("tcl" ,tcl)
204 ("tk" ,tk)))
205 (outputs '("out" ; the core
206 "send-email" ; for git-send-email
207 "svn" ; git-svn
208 "credential-netrc" ; git-credential-netrc
209 "subtree" ; git-subtree
210 "gui")) ; gitk, git gui
211 (arguments
212 `(#:make-flags `("V=1" ;more verbose compilation
213
214 ,(string-append "SHELL_PATH="
215 (assoc-ref %build-inputs "bash")
216 "/bin/sh")
217
218 ;; Tests require a bash with completion support.
219 ,(string-append "TEST_SHELL_PATH="
220 (assoc-ref %build-inputs "bash-for-tests")
221 "/bin/bash")
222
223 "USE_LIBPCRE2=yes"
224
225 ;; By default 'make install' creates hard links for
226 ;; things in 'libexec/git-core', which leads to huge
227 ;; nars; see <https://bugs.gnu.org/21949>.
228 "NO_INSTALL_HARDLINKS=indeed")
229
230 ;; Make sure the full bash does not end up in the final closure.
231 #:disallowed-references (,bash)
232
233 #:test-target "test"
234
235 ;; Tests fail randomly when parallel: <https://bugs.gnu.org/29512>.
236 #:parallel-tests? #f
237
238 ;; The explicit --with-tcltk forces the build system to hardcode the
239 ;; absolute file name to 'wish'.
240 #:configure-flags (list (string-append "--with-tcltk="
241 (assoc-ref %build-inputs "tk")
242 "/bin/wish8.6")) ; XXX
243
244 #:modules ((srfi srfi-1)
245 (srfi srfi-26)
246 ,@%gnu-build-system-modules)
247 #:phases
248 (modify-phases %standard-phases
249 (add-after 'unpack 'modify-PATH
250 (lambda* (#:key inputs #:allow-other-keys)
251 (let ((path (string-split (getenv "PATH") #\:))
252 (bash-full (assoc-ref inputs "bash-for-tests")))
253 ;; Drop the test bash from PATH so that (which "sh") and
254 ;; similar does the right thing.
255 (setenv "PATH" (string-join
256 (remove (cut string-prefix? bash-full <>) path)
257 ":"))
258 #t)))
259 (add-after 'configure 'patch-makefiles
260 (lambda _
261 (substitute* "Makefile"
262 (("/usr/bin/perl") (which "perl"))
263 (("/usr/bin/python") (which "python")))
264 #t))
265 (add-after 'configure 'add-PM.stamp
266 (lambda _
267 ;; Add the "PM.stamp" to avoid "no rule to make target".
268 (call-with-output-file "perl/PM.stamp" (const #t))
269 #t))
270 (add-after 'build 'build-subtree
271 (lambda* (#:key inputs #:allow-other-keys)
272 (with-directory-excursion "contrib/subtree"
273 (substitute* "Makefile"
274 ;; Apparently `xmlto' does not bother to looks up the stylesheets
275 ;; specified in the XML, unlike the above substitution. Instead it
276 ;; uses a hard-coded URL. Work around it here, but if this is
277 ;; common perhaps we should hardcode this path in xmlto itself.
278 (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\) man")
279 (string-append "$(XMLTO) -x "
280 (string-append (assoc-ref inputs "docbook-xsl")
281 "/xml/xsl/docbook-xsl-"
282 ,(package-version docbook-xsl))
283 "/manpages/docbook.xsl -m $(MANPAGE_XSL) man")))
284 (invoke "make")
285 (invoke "make" "install")
286 (invoke "make" "install-doc")
287 (substitute* "git-subtree"
288 (("/bin/sh") (which "sh"))))
289 #t))
290 (add-before 'check 'patch-tests
291 (lambda _
292 (let ((store-directory (%store-directory)))
293 ;; These files contain some funny bytes that Guile is unable
294 ;; to decode for shebang patching. Just delete them.
295 (for-each delete-file '("t/t4201-shortlog.sh"
296 "t/t7813-grep-icase-iso.sh"))
297 ;; Many tests contain inline shell scripts (hooks etc).
298 (substitute* (find-files "t" "\\.sh$")
299 (("#!/bin/sh") (string-append "#!" (which "sh"))))
300 ;; Un-do shebang patching here to prevent checksum mismatch.
301 (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
302 (("^#!.*/bin/perl") "#!/usr/bin/perl"))
303 (substitute* "t/t5003-archive-zip.sh"
304 (("cp /bin/sh") (string-append "cp " (which "sh"))))
305 (substitute* "t/t6030-bisect-porcelain.sh"
306 (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
307 ;; FIXME: This test runs `git commit` with a bogus EDITOR
308 ;; and empty commit message, but does not fail the way it's
309 ;; expected to. The test passes when invoked interactively.
310 (substitute* "t/t7508-status.sh"
311 (("\tcommit_template_commented") "\ttrue"))
312 ;; More checksum mismatches due to odd shebangs.
313 (substitute* "t/t9100-git-svn-basic.sh"
314 (((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") )
315 (substitute* "t/t9300-fast-import.sh"
316 (((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh")
317 (((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh"))
318 ;; FIXME: Some hooks fail with "basename: command not found".
319 ;; See 't/trash directory.t9164.../svn-hook.log'.
320 (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
321
322 ;; XXX: These tests fail intermittently for unknown reasons:
323 ;; <https://bugs.gnu.org/29546>.
324 (for-each delete-file
325 '("t/t9128-git-svn-cmd-branch.sh"
326 "t/t9167-git-svn-cmd-branch-subproject.sh"
327 "t/t9141-git-svn-multiple-branches.sh"))
328 #t)))
329 (add-after 'install 'install-shell-completion
330 (lambda* (#:key outputs #:allow-other-keys)
331 (let* ((out (assoc-ref outputs "out"))
332 (completions (string-append out "/etc/bash_completion.d")))
333 ;; TODO: Install the tcsh and zsh completions in the right place.
334 (mkdir-p completions)
335 (copy-file "contrib/completion/git-completion.bash"
336 (string-append completions "/git"))
337 #t)))
338 (add-after 'install 'install-credential-netrc
339 (lambda* (#:key outputs #:allow-other-keys)
340 (let* ((netrc (assoc-ref outputs "credential-netrc")))
341 (install-file "contrib/credential/netrc/git-credential-netrc"
342 (string-append netrc "/bin"))
343 ;; Previously, Git.pm was automatically found by netrc.
344 ;; Perl 5.26 changed how it locates modules so that @INC no
345 ;; longer includes the current working directory (the Perl
346 ;; community calls this "dotless @INC").
347 (wrap-program (string-append netrc "/bin/git-credential-netrc")
348 `("PERL5LIB" ":" prefix
349 (,(string-append (assoc-ref outputs "out") "/share/perl5"))))
350 #t)))
351 (add-after 'install 'install-subtree
352 (lambda* (#:key outputs #:allow-other-keys)
353 (let ((subtree (assoc-ref outputs "subtree")))
354 (install-file "contrib/subtree/git-subtree"
355 (string-append subtree "/bin"))
356 (install-file "contrib/subtree/git-subtree.1"
357 (string-append subtree "/share/man/man1"))
358 #t)))
359 (add-after 'install 'split
360 (lambda* (#:key inputs outputs #:allow-other-keys)
361 ;; Split the binaries to the various outputs.
362 (let* ((out (assoc-ref outputs "out"))
363 (se (assoc-ref outputs "send-email"))
364 (svn (assoc-ref outputs "svn"))
365 (gui (assoc-ref outputs "gui"))
366 (gitk (string-append out "/bin/gitk"))
367 (gitk* (string-append gui "/bin/gitk"))
368 (git-gui (string-append out "/libexec/git-core/git-gui"))
369 (git-gui* (string-append gui "/libexec/git-core/git-gui"))
370 (git-cit (string-append out "/libexec/git-core/git-citool"))
371 (git-cit* (string-append gui "/libexec/git-core/git-citool"))
372 (git-se (string-append out "/libexec/git-core/git-send-email"))
373 (git-se* (string-append se "/libexec/git-core/git-send-email"))
374 (git-svn (string-append out "/libexec/git-core/git-svn"))
375 (git-svn* (string-append svn "/libexec/git-core/git-svn"))
376 (git-sm (string-append out
377 "/libexec/git-core/git-submodule")))
378 (mkdir-p (string-append gui "/bin"))
379 (mkdir-p (string-append gui "/libexec/git-core"))
380 (mkdir-p (string-append se "/libexec/git-core"))
381 (mkdir-p (string-append svn "/libexec/git-core"))
382
383 (for-each (lambda (old new)
384 (copy-file old new)
385 (delete-file old)
386 (chmod new #o555))
387 (list gitk git-gui git-cit git-se git-svn)
388 (list gitk* git-gui* git-cit* git-se* git-svn*))
389
390 ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
391 (wrap-program git-svn*
392 `("PATH" ":" prefix
393 (,(string-append (assoc-ref inputs "subversion")
394 "/bin")))
395 `("PERL5LIB" ":" prefix
396 ,(map (lambda (i) (string-append (assoc-ref inputs i)
397 "/lib/perl5/site_perl"))
398 '("subversion" "perl-term-readkey")))
399
400 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
401 ;; help it find 'libsvn_client-1.so'.
402 `("LD_LIBRARY_PATH" ":" prefix
403 (,(string-append (assoc-ref inputs "subversion")
404 "/lib"))))
405
406 ;; Tell 'git-send-email' where perl modules are.
407 (wrap-program git-se*
408 `("PERL5LIB" ":" prefix
409 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
410 (list
411 ,@(transitive-input-references
412 'inputs
413 (map (lambda (l)
414 (assoc l (package-inputs this-package)))
415 '("perl-authen-sasl"
416 "perl-net-smtp-ssl"
417 "perl-io-socket-ssl")))))))
418
419 ;; Tell 'gitweb.cgi' where perl modules are.
420 (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
421 `("PERL5LIB" ":" prefix
422 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
423 (list
424 ,@(transitive-input-references
425 'inputs
426 (map (lambda (l)
427 (assoc l (package-inputs this-package)))
428 '("perl-cgi")))))))
429
430 ;; Tell 'git-submodule' where Perl is.
431 (wrap-program git-sm
432 `("PATH" ":" prefix
433 (,(string-append (assoc-ref inputs "perl")
434 "/bin"))))
435
436 #t)))
437 (add-after 'split 'install-man-pages
438 (lambda* (#:key inputs outputs #:allow-other-keys)
439 (let* ((out (assoc-ref outputs "out"))
440 (man (string-append out "/share/man"))
441 (manpages (assoc-ref inputs "git-manpages")))
442 (mkdir-p man)
443 (with-directory-excursion man
444 (invoke "tar" "xvf" manpages))))))))
445
446 (native-search-paths
447 ;; For HTTPS access, Git needs a single-file certificate bundle, specified
448 ;; with $GIT_SSL_CAINFO.
449 (list (search-path-specification
450 (variable "GIT_SSL_CAINFO")
451 (file-type 'regular)
452 (separator #f) ;single entry
453 (files '("etc/ssl/certs/ca-certificates.crt")))
454 (search-path-specification
455 (variable "GIT_EXEC_PATH")
456 (separator #f) ;single entry
457 (files '("libexec/git-core")))))
458
459 (synopsis "Distributed version control system")
460 (description
461 "Git is a free distributed version control system designed to handle
462 everything from small to very large projects with speed and efficiency.")
463 (license license:gpl2)
464 (home-page "https://git-scm.com/")))
465
466 (define-public git-minimal
467 ;; The size of the closure of 'git-minimal' is two thirds that of 'git'.
468 ;; Its test suite runs slightly faster and most importantly it doesn't
469 ;; depend on packages that are expensive to build such as Subversion.
470 (package
471 (inherit git)
472 (name "git-minimal")
473 (arguments
474 (substitute-keyword-arguments (package-arguments git)
475 ((#:phases phases)
476 `(modify-phases ,phases
477 (replace 'patch-makefiles
478 (lambda _
479 (substitute* "Makefile"
480 (("/usr/bin/perl") (which "perl")))
481 #t))
482 (delete 'build-subtree)
483 (delete 'split)
484 (delete 'install-man-pages)
485 (delete 'install-subtree)
486 (delete 'install-credential-netrc)
487 (add-before 'check 'delete-svn-test
488 (lambda _
489 ;; This test cannot run since we are not building 'git-svn'.
490 (delete-file "t/t9020-remote-svn.sh")
491 #t))
492 (add-after 'install 'remove-unusable-perl-commands
493 (lambda* (#:key outputs #:allow-other-keys)
494 (let* ((out (assoc-ref outputs "out"))
495 (bin (string-append out "/bin"))
496 (libexec (string-append out "/libexec")))
497 (for-each (lambda (file)
498 (delete-file (string-append libexec
499 "/git-core/" file)))
500 '("git-svn" "git-cvsimport" "git-archimport"
501 "git-cvsserver" "git-request-pull"
502 "git-add--interactive" "git-cvsexportcommit"
503 "git-instaweb" "git-send-email"))
504 (delete-file (string-append bin "/git-cvsserver"))
505
506 ;; These templates typically depend on Perl. Remove them.
507 (delete-file-recursively
508 (string-append out "/share/git-core/templates/hooks"))
509
510 ;; Gitweb depends on Perl as well.
511 (delete-file-recursively
512 (string-append out "/share/gitweb"))
513 #t)))))
514 ((#:make-flags flags)
515 `(delete "USE_LIBPCRE2=yes" ,flags))
516 ((#:configure-flags flags)
517 ''())
518 ((#:disallowed-references lst '())
519 `(,perl ,@lst))))
520 (outputs '("out"))
521 (native-inputs
522 `(("native-perl" ,perl)
523 ("gettext" ,gettext-minimal)))
524 (inputs
525 `(("curl" ,curl) ;for HTTP(S) access
526 ("expat" ,expat) ;for 'git push' over HTTP(S)
527 ("openssl" ,openssl)
528 ("perl" ,perl)
529 ("zlib" ,zlib)
530 ("bash-for-tests" ,bash)))))
531
532 (define-public libgit2
533 (package
534 (name "libgit2")
535 (version "0.28.4")
536 (source (origin
537 (method git-fetch)
538 (uri (git-reference
539 (url "https://github.com/libgit2/libgit2.git")
540 (commit (string-append "v" version))))
541 (file-name (git-file-name name version))
542 (sha256
543 (base32
544 "171b25aym4q88bidc4c76y4l6jmdwifm3q9zjqsll0wjhlkycfy1"))
545 (patches (search-patches "libgit2-avoid-python.patch"
546 "libgit2-mtime-0.patch"))
547
548 ;; Remove bundled software.
549 (snippet '(begin
550 (delete-file-recursively "deps")
551 #t))
552 (modules '((guix build utils)))))
553 (build-system cmake-build-system)
554 (outputs '("out" "debug"))
555 (arguments
556 `(#:configure-flags '("-DUSE_SHA1DC=ON") ; SHA-1 collision detection
557 #:phases
558 (modify-phases %standard-phases
559 (add-after 'unpack 'fix-hardcoded-paths
560 (lambda _
561 (substitute* "tests/repo/init.c"
562 (("#!/bin/sh") (string-append "#!" (which "sh"))))
563 (substitute* "tests/clar/fs.h"
564 (("/bin/cp") (which "cp"))
565 (("/bin/rm") (which "rm")))
566 #t))
567 (add-after 'unpack 'make-git-checkout-writable
568 (lambda _
569 (for-each make-file-writable (find-files "."))
570 #t))
571 ;; Run checks more verbosely.
572 (replace 'check
573 (lambda _ (invoke "./libgit2_clar" "-v" "-Q"))))))
574 (inputs
575 `(("libssh2" ,libssh2)
576 ("http-parser" ,http-parser)))
577 (native-inputs
578 `(("guile" ,guile-2.2)
579 ("pkg-config" ,pkg-config)))
580 (propagated-inputs
581 ;; These two libraries are in 'Requires.private' in libgit2.pc.
582 `(("openssl" ,openssl)
583 ("zlib" ,zlib)))
584 (home-page "https://libgit2.github.com/")
585 (synopsis "Library providing Git core methods")
586 (description
587 "Libgit2 is a portable, pure C implementation of the Git core methods
588 provided as a re-entrant linkable library with a solid API, allowing you to
589 write native speed custom Git applications in any language with bindings.")
590 ;; GPLv2 with linking exception
591 (license license:gpl2)))
592
593 (define-public git-crypt
594 (package
595 (name "git-crypt")
596 (version "0.5.0")
597 (source
598 (origin
599 (method git-fetch)
600 (uri (git-reference
601 (url "https://github.com/AGWA/git-crypt.git")
602 (commit version)))
603 (file-name (git-file-name name version))
604 (sha256
605 (base32 "1x9209n3k49k998saadr2d0lmvs01smjinx7gzzyjdwj9l904sii"))))
606 (build-system gnu-build-system)
607 (inputs
608 `(("git" ,git)
609 ("openssl" ,openssl)))
610 (arguments
611 `(#:tests? #f ; No tests.
612 #:phases
613 (modify-phases %standard-phases
614 (delete 'configure)
615 (replace 'build
616 (lambda _
617 (invoke "make")))
618 (replace 'install
619 (lambda* (#:key outputs #:allow-other-keys)
620 (let ((out (assoc-ref outputs "out")))
621 (invoke "make" "install"
622 (string-append "PREFIX=" out))))))))
623 (home-page "https://www.agwa.name/projects/git-crypt")
624 (synopsis "Transparent encryption of files in a git repository")
625 (description "git-crypt enables transparent encryption and decryption of
626 files in a git repository. Files which you choose to protect are encrypted when
627 committed, and decrypted when checked out. git-crypt lets you freely share a
628 repository containing a mix of public and private content. git-crypt gracefully
629 degrades, so developers without the secret key can still clone and commit to a
630 repository with encrypted files. This lets you store your secret material (such
631 as keys or passwords) in the same repository as your code, without requiring you
632 to lock down your entire repository.")
633 (license license:gpl3+)))
634
635 (define-public git-remote-gcrypt
636 (package
637 (name "git-remote-gcrypt")
638 (version "1.0.3")
639 (source (origin
640 (method git-fetch)
641 (uri (git-reference
642 (url "https://git.spwhitton.name/git-remote-gcrypt")
643 (commit version)))
644 (file-name (string-append name "-" version "-checkout"))
645 (sha256
646 (base32
647 "1vay3204729c7wajgn3nxf0s0hzwpdrw14pl6kd8w2ss25gvw2k1"))))
648 (build-system trivial-build-system)
649 (arguments
650 `(#:modules ((guix build utils))
651 #:builder (begin
652 (use-modules (guix build utils))
653 (let* ((source (assoc-ref %build-inputs "source"))
654 (output (assoc-ref %outputs "out"))
655 (bindir (string-append output "/bin")))
656 (install-file (string-append source "/git-remote-gcrypt")
657 bindir)
658 #t))))
659 (home-page "https://spwhitton.name/tech/code/git-remote-gcrypt/")
660 (synopsis "Whole remote repository encryption")
661 (description "git-remote-gcrypt is a Git remote helper to push and pull from
662 repositories encrypted with GnuPG. It works with the standard Git transports,
663 including repository hosting services like GitLab.
664
665 Remote helper programs are invoked by Git to handle network transport. This
666 helper handles @code{gcrypt:} URLs that access a remote repository encrypted
667 with GPG, using our custom format.
668
669 Supported locations are local, @code{rsync://} and @code{sftp://}, where the
670 repository is stored as a set of files, or instead any Git URL where gcrypt
671 will store the same representation in a Git repository, bridged over arbitrary
672 Git transport.
673
674 The aim is to provide confidential, authenticated Git storage and
675 collaboration using typical untrusted file hosts or services.")
676 (license license:gpl3+)))
677
678 (define-public cgit
679 (package
680 (name "cgit")
681 (version "1.2.1")
682 (source (origin
683 (method url-fetch)
684 (uri (string-append
685 "https://git.zx2c4.com/cgit/snapshot/cgit-"
686 version ".tar.xz"))
687 (sha256
688 (base32
689 "1gw2j5xc5qdx2hwiwkr8h6kgya7v9d9ff9j32ga1dys0cca7qm1w"))))
690 (build-system gnu-build-system)
691 (arguments
692 '(#:tests? #f ; XXX: fail to build the in-source git.
693 #:test-target "test"
694 #:make-flags '("CC=gcc" "SHELL_PATH=sh")
695 #:phases
696 (modify-phases %standard-phases
697 (add-after 'unpack 'unpack-git
698 (lambda* (#:key inputs #:allow-other-keys)
699 ;; Unpack the source of git into the 'git' directory.
700 (invoke "tar" "--strip-components=1" "-C" "git" "-xf"
701 (assoc-ref inputs "git-source"))))
702 (add-after 'unpack 'patch-absolute-file-names
703 (lambda* (#:key inputs #:allow-other-keys)
704 (define (quoted-file-name input path)
705 (string-append "\"" input path "\""))
706 (substitute* "ui-snapshot.c"
707 (("\"gzip\"")
708 (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
709 (("\"bzip2\"")
710 (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
711 (("\"xz\"")
712 (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
713
714 (substitute* "filters/about-formatting.sh"
715 (("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out")
716 "/lib/cgit/filters"))
717 (("\\| tr") (string-append "| " (which "tr"))))
718
719 (substitute* "filters/html-converters/txt2html"
720 (("sed") (which "sed")))
721
722 (substitute* "filters/html-converters/man2html"
723 (("groff") (which "groff")))
724
725 (substitute* "filters/html-converters/rst2html"
726 (("rst2html\\.py") (which "rst2html.py")))
727
728 #t))
729 (delete 'configure) ; no configure script
730 (add-after 'build 'build-man
731 (lambda* (#:key make-flags #:allow-other-keys)
732 (apply invoke "make" "doc-man" make-flags)))
733 (replace 'install
734 (lambda* (#:key make-flags outputs #:allow-other-keys)
735 (let ((out (assoc-ref outputs "out")))
736 (apply invoke
737 "make" "install" "install-man"
738 (string-append "prefix=" out)
739 (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
740 make-flags)
741 ;; Move the platform-dependent 'cgit.cgi' into lib to get it
742 ;; stripped.
743 (rename-file (string-append out "/share/cgit/cgit.cgi")
744 (string-append out "/lib/cgit/cgit.cgi"))
745 #t)))
746 (add-after 'install 'wrap-python-scripts
747 (lambda* (#:key outputs #:allow-other-keys)
748 (for-each
749 (lambda (file)
750 (wrap-program (string-append (assoc-ref outputs "out")
751 "/lib/cgit/filters/" file)
752 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
753 '("syntax-highlighting.py"
754 "html-converters/md2html"))
755 #t)))))
756 (native-inputs
757 ;; For building manpage.
758 `(("asciidoc" ,asciidoc)
759 ("gzip" ,gzip)
760 ("bzip2" ,bzip2)
761 ("xz" ,xz)))
762 (inputs
763 `(;; Building cgit requires a Git source tree.
764 ("git-source"
765 ,(origin
766 (method url-fetch)
767 ;; XXX CGit is currently incompatible with Git > 2.18.
768 (uri "mirror://kernel.org/software/scm/git/git-2.18.2.tar.xz")
769 (sha256
770 (base32
771 "1gmcz5k8sa6phzhhv6zjl8izbyqnxcdb8ns8kd2czyak0g409vrq"))))
772 ("openssl" ,openssl)
773 ("groff" ,groff)
774 ("python" ,python)
775 ("python-docutils" ,python-docutils)
776 ("python-markdown" ,python-markdown)
777 ("python-pygments" ,python-pygments)
778 ("zlib" ,zlib)))
779 (home-page "https://git.zx2c4.com/cgit/")
780 (synopsis "Web frontend for git repositories")
781 (description
782 "CGit is an attempt to create a fast web interface for the Git SCM, using
783 a built-in cache to decrease server I/O pressure.")
784 (license license:gpl2)))
785
786 (define-public python-ghp-import
787 (package
788 (name "python-ghp-import")
789 (version "0.5.5")
790 (source
791 (origin
792 (method git-fetch)
793 (uri (git-reference
794 (url "https://github.com/davisp/ghp-import.git")
795 (commit version)))
796 (file-name (git-file-name name version))
797 (sha256
798 (base32 "12pmw3zz3i57ljnm0rxdyjqdyhisbvy18mjwkb3bzp5pgzs2f45c"))))
799 (build-system python-build-system)
800 (arguments
801 `(#:phases (modify-phases %standard-phases
802 (add-after 'install 'install-documentation
803 (lambda* (#:key outputs #:allow-other-keys)
804 (let* ((out (assoc-ref outputs "out"))
805 (doc (string-append out "/share/doc"))
806 (licenses (string-append out "/share/licenses")))
807 (install-file "README.md" doc)
808 (install-file "LICENSE" licenses)))))))
809 (home-page "https://github.com/davisp/ghp-import")
810 (synopsis "Copy directory to the gh-pages branch")
811 (description "Script that copies a directory to the gh-pages branch (by
812 default) of the repository.")
813
814 ;; See <https://bugs.gnu.org/27913>.
815 (license (license:non-copyleft
816 "https://raw.githubusercontent.com/davisp/ghp-import/master/LICENSE"
817 "Tumbolia Public License"))))
818
819 (define-public python2-ghp-import
820 (package-with-python2
821 (strip-python2-variant python-ghp-import)))
822
823 (define-public python-gitdb
824 (package
825 (name "python-gitdb")
826 (version "2.0.4")
827 (source (origin
828 (method url-fetch)
829 (uri (pypi-uri "gitdb2" version))
830 (sha256
831 (base32
832 "0i608q9c47rdsmyac1cn6s0hzwwj7cb957y8fc9wacc5lnw8ak5v"))))
833 (build-system python-build-system)
834 (arguments
835 `(#:phases (modify-phases %standard-phases
836 (add-before 'check 'create-test-repository
837 (lambda _
838 (mkdir "/tmp/testrepo")
839 ;; Some tests require a git repository, so create one.
840 (with-directory-excursion "/tmp/testrepo"
841 (do ((filecount 1 (1+ filecount)))
842 ((> filecount 1000))
843 (call-with-output-file (string-append
844 "file" (number->string filecount))
845 (lambda (port)
846 (format port "~a" filecount))))
847 (begin
848 (invoke "git" "init")
849 (invoke "git" "config" "user.name" "Total Git")
850 (invoke "git" "config" "user.email" "git@localhost")
851 (invoke "git" "add" "-A")
852 (invoke "git" "commit" "-q" "-m" "dummy commit")))
853
854 ;; The repository checkout must be a "bare" clone.
855 (invoke "git" "clone" "--bare" "/tmp/testrepo"
856 "/tmp/testrepo.git")))
857 (replace 'check
858 (lambda _
859 (setenv "GITDB_TEST_GIT_REPO_BASE" "/tmp/testrepo.git")
860 ;; Skip tests that must be run from the gitdb repository.
861 (setenv "TRAVIS" "1")
862 (invoke "nosetests" "-v"))))))
863 (propagated-inputs
864 `(("python-smmap2" ,python-smmap2)))
865 (native-inputs
866 `(("git" ,git)
867 ("python-nose" ,python-nose)))
868 (home-page "https://github.com/gitpython-developers/gitdb")
869 (synopsis "Python implementation of the Git object database")
870 (description
871 "GitDB allows you to access @dfn{bare} Git repositories for reading and
872 writing. It aims at allowing full access to loose objects as well as packs
873 with performance and scalability in mind. It operates exclusively on streams,
874 allowing to handle large objects with a small memory footprint.")
875 (license license:bsd-3)))
876
877 (define-public python2-gitdb
878 (package-with-python2 python-gitdb))
879
880 (define-public python-gitpython
881 (package
882 (name "python-gitpython")
883 (version "2.1.11")
884 (source (origin
885 (method url-fetch)
886 (uri (pypi-uri "GitPython" version))
887 (sha256
888 (base32
889 "1a357c28dnhgvq3saia7v29r71ynp48l2qp5xsmnc4vgzmdxqdw2"))))
890 (build-system python-build-system)
891 (arguments
892 `(#:tests? #f ;XXX: Tests can only be run within the GitPython repository.
893 #:phases (modify-phases %standard-phases
894 (add-after 'unpack 'embed-git-reference
895 (lambda* (#:key inputs #:allow-other-keys)
896 (substitute* "git/cmd.py"
897 (("git_exec_name = \"git\"")
898 (string-append "git_exec_name = \""
899 (assoc-ref inputs "git")
900 "/bin/git\"")))
901 #t)))))
902 (inputs
903 `(("git" ,git)))
904 (propagated-inputs
905 `(("python-gitdb" ,python-gitdb)))
906 (native-inputs
907 `(("python-ddt" ,python-ddt)
908 ("python-nose" ,python-nose)))
909 (home-page "https://github.com/gitpython-developers/GitPython")
910 (synopsis "Python library for interacting with Git repositories")
911 (description
912 "GitPython is a python library used to interact with Git repositories,
913 high-level like git-porcelain, or low-level like git-plumbing.
914
915 It provides abstractions of Git objects for easy access of repository data,
916 and additionally allows you to access the Git repository more directly using
917 either a pure Python implementation, or the faster, but more resource intensive
918 @command{git} command implementation.")
919 (license license:bsd-3)))
920
921 (define-public python2-gitpython
922 (package-with-python2 python-gitpython))
923
924 (define-public shflags
925 (package
926 (name "shflags")
927 (version "1.2.3")
928 (source (origin
929 (method git-fetch)
930 (uri (git-reference
931 (url "https://github.com/kward/shflags.git")
932 (commit (string-append "v" version))))
933 (file-name (git-file-name name version))
934 (sha256
935 (base32
936 "1ydx0sb6vz9s2dgp5bd64y7fpzh9qvmlfjxrbmzac8saknijrlly"))))
937 (build-system gnu-build-system)
938 (arguments
939 `(#:tests? #f ; no tests
940 #:phases
941 (modify-phases %standard-phases
942 (delete 'configure) ; nothing to configure
943 (delete 'build) ; nothing to build
944 (replace 'install
945 (lambda* (#:key outputs #:allow-other-keys)
946 (let* ((out (assoc-ref outputs "out"))
947 (src (string-append out "/src")))
948 (install-file "shflags" src)
949 #t))))))
950 (home-page "https://github.com/kward/shflags")
951 (synopsis "Command-line flags library for shell scripts")
952 (description
953 "Shell Flags (shFlags) is a library written to greatly simplify the
954 handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
955 ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
956 different versions of getopt on various OSes make writing portable shell
957 scripts difficult. shFlags instead provides an API that doesn't change across
958 shell and OS versions so the script writer can be confident that the script
959 will work.")
960 (license license:lgpl2.1)))
961
962 (define-public git-flow
963 (package
964 (name "git-flow")
965 ;; This version has not be officially released yet, so we build it
966 ;; directly from the git repository.
967 (version "0.4.2-pre")
968 (source (origin
969 (method git-fetch)
970 (uri (git-reference
971 (url "https://github.com/nvie/gitflow/")
972 (commit "15aab26490facf285acef56cb5d61025eacb3a69")))
973 (file-name (git-file-name name version))
974 (sha256
975 (base32
976 "01fs97q76fdfnvmrh2cyjhywcs3pykf1dg58sy0frflnsdzs6prx"))))
977 (build-system gnu-build-system)
978 (inputs `(("shflags" ,shflags)))
979 (arguments
980 '(#:tests? #f ; no tests
981 #:make-flags (list (string-append "prefix="
982 (assoc-ref %outputs "out")))
983 #:phases
984 (modify-phases %standard-phases
985 (add-after 'unpack 'reset-shFlags-link
986 (lambda* (#:key inputs #:allow-other-keys)
987 ;; The link points to a file in the shFlags submodule.
988 ;; Redirect it to point to our system shFlags.
989 (let ((shflags (assoc-ref inputs "shflags")))
990 (begin
991 (delete-file "gitflow-shFlags")
992 (symlink (string-append shflags "/src/shflags")
993 "gitflow-shFlags")))))
994 (delete 'configure)
995 (delete 'build))))
996 (home-page "http://nvie.com/posts/a-successful-git-branching-model/")
997 (synopsis "Git extensions for Vincent Driessen's branching model")
998 (description
999 "Vincent Driessen's branching model is a git branching and release
1000 management strategy that helps developers keep track of features, hotfixes,
1001 and releases in bigger software projects. The git-flow library of git
1002 subcommands helps automate some parts of the flow to make working with it a
1003 lot easier.")
1004 (license license:bsd-2)))
1005
1006 (define-public stgit
1007 (package
1008 (name "stgit")
1009 (version "0.18")
1010 (source
1011 (origin
1012 (method git-fetch)
1013 (uri (git-reference
1014 (url "https://github.com/ctmarinas/stgit.git")
1015 (commit (string-append "v" version))))
1016 (file-name (git-file-name name version))
1017 (sha256
1018 (base32 "0ydgg744m671nkhg7h4q2z3b9vpbc9914rbc0wcgimqfqsxkxx2y"))))
1019 (build-system python-build-system)
1020 (inputs
1021 `(("git" ,git)))
1022 (arguments
1023 `(#:python ,python-2
1024 #:phases
1025 (modify-phases %standard-phases
1026 (replace 'check
1027 (lambda _
1028 ;; Two tests will fail -> disable them. TODO: fix the failing tests
1029 (delete-file "t/t3300-edit.sh")
1030 (delete-file "t/t7504-commit-msg-hook.sh")
1031 (invoke "make" "test"))))))
1032 (home-page "http://procode.org/stgit/")
1033 (synopsis "Stacked Git")
1034 (description
1035 "StGit is a command-line application that provides functionality similar
1036 to Quilt (i.e., pushing/popping patches to/from a stack), but using Git
1037 instead of @command{diff} and @command{patch}. StGit stores its patches in a
1038 Git repository as normal Git commits, and provides a number of commands to
1039 manipulate them in various ways.")
1040 (license license:gpl2)))
1041
1042 (define-public vcsh
1043 (package
1044 (name "vcsh")
1045 (version "1.20151229")
1046 (source
1047 (origin
1048 (method git-fetch)
1049 (uri (git-reference
1050 (url "https://github.com/RichiH/vcsh.git")
1051 (commit (string-append "v" version))))
1052 (file-name (git-file-name name version))
1053 (sha256
1054 (base32 "1grpj45nbpv4j60vd2kg4rj53zrm0bc0h9l4pfd3c2mwbvywm6ab"))))
1055 (build-system gnu-build-system)
1056 (native-inputs
1057 `(("which" ,which)))
1058 (inputs
1059 `(("git" ,git)
1060 ("perl" ,perl)
1061 ("perl-test-harness" ,perl-test-harness)
1062 ("perl-shell-command" ,perl-shell-command)
1063 ("perl-test-most" ,perl-test-most)))
1064 (arguments
1065 '(#:phases (modify-phases %standard-phases
1066 (delete 'configure)
1067 (delete 'build))
1068 #:make-flags (list (string-append "PREFIX="
1069 (assoc-ref %outputs "out")))
1070 #:test-target "test"))
1071 (home-page "https://github.com/RichiH/vcsh")
1072 (synopsis "Version control system for @code{$HOME}")
1073 (description
1074 "vcsh version-controls configuration files in several Git repositories,
1075 all in one single directory. They all maintain their working trees without
1076 clobbering each other or interfering otherwise. By default, all Git
1077 repositories maintained via vcsh store the actual files in @code{$HOME},
1078 though this can be overridden.")
1079 (license license:gpl2+)))
1080
1081 (define-public git-test-sequence
1082 (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76"))
1083 (package
1084 (name "git-test-sequence")
1085 (version (string-append "20140312." (string-take commit 7)))
1086 (source (origin
1087 (method git-fetch)
1088 (uri (git-reference
1089 ;; There are many other scripts in this directory; we
1090 ;; are interested in just one for this package.
1091 (url "https://github.com/dustin/bindir")
1092 (commit commit)))
1093 (file-name (git-file-name name version))
1094 (sha256
1095 (base32
1096 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
1097 (build-system trivial-build-system)
1098 (arguments
1099 `(#:modules ((guix build utils))
1100 #:builder (begin
1101 (use-modules (guix build utils))
1102 (let* ((source (assoc-ref %build-inputs "source"))
1103 (output (assoc-ref %outputs "out"))
1104 (bindir (string-append output "/bin"))
1105 (script "git-test-sequence"))
1106 (install-file (string-append source "/" script)
1107 bindir)
1108 #t))))
1109 (home-page "http://dustin.sallings.org/2010/03/28/git-test-sequence.html")
1110 (synopsis "Run a command over a sequence of commits")
1111 (description
1112 "git-test-sequence is similar to an automated git bisect except it’s
1113 linear. It will test every change between two points in the DAG. It will
1114 also walk each side of a merge and test those changes individually.")
1115 (license (license:x11-style "file://LICENSE")))))
1116
1117 (define-public gitolite
1118 (package
1119 (name "gitolite")
1120 (version "3.6.7")
1121 (source
1122 (origin
1123 (method git-fetch)
1124 (uri (git-reference
1125 (url "https://github.com/sitaramc/gitolite.git")
1126 (commit (string-append "v" version))))
1127 (file-name (git-file-name name version))
1128 (sha256
1129 (base32 "0rmyzr66lxh2ildf3h1nh3hh2ndwk21rjdin50r5vhwbdd7jg8vb"))))
1130 (build-system gnu-build-system)
1131 (arguments
1132 '(#:tests? #f ; no tests
1133 #:phases (modify-phases %standard-phases
1134 (delete 'configure)
1135 (delete 'build)
1136 (add-before 'install 'patch-scripts
1137 (lambda* (#:key inputs #:allow-other-keys)
1138 (let ((perl (string-append (assoc-ref inputs "perl")
1139 "/bin/perl")))
1140 ;; This seems to take care of every shell script that
1141 ;; invokes Perl.
1142 (substitute* (find-files "." ".*")
1143 ((" perl -")
1144 (string-append " " perl " -")))
1145
1146 (substitute* (find-files "src/triggers" ".*")
1147 ((" sed ")
1148 (string-append " " (which "sed") " ")))
1149
1150 (substitute*
1151 '("src/triggers/post-compile/update-gitweb-access-list"
1152 "src/triggers/post-compile/ssh-authkeys-split"
1153 "src/triggers/upstream")
1154 ((" grep ")
1155 (string-append " " (which "grep") " ")))
1156
1157 ;; Avoid references to the store in authorized_keys.
1158 ;; This works because gitolite-shell is in the PATH.
1159 (substitute* "src/triggers/post-compile/ssh-authkeys"
1160 (("\\$glshell \\$user")
1161 "gitolite-shell $user"))
1162 #t)))
1163 (add-before 'install 'patch-source
1164 (lambda* (#:key inputs #:allow-other-keys)
1165 ;; Gitolite uses cat to test the readability of the
1166 ;; pubkey
1167 (substitute* "src/lib/Gitolite/Setup.pm"
1168 (("\"cat ")
1169 (string-append "\"" (which "cat") " "))
1170 (("\"ssh-keygen")
1171 (string-append "\"" (which "ssh-keygen"))))
1172
1173 (substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
1174 "src/lib/Gitolite/Hooks/Update.pm")
1175 (("/usr/bin/perl")
1176 (string-append (assoc-ref inputs "perl")
1177 "/bin/perl")))
1178
1179 (substitute* "src/lib/Gitolite/Common.pm"
1180 (("\"ssh-keygen")
1181 (string-append "\"" (which "ssh-keygen")))
1182 (("\"logger\"")
1183 (string-append "\""
1184 (assoc-ref inputs "inetutils")
1185 "/bin/logger\"")))
1186
1187 #t))
1188 (replace 'install
1189 (lambda* (#:key outputs #:allow-other-keys)
1190 (let* ((output (assoc-ref outputs "out"))
1191 (sharedir (string-append output "/share/gitolite"))
1192 (bindir (string-append output "/bin")))
1193 (mkdir-p sharedir)
1194 (mkdir-p bindir)
1195 (invoke "./install" "-to" sharedir)
1196 ;; Create symlinks for executable scripts in /bin.
1197 (for-each (lambda (script)
1198 (symlink (string-append sharedir "/" script)
1199 (string-append bindir "/" script)))
1200 '("gitolite" "gitolite-shell"))
1201 #t)))
1202 (add-after 'install 'wrap-scripts
1203 (lambda* (#:key inputs outputs #:allow-other-keys)
1204 (let ((out (assoc-ref outputs "out"))
1205 (coreutils (assoc-ref inputs "coreutils"))
1206 (findutils (assoc-ref inputs "findutils"))
1207 (git (assoc-ref inputs "git")))
1208 (wrap-program (string-append out "/bin/gitolite")
1209 `("PATH" ":" prefix
1210 ,(map (lambda (dir)
1211 (string-append dir "/bin"))
1212 (list out coreutils findutils git))))
1213 #t))))))
1214 (inputs
1215 `(("perl" ,perl)
1216 ("coreutils" ,coreutils)
1217 ("findutils" ,findutils)
1218 ("inetutils" ,inetutils)))
1219 ;; git and openssh are propagated because trying to patch the source via
1220 ;; regexp matching is too brittle and prone to false positives.
1221 (propagated-inputs
1222 `(("git" ,git)
1223 ("openssh" ,openssh)))
1224 (home-page "http://gitolite.com")
1225 (synopsis "Git access control layer")
1226 (description
1227 "Gitolite is an access control layer on top of Git, providing fine access
1228 control to Git repositories.")
1229 (license license:gpl2)))
1230
1231 (define-public mercurial
1232 (package
1233 (name "mercurial")
1234 (version "5.2.1")
1235 (source (origin
1236 (method url-fetch)
1237 (uri (string-append "https://www.mercurial-scm.org/"
1238 "release/mercurial-" version ".tar.gz"))
1239 (sha256
1240 (base32
1241 "1pxkd37b0a1mi2zakk1hi122lgz1ffy2fxdnbs8acwlqpw55bc8q"))))
1242 (build-system python-build-system)
1243 (arguments
1244 `(#:phases
1245 (modify-phases %standard-phases
1246 (replace 'check
1247 (lambda* (#:key tests? #:allow-other-keys)
1248 (with-directory-excursion "tests"
1249 ;; The following tests are known to fail.
1250 (for-each (lambda (file)
1251 (delete-file file))
1252 '("test-extdiff.t"
1253 "test-hghave.t"
1254 "test-hgwebdir.t"
1255 "test-http-branchmap.t"
1256 "test-logtoprocess.t"
1257 "test-merge-combination.t"
1258 "test-nointerrupt.t"
1259 "test-patchbomb.t"
1260 "test-pull-bundle.t"
1261 "test-push-http.t"
1262 "test-run-tests.t"
1263 "test-serve.t"
1264 "test-subrepo-deep-nested-change.t"
1265 "test-subrepo-recursion.t"
1266 "test-transplant.t"))
1267 (when tests?
1268 (invoke "./run-tests.py"
1269 ;; ‘make check’ does not respect ‘-j’.
1270 (string-append "-j" (number->string
1271 (parallel-job-count)))
1272 ;; The default time-outs are too low for many systems.
1273 ;; Raise them generously: Guix enforces its own.
1274 "--timeout" "86400"
1275 "--slowtimeout" "86400"
1276 ;; The test suite takes a long time and produces little
1277 ;; output by default. Prevent timeouts due to silence.
1278 "-v"))
1279 #t))))))
1280 ;; The following inputs are only needed to run the tests.
1281 (native-inputs
1282 `(("python-nose" ,python-nose)
1283 ("unzip" ,unzip)))
1284 (home-page "https://www.mercurial-scm.org/")
1285 (synopsis "Decentralized version control system")
1286 (description
1287 "Mercurial is a free, distributed source control management tool.
1288 It efficiently handles projects of any size
1289 and offers an easy and intuitive interface.")
1290 (license license:gpl2+)))
1291
1292 (define-public neon
1293 (package
1294 (name "neon")
1295 (version "0.30.2")
1296 (source (origin
1297 (method url-fetch)
1298 (uri (string-append "http://www.webdav.org/neon/neon-"
1299 version ".tar.gz"))
1300 (sha256
1301 (base32
1302 "1jpvczcx658vimqm7c8my2q41fnmjaf1j03g7bsli6rjxk6xh2yv"))))
1303 (build-system gnu-build-system)
1304 (native-inputs
1305 `(("perl" ,perl)
1306 ("pkg-config" ,pkg-config)))
1307 (inputs
1308 `(("libxml2" ,libxml2)
1309 ("openssl" ,openssl)
1310 ("zlib" ,zlib)))
1311 (arguments
1312 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
1313 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
1314 #:tests? #f
1315 #:configure-flags '("--enable-shared"
1316 ;; requires libgnutils-config, deprecated
1317 ;; in gnutls 2.8.
1318 ; "--with-ssl=gnutls")))
1319 "--with-ssl=openssl")))
1320 (home-page "http://www.webdav.org/neon/")
1321 (synopsis "HTTP and WebDAV client library")
1322 (description
1323 "Neon is an HTTP and WebDAV client library, with a C interface and the
1324 following features:
1325 @enumerate
1326 @item High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
1327 DELETE, etc.);
1328 @item low-level interface to the HTTP request/response engine, allowing the use
1329 of arbitrary HTTP methods, headers, etc.;
1330 @item authentication support including Basic and Digest support, along with
1331 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
1332 @item SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
1333 verifying server certificates, handling client certificates, and examining
1334 certificate properties, smartcard-based client certificates are also
1335 supported via a PKCS#11 wrapper interface;
1336 @item abstract interface to parsing XML using libxml2 or expat, and wrappers for
1337 simplifying handling XML HTTP response bodies;
1338 @item WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
1339 property manipulation.
1340 @end enumerate\n")
1341 (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+
1342
1343 (define-public subversion
1344 (package
1345 (name "subversion")
1346 (version "1.10.6")
1347 (source (origin
1348 (method url-fetch)
1349 (uri
1350 (list
1351 (string-append "https://archive.apache.org/dist/subversion/"
1352 "subversion-" version ".tar.bz2")
1353 (string-append "https://www-eu.apache.org/dist/subversion/"
1354 "subversion-" version ".tar.bz2")))
1355 (sha256
1356 (base32
1357 "19zc215mhpnm92mlyl5jbv57r5zqp6cavr3s2g9yglp6j4kfgj0q"))))
1358 (build-system gnu-build-system)
1359 (arguments
1360 '(#:phases
1361 (modify-phases %standard-phases
1362 (add-after 'configure 'patch-libtool-wrapper-ls
1363 (lambda* (#:key inputs #:allow-other-keys)
1364 ;; This substitution allows tests svnauthz_tests and svnlook_tests
1365 ;; to pass. These tests execute svnauthz and svnlook through
1366 ;; their libtool wrapper scripts from svn hooks, whose empty
1367 ;; environments cause "ls: command not found" errors. It would be
1368 ;; nice if this fix ultimately made its way into libtool.
1369 (let ((coreutils (assoc-ref inputs "coreutils")))
1370 (substitute* "libtool"
1371 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))
1372 #t)))
1373 (add-before 'build 'patch-test-sh
1374 (lambda _
1375 (substitute* "subversion/tests/libsvn_repos/repos-test.c"
1376 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1377 #t))
1378 (add-after 'install 'install-perl-bindings
1379 (lambda* (#:key outputs #:allow-other-keys)
1380 ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
1381 (let ((out (assoc-ref outputs "out")))
1382 (invoke "make" "swig-pl-lib")
1383 ;; FIXME: Test failures.
1384 ;; (invoke "make" "check-swig-pl")
1385 (invoke "make" "install-swig-pl-lib")
1386
1387 ;; Set the right installation prefix.
1388 (with-directory-excursion
1389 "subversion/bindings/swig/perl/native"
1390 (invoke "perl" "Makefile.PL"
1391 "NO_PERLLOCAL=1"
1392 (string-append "PREFIX=" out))
1393 (invoke "make" "install"
1394 (string-append "OTHERLDFLAGS="
1395 "-Wl,-rpath="
1396 out "/lib")))))))))
1397 (native-inputs
1398 `(("pkg-config" ,pkg-config)
1399 ;; For the Perl bindings.
1400 ("swig" ,swig)))
1401 (inputs
1402 `(("apr" ,apr)
1403 ("apr-util" ,apr-util)
1404 ("lz4" ,lz4)
1405 ("serf" ,serf)
1406 ("perl" ,perl)
1407 ("python" ,python-wrapper)
1408 ("sqlite" ,sqlite)
1409 ("utf8proc" ,utf8proc)
1410 ("zlib" ,zlib)))
1411 (home-page "https://subversion.apache.org/")
1412 (synopsis "Revision control system")
1413 (description
1414 "@dfn{Subversion} (svn) exists to be recognized and adopted as a
1415 centralized version control system characterized by its
1416 reliability as a safe haven for valuable data; the simplicity of its model and
1417 usage; and its ability to support the needs of a wide variety of users and
1418 projects, from individuals to large-scale enterprise operations.")
1419 (license license:asl2.0)))
1420
1421 (define-public rcs
1422 (package
1423 (name "rcs")
1424 (version "5.9.4")
1425 (source (origin
1426 (method url-fetch)
1427 (uri (string-append "mirror://gnu/rcs/rcs-"
1428 version ".tar.xz"))
1429 (sha256
1430 (base32
1431 "1zsx7bb0rgvvvisiy4zlixf56ay8wbd9qqqcp1a1g0m1gl6mlg86"))
1432 (patches (search-patches "rcs-5.9.4-noreturn.patch"))))
1433 (build-system gnu-build-system)
1434 (native-inputs `(("ed" ,ed)))
1435 (arguments
1436 `(#:phases (modify-phases %standard-phases
1437 (add-before 'check 'disable-t810
1438 ;; See https://savannah.gnu.org/bugs/index.php?52288
1439 ;; Back-porting the fix is non-trivial, so disable for now.
1440 (lambda _
1441 (substitute* "tests/Makefile"
1442 ((" t810 \\\\\n") ""))
1443 #t)))))
1444 (home-page "https://www.gnu.org/software/rcs/")
1445 (synopsis "Per-file local revision control system")
1446 (description
1447 "RCS is the original Revision Control System. It works on a
1448 file-by-file basis, in contrast to subsequent version control systems such as
1449 CVS, Subversion, and Git. This can make it suitable for system
1450 administration files, for example, which are often inherently local to one
1451 machine.")
1452 (license license:gpl3+)))
1453
1454 (define-public cvs
1455 (package
1456 (name "cvs")
1457 (version "1.12.13")
1458 (source (origin
1459 (method url-fetch)
1460 (uri (string-append
1461 "https://ftp.gnu.org/non-gnu/cvs/source/feature/"
1462 version "/cvs-" version ".tar.bz2"))
1463 (patches (search-patches "cvs-CVE-2017-12836.patch"))
1464 (sha256
1465 (base32
1466 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
1467 (build-system gnu-build-system)
1468 (arguments
1469 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
1470 '(#:tests? #f
1471 #:configure-flags (list "--with-external-zlib")))
1472 (inputs `(("zlib" ,zlib)
1473 ("nano" ,nano))) ; the default editor
1474 (home-page "http://cvs.nongnu.org")
1475 (synopsis "Historical centralized version control system")
1476 (description
1477 "CVS is a version control system, an important component of Source
1478 Configuration Management (SCM). Using it, you can record the history of
1479 sources files, and documents. It fills a similar role to the free software
1480 RCS, PRCS, and Aegis packages.")
1481 (license license:gpl1+)))
1482
1483 (define-public cvs-fast-export
1484 (package
1485 (name "cvs-fast-export")
1486 (version "1.45")
1487 (source (origin
1488 (method url-fetch)
1489 (uri (string-append "http://www.catb.org/~esr/cvs-fast-export/"
1490 "cvs-fast-export-" version ".tar.gz"))
1491 (sha256
1492 (base32
1493 "19pxg6p0pcgyd2fbnh3wy1kazv6vcfi5lzc2whhdi1w9kj4r9c4z"))))
1494 (build-system gnu-build-system)
1495 (arguments
1496 '(#:phases
1497 (modify-phases %standard-phases
1498 (delete 'configure) ; no configure script
1499 (add-after 'unpack 'remove-optimizations
1500 (lambda _
1501 ;; Don't optimize for a specific processor architecture.
1502 (substitute* "Makefile"
1503 (("CFLAGS \\+= -march=native") ""))
1504 #t)))
1505 #:parallel-build? #f ; parallel a2x commands fail spectacularly
1506 #:make-flags
1507 (list "CC=gcc" (string-append "prefix?=" (assoc-ref %outputs "out")))))
1508 (inputs `(("git" ,git)))
1509 (native-inputs `(("asciidoc" ,asciidoc)
1510 ;; These are needed for the tests.
1511 ("cvs" ,cvs)
1512 ("python" ,python-2)
1513 ("rcs" ,rcs)))
1514 (home-page "http://www.catb.org/esr/cvs-fast-export/")
1515 (synopsis "Export an RCS or CVS history as a fast-import stream")
1516 (description "This program analyzes a collection of RCS files in a CVS
1517 repository (or outside of one) and, when possible, emits an equivalent history
1518 in the form of a fast-import stream. Not all possible histories can be
1519 rendered this way; the program tries to emit useful warnings when it can't.
1520
1521 The program can also produce a visualization of the resulting commit directed
1522 acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org,
1523 Graphviz}. The package also includes @command{cvssync}, a tool for mirroring
1524 masters from remote CVS hosts.")
1525 (license license:gpl2+)))
1526
1527 (define-public vc-dwim
1528 (package
1529 (name "vc-dwim")
1530 (version "1.9")
1531 (source (origin
1532 (method url-fetch)
1533 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
1534 version ".tar.xz"))
1535 (sha256
1536 (base32
1537 "0mf1dd7wdqxsm4fcfinfd7iadzarmzvg747pbsbi32qpavpk8gdf"))))
1538 (build-system gnu-build-system)
1539 (inputs `(("perl" ,perl)))
1540 (native-inputs
1541 `(("emacs" ,emacs-minimal) ; for `ctags'
1542 ("inetutils" ,inetutils))) ; for `hostname', used in the tests
1543 (home-page "https://www.gnu.org/software/vc-dwim/")
1544 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
1545 (description
1546 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
1547 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
1548 using version control at the same time, for example by printing a reminder
1549 when a file change has been described in the ChangeLog but the file has not
1550 been added to the VC. vc-chlog scans changed files and generates
1551 standards-compliant ChangeLog entries based on the changes that it detects.")
1552 (license license:gpl3+)))
1553
1554 (define-public diffstat
1555 (package
1556 (name "diffstat")
1557 (version "1.63")
1558 (source (origin
1559 (method url-fetch)
1560 (uri
1561 (list
1562 (string-append "ftp://invisible-island.net/diffstat/"
1563 "diffstat-" version ".tgz")
1564 (string-append "http://invisible-mirror.net/archives/diffstat/"
1565 "diffstat-" version ".tgz")))
1566 (sha256
1567 (base32
1568 "0vyw200s5dv1257pmrh6c6fdkmw3slyz5szpqfx916xr04sdbpby"))))
1569 (build-system gnu-build-system)
1570 (home-page "https://invisible-island.net/diffstat/")
1571 (synopsis "Make histograms from the output of @command{diff}")
1572 (description
1573 "Diffstat reads the output of @command{diff} and displays a histogram of
1574 the insertions, deletions, and modifications per file. It is useful for
1575 reviewing large, complex patch files.")
1576 (license (license:x11-style "file://COPYING"))))
1577
1578 (define-public cssc
1579 (package
1580 (name "cssc")
1581 (version "1.4.1")
1582 (source (origin
1583 (method url-fetch)
1584 (uri (string-append "mirror://gnu/" name "/CSSC-"
1585 version ".tar.gz"))
1586 (sha256
1587 (base32
1588 "1vsisqq573xjr2qpn19iwmpqgl3mq03m790akpa4rvj60b4d1gni"))))
1589 (build-system gnu-build-system)
1590 (arguments
1591 `(#:phases
1592 (modify-phases %standard-phases
1593 (add-before 'check 'precheck
1594 (lambda _
1595 (begin
1596 (substitute* "tests/common/test-common"
1597 (("/bin/pwd") (which "pwd")))
1598
1599 (substitute* "tests/prt/all-512.sh"
1600 (("/bin/sh") (which "sh")))
1601
1602 ;; XXX: This test has no hope of passing until there is a "nogroup"
1603 ;; entry (or at least some group to which the guix builder does
1604 ;; not belong) in the /etc/group file of the build environment.
1605 ;; Currently we do not have such a group. Disable this test for now.
1606 (substitute* "tests/Makefile"
1607 (("test-delta ") ""))))))))
1608 ;; These are needed for the tests
1609 (native-inputs `(("git" ,git)
1610 ("cvs" ,cvs)))
1611 (home-page "https://www.gnu.org/software/cssc/")
1612 (synopsis "File-based version control like SCCS")
1613 (description "GNU CSSC provides a replacement for the legacy Unix source
1614 code control system SCCS. This allows old code still under that system to be
1615 accessed and migrated on modern systems.")
1616 (license license:gpl3+)))
1617
1618 ;; This package can unfortunately work only in -TEST mode, since Aegis
1619 ;; requires that it is installed setuid root.
1620 (define-public aegis
1621 (package
1622 (name "aegis")
1623 (version "4.24")
1624 (source (origin
1625 (method url-fetch)
1626 (uri (string-append "mirror://sourceforge/aegis/aegis/" version
1627 "/aegis-" version ".tar.gz"))
1628 (sha256
1629 (base32
1630 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
1631 (patches (search-patches "aegis-perl-tempdir1.patch"
1632 "aegis-perl-tempdir2.patch"
1633 "aegis-test-fixup-1.patch"
1634 "aegis-test-fixup-2.patch"
1635 "aegis-constness-error.patch"))))
1636 (build-system gnu-build-system)
1637 (inputs
1638 `(("e2fsprogs" ,e2fsprogs)
1639 ("curl" ,curl)
1640 ("file" ,file)
1641 ("libxml2" ,libxml2)
1642 ("zlib" ,zlib)
1643 ("gettext" ,gettext-minimal)))
1644 (native-inputs
1645 `(("bison" ,bison)
1646 ("groff" ,groff)
1647 ("perl" ,perl)
1648 ;; Various tests require the following:
1649 ("cvs" ,cvs)
1650 ("flex" ,flex)
1651 ("cook" ,cook)
1652 ("subversion" ,subversion)
1653 ("rcs" ,rcs)
1654 ("ed" ,ed)))
1655 (arguments
1656 `(#:configure-flags (list "--with-no-aegis-configured"
1657 "--sharedstatedir=/var/com/aegis")
1658 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
1659 #:phases
1660 (modify-phases %standard-phases
1661 (add-before 'configure 'pre-conf
1662 (lambda _
1663 (substitute* (append '("configure"
1664 "etc/check-tar-gz.sh"
1665 "etc/patches.sh"
1666 "etc/test.sh"
1667 "script/aexver.in"
1668 "script/aebisect.in"
1669 "script/aeintegratq.in"
1670 "script/tkaegis.in"
1671 "script/test_funcs.in"
1672 "web/eg_oss_templ.sh"
1673 "web/webiface.html"
1674 "libaegis/getpw_cache.cc")
1675 (find-files "test" "\\.sh"))
1676 (("/bin/sh") (which "sh")))
1677 (setenv "SH" (which "sh"))
1678 #t))
1679 (replace 'check
1680 (lambda _
1681 (let ((home (string-append (getcwd) "/my-new-home")))
1682 ;; Some tests need to write to $HOME.
1683 (mkdir home)
1684 (setenv "HOME" home)
1685
1686 ;; This test assumes that flex has been symlinked to "lex".
1687 (substitute* "test/00/t0011a.sh"
1688 (("type lex") "type flex"))
1689
1690 ;; XXX Disable tests that fail, for unknown reasons, ‘for now’.
1691 (for-each
1692 (lambda (test) (substitute* "Makefile"
1693 (((string-append "test/" test "\\.ES ")) "")))
1694 (list "00/t0011a"
1695 "00/t0049a"
1696 "01/t0196a"))
1697
1698 ;; The author decided to call the check rule "sure".
1699 (invoke "make" "sure")))))))
1700 (home-page "http://aegis.sourceforge.net")
1701 (synopsis "Project change supervisor")
1702 (description "Aegis is a project change supervisor, and performs some of
1703 the Software Configuration Management needed in a CASE environment. Aegis
1704 provides a framework within which a team of developers may work on many
1705 changes to a program independently, and Aegis coordinates integrating these
1706 changes back into the master source of the program, with as little disruption
1707 as possible. Resolution of contention for source files, a major headache for
1708 any project with more than one developer, is one of Aegis's major functions.")
1709 (license license:gpl3+)))
1710
1711 (define-public reposurgeon
1712 (package
1713 (name "reposurgeon")
1714 (version "3.43")
1715 (source (origin
1716 (method url-fetch)
1717 (uri (string-append "http://www.catb.org/~esr/" name "/"
1718 name "-" version ".tar.xz"))
1719 (sha256
1720 (base32
1721 "1af0z14wcm4bk5a9ysinbwq2fp3lf5f7i8mvwh7286hr3fnagcaz"))
1722 (patches (search-patches
1723 "reposurgeon-add-missing-docbook-files.patch"))))
1724 (build-system gnu-build-system)
1725 (arguments
1726 `(#:make-flags
1727 (list "ECHO=echo"
1728 (string-append "target=" (assoc-ref %outputs "out")))
1729 #:phases
1730 (modify-phases %standard-phases
1731 (add-after 'unpack 'patch-inputs
1732 (lambda* (#:key inputs #:allow-other-keys)
1733 (let ((tzdata (assoc-ref inputs "tzdata")))
1734 (substitute* "reposurgeon"
1735 (("/usr/share/zoneinfo")
1736 (string-append tzdata "/share/zoneinfo")))
1737 (substitute* "test/svn-to-svn"
1738 (("/bin/echo") "echo"))
1739 #t)))
1740 (delete 'configure) ; no configure script
1741 (add-before 'build 'fix-docbook
1742 (lambda* (#:key inputs #:allow-other-keys)
1743 (substitute* (find-files "." "\\.xml$")
1744 (("docbook/docbookx.dtd")
1745 (string-append (assoc-ref inputs "docbook-xml")
1746 "/xml/dtd/docbook/docbookx.dtd")))
1747 #t))
1748 (add-before 'check 'set-up-test-environment
1749 (lambda* (#:key inputs #:allow-other-keys)
1750 (let ((tzdata (assoc-ref inputs "tzdata")))
1751 (setenv "TZDIR" (string-append tzdata "/share/zoneinfo"))
1752 #t)))
1753 (add-after 'install 'install-emacs-data
1754 (lambda* (#:key outputs #:allow-other-keys)
1755 (install-file "reposurgeon-mode.el"
1756 (string-append (assoc-ref outputs "out")
1757 "/share/emacs/site-lisp"))
1758 #t)))))
1759 (inputs
1760 `(("python" ,python-wrapper)
1761 ("tzdata" ,tzdata)))
1762 (native-inputs
1763 `( ;; For building documentation.
1764 ("asciidoc" ,asciidoc)
1765 ("docbook-xml" ,docbook-xml)
1766 ("docbook-xsl" ,docbook-xsl)
1767 ("libxml2" ,libxml2)
1768 ("xmlto" ,xmlto)
1769
1770 ;; For tests.
1771 ("cvs" ,cvs)
1772 ("git" ,git)
1773 ("mercurial" ,mercurial)
1774 ("subversion" ,subversion)))
1775 (home-page "http://www.catb.org/~esr/reposurgeon/")
1776 (synopsis "Edit version-control repository history")
1777 (description "Reposurgeon enables risky operations that version-control
1778 systems don't want to let you do, such as editing past comments and metadata
1779 and removing commits. It works with any version control system that can
1780 export and import Git fast-import streams, including Git, Mercurial, Fossil,
1781 Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly
1782 and can thus be used to script production of very high-quality conversions
1783 from Subversion to any supported Distributed Version Control System (DVCS).")
1784 ;; Most files are distributed under bsd-2, except 'repocutter' which is
1785 ;; under bsd-3.
1786 (license (list license:bsd-2 license:bsd-3))))
1787
1788 (define-public tig
1789 (package
1790 (name "tig")
1791 (version "2.5.0")
1792 (source (origin
1793 (method url-fetch)
1794 (uri (string-append
1795 "https://github.com/jonas/tig/releases/download/tig-"
1796 version "/tig-" version ".tar.gz"))
1797 (sha256
1798 (base32
1799 "1x5famvvs93ih7sr11x7m33dksb1k7zs1s3c4zkyf0cjmxkpqlzz"))))
1800 (build-system gnu-build-system)
1801 (native-inputs
1802 `(("asciidoc" ,asciidoc)
1803 ("xmlto" ,xmlto)))
1804 (inputs
1805 `(("ncurses" ,ncurses)
1806 ("readline" ,readline)))
1807 (arguments
1808 `(#:phases
1809 (modify-phases %standard-phases
1810 (add-after 'install 'install-doc
1811 (lambda _
1812 (invoke "make" "install-doc"))))
1813 #:tests? #f)) ; tests require access to /dev/tty
1814 ;; #:test-target "test"))
1815 (home-page "https://jonas.github.io/tig/")
1816 (synopsis "Ncurses-based text user interface for Git")
1817 (description
1818 "Tig is an ncurses text user interface for Git, primarily intended as
1819 a history browser. It can also stage hunks for commit, or colorize the
1820 output of the @code{git} command.")
1821 (license license:gpl2+)))
1822
1823 (define-public findnewest
1824 (package
1825 (name "findnewest")
1826 (version "0.3")
1827 (source
1828 (origin
1829 (method git-fetch)
1830 (uri (git-reference
1831 (url "https://github.com/0-wiz-0/findnewest.git")
1832 (commit (string-append "findnewest-" version))))
1833 (file-name (git-file-name name version))
1834 (sha256
1835 (base32 "1x1cbn2b27h5r0ah5xc06fkalfdci2ngrgd4wibxjw0h88h0nvgq"))))
1836 (build-system gnu-build-system)
1837 (native-inputs `(("autoconf" ,autoconf)
1838 ("automake" ,automake)))
1839 (home-page "https://github.com/0-wiz-0/findnewest/releases")
1840 (synopsis "Print the modification time of the latest file")
1841 (description
1842 "Recursively find the newest file in a file tree and print its
1843 modification time.")
1844 (license license:bsd-2)))
1845
1846 (define-public myrepos
1847 (package
1848 (name "myrepos")
1849 (version "1.20180726")
1850 (source
1851 (origin
1852 (method git-fetch)
1853 (uri (git-reference
1854 (url "git://myrepos.branchable.com/myrepos")
1855 (commit version)))
1856 (file-name (string-append name "-" version "-checkout"))
1857 (sha256
1858 (base32 "0jphw61plm8cgklja6hs639xhdvxgvjwbr6jpvjwpp7hc5gmhms5"))))
1859 (build-system gnu-build-system)
1860 (arguments
1861 '(#:test-target "test"
1862 #:make-flags (list (string-append "PREFIX=" %output))
1863 #:phases
1864 (modify-phases %standard-phases
1865 (delete 'configure)
1866 (add-after 'install 'wrap-webcheckout
1867 (lambda* (#:key inputs outputs #:allow-other-keys)
1868 (let ((out (assoc-ref outputs "out")))
1869 (wrap-program (string-append out "/bin/webcheckout")
1870 `("PERL5LIB" ":" prefix
1871 ,(map (lambda (i) (string-append (assoc-ref inputs i)
1872 "/lib/perl5/site_perl"))
1873 '("perl-encode-locale" "perl-http-date"
1874 "perl-http-message" "perl-html-parser" "perl-libwww"
1875 "perl-uri" "perl-try-tiny"))))
1876 #t))))))
1877 (inputs
1878 `(("perl" ,perl)
1879 ("perl-encode-locale" ,perl-encode-locale)
1880 ("perl-html-parser" ,perl-html-parser)
1881 ("perl-http-date" ,perl-http-date)
1882 ("perl-http-message" ,perl-http-message)
1883 ("perl-libwww" ,perl-libwww)
1884 ("perl-try-tiny" ,perl-try-tiny)
1885 ("perl-uri" ,perl-uri)))
1886 (home-page "https://myrepos.branchable.com/")
1887 (synopsis "Multiple repository management tool")
1888 (description
1889 "Myrepos provides the @code{mr} command, which maps an operation (e.g.,
1890 fetching updates) over a collection of version control repositories. It
1891 supports a large number of version control systems: Git, Subversion,
1892 Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
1893 (license license:gpl2+)))
1894
1895 (define-public git-annex-remote-hubic
1896 (package
1897 (name "git-annex-remote-hubic")
1898 (version "0.3.1")
1899 (source
1900 (origin
1901 (method git-fetch)
1902 (uri (git-reference
1903 (url "https://github.com/Schnouki/git-annex-remote-hubic.git")
1904 (commit (string-append "v" version))))
1905 (file-name (git-file-name name version))
1906 (sha256
1907 (base32 "16y9sk67hfi17h9n2kkffyabfccksh5rab40hhk69v6cxmbpn2sx"))))
1908 (build-system python-build-system)
1909 (arguments `(#:python ,python-2))
1910 (native-inputs
1911 `(;; for the tests
1912 ("python2-six" ,python2-six)))
1913 (propagated-inputs
1914 `(("python2-dateutil" ,python2-dateutil)
1915 ("python2-futures" ,python2-futures)
1916 ("python2-rauth" ,python2-rauth)
1917 ("python2-swiftclient" ,python2-swiftclient)))
1918 (home-page "https://github.com/Schnouki/git-annex-remote-hubic/")
1919 (synopsis "Use hubic as a git-annex remote")
1920 (description
1921 "This package allows you to use your hubic account as a \"special
1922 repository\" with git-annex.")
1923 (license license:gpl3+)))
1924
1925 (define-public git-annex-remote-rclone
1926 (package
1927 (name "git-annex-remote-rclone")
1928 (version "0.6")
1929 (source
1930 (origin
1931 (method git-fetch)
1932 (uri (git-reference
1933 (url "https://github.com/DanielDent/git-annex-remote-rclone.git")
1934 (commit (string-append "v" version))))
1935 (file-name (git-file-name name version))
1936 (sha256
1937 (base32
1938 "0j0hlxji8d974fq7zd4xc02n0jpi31ylhxc7z4zp8iiwad5mkpxp"))))
1939 (build-system trivial-build-system)
1940 (arguments
1941 `(#:modules ((guix build utils))
1942 #:builder
1943 (begin
1944 (use-modules (guix build utils))
1945 (let ((bash (string-append (assoc-ref %build-inputs "bash")
1946 "/bin/bash"))
1947 (rclone (string-append (assoc-ref %build-inputs "rclone")
1948 "/bin/rclone")))
1949 (copy-file (string-append (assoc-ref %build-inputs "source")
1950 "/git-annex-remote-rclone")
1951 "git-annex-remote-rclone")
1952 (substitute* "git-annex-remote-rclone"
1953 (("/bin/bash") bash)
1954 (("runcmd rclone") (string-append "runcmd " rclone)))
1955 (install-file "git-annex-remote-rclone"
1956 (string-append %output "/bin"))
1957 #t))))
1958 (inputs
1959 `(("bash" ,bash)
1960 ("rclone" ,rclone)))
1961 (home-page "https://github.com/DanielDent/git-annex-remote-rclone")
1962 (synopsis "Use rclone-supported cloud storage providers with git-annex")
1963 (description "This wrapper around rclone makes any destination supported
1964 by rclone usable with git-annex.")
1965 (license license:gpl3+)))
1966
1967 (define-public fossil
1968 (package
1969 (name "fossil")
1970 (version "2.8")
1971 (source
1972 (origin
1973 (method url-fetch)
1974 ;; Older downloads are moved to another URL.
1975 (uri (list
1976 (string-append
1977 "https://www.fossil-scm.org/index.html/uv/download/"
1978 "fossil-src-" version ".tar.gz")
1979 (string-append
1980 "https://www.fossil-scm.org/index.html/uv/"
1981 "fossil-src-" version ".tar.gz")))
1982 (sha256
1983 (base32
1984 "0pbinf8d2kj1j7niblhzjd2l2khg6r2pn2xvig6gavz27p3vwcka"))
1985 (modules '((guix build utils)))
1986 (snippet
1987 '(begin
1988 (delete-file-recursively "compat") #t))))
1989 (build-system gnu-build-system)
1990 (native-inputs
1991 `(("tcl" ,tcl) ;for configuration only
1992 ("which" ,which) ;for tests only
1993 ("ed" ,ed))) ;ditto
1994 (inputs
1995 `(("openssl" ,openssl)
1996 ("zlib" ,zlib)
1997 ("sqlite" ,sqlite)))
1998 (arguments
1999 `(#:configure-flags (list "--with-openssl=auto"
2000 "--disable-internal-sqlite")
2001 #:test-target "test"
2002 #:phases (modify-phases %standard-phases
2003 (add-after 'patch-source-shebangs 'patch-sh
2004 (lambda _
2005 (substitute* '("auto.def")
2006 (("/bin/sh") (which "sh")))
2007 #t))
2008 (replace 'configure
2009 (lambda* (#:key outputs (configure-flags '())
2010 #:allow-other-keys)
2011 ;; The 'configure' script is not an autoconf script and
2012 ;; chokes on unrecognized options.
2013 (apply invoke
2014 "./configure"
2015 (string-append "--prefix="
2016 (assoc-ref outputs "out"))
2017 configure-flags)
2018 #t))
2019 (add-before 'check 'test-setup
2020 (lambda _
2021 (setenv "USER" "guix")
2022 (setenv "TZ" "UTC")
2023 #t)))))
2024 (home-page "https://fossil-scm.org")
2025 (synopsis "Software configuration management system")
2026 (description
2027 "Fossil is a distributed source control management system which supports
2028 access and administration over HTTP CGI or via a built-in HTTP server. It has
2029 a built-in wiki, built-in file browsing, built-in tickets system, etc.")
2030 (license (list license:public-domain ;src/miniz.c, src/shell.c
2031 license:bsd-2))))
2032
2033 (define-public stagit
2034 (package
2035 (name "stagit")
2036 (version "0.7.2")
2037 (source (origin
2038 (method url-fetch)
2039 (uri (string-append "https://dl.2f30.org/releases/"
2040 name "-" version ".tar.gz"))
2041 (sha256
2042 (base32
2043 "1m3s9g1z9szbjrhm8sic91xh6f2bfpi56rskdkqd5wc4wdycpyi5"))))
2044 (build-system gnu-build-system)
2045 (arguments
2046 `(#:tests? #f ; No tests
2047 #:make-flags (list "CC=gcc"
2048 (string-append "PREFIX=" %output))
2049 #:phases
2050 (modify-phases %standard-phases
2051 (delete 'configure)))) ; No configure script
2052 (inputs
2053 `(("libgit2" ,libgit2)))
2054 (home-page "https://2f30.org/")
2055 (synopsis "Static git page generator")
2056 (description "Stagit creates static pages for git repositories, the results can
2057 be served with a HTTP file server of your choice.")
2058 (license license:expat)))
2059
2060 (define-public gource
2061 (package
2062 (name "gource")
2063 (version "0.49")
2064 (source (origin
2065 (method url-fetch)
2066 (uri (string-append
2067 "https://github.com/acaudwell/Gource/releases/download"
2068 "/gource-" version "/gource-" version ".tar.gz"))
2069 (sha256
2070 (base32
2071 "12hf5ipcsp9dxsqn84n4kr63xaiskrnf5a084wr29qk171lj7pd9"))))
2072 (build-system gnu-build-system)
2073 (arguments
2074 `(#:configure-flags
2075 (list (string-append "--with-boost-libdir="
2076 (assoc-ref %build-inputs "boost")
2077 "/lib"))))
2078 (native-inputs
2079 `(("pkg-config" ,pkg-config)))
2080 (inputs
2081 `(("boost" ,boost)
2082 ("ftgl" ,ftgl)
2083 ("glew" ,glew)
2084 ("glm" ,glm)
2085 ("glu" ,glu)
2086 ("libpng" ,libpng)
2087 ("mesa" ,mesa)
2088 ("pcre" ,pcre)
2089 ("sdl-union" ,(sdl-union (list sdl2 sdl2-image)))))
2090 (home-page "http://gource.io/")
2091 (synopsis "3D visualisation tool for source control repositories")
2092 (description "@code{gource} provides a software version control
2093 visualization. The repository is displayed as a tree where the root of the
2094 repository is the centre, directories are branches and files are leaves.
2095 Contributors to the source code appear and disappear as they contribute to
2096 specific files and directories.")
2097 (license license:gpl3+)))
2098
2099 (define-public src
2100 (package
2101 (name "src")
2102 (version "1.18")
2103 (source (origin
2104 (method url-fetch)
2105 (uri (string-append
2106 "http://www.catb.org/~esr/src/src-" version ".tar.gz"))
2107 (sha256
2108 (base32
2109 "0n0skhvya8w2az45h2gsafxy8m2mvqas64nrgxifcmrzfv0rf26c"))))
2110 (build-system gnu-build-system)
2111 (arguments
2112 '(#:make-flags
2113 (list (string-append "prefix=" (assoc-ref %outputs "out")))
2114 #:phases
2115 (modify-phases %standard-phases
2116 (delete 'configure) ; no 'configure' script
2117 (add-after 'install 'wrap-program
2118 (lambda* (#:key inputs outputs #:allow-other-keys)
2119 (let* ((out (assoc-ref outputs "out"))
2120 (prog (string-append out "/bin/src"))
2121 (rcs (assoc-ref inputs "rcs")))
2122 (wrap-program prog
2123 `("PATH" ":" prefix (,(string-append rcs "/bin"))))
2124 #t)))
2125 (replace 'check
2126 (lambda _
2127 (setenv "HOME" (getenv "TMPDIR"))
2128 (invoke "git" "config" "--global" "user.name" "guix")
2129 (invoke "git" "config" "--global" "user.email" "guix")
2130 (invoke "./srctest"))))))
2131 (native-inputs
2132 ;; For testing.
2133 `(("git" ,git)
2134 ("perl" ,perl)))
2135 (inputs
2136 `(("python" ,python-wrapper)
2137 ("rcs" ,rcs)))
2138 (synopsis "Simple revision control")
2139 (home-page "http://www.catb.org/~esr/src/")
2140 (description
2141 "SRC (or src) is simple revision control, a version-control system for
2142 single-file projects by solo developers and authors. It modernizes the
2143 venerable RCS, hence the anagrammatic acronym. The design is tuned for use
2144 cases like all those little scripts in your @file{~/bin} directory, or a
2145 directory full of HOWTOs.")
2146 (license license:bsd-2)))
2147
2148 (define-public git-when-merged
2149 ;; Use an unreleased version to get a PY3 compatibility fix.
2150 (let ((commit "ab6af7865a0ba55ba364a6c507e0be6f84f31c6d"))
2151 (package
2152 (name "git-when-merged")
2153 (version (string-append "1.2.0-" (string-take commit 7)))
2154 (source (origin
2155 (method git-fetch)
2156 (uri (git-reference
2157 (url "https://github.com/mhagger/git-when-merged/")
2158 (commit commit)))
2159 (file-name (git-file-name name version))
2160 (sha256
2161 (base32
2162 "0iyk2psf97bc9h43m89p3xjmm79fsx99i7px29g4lcnmdy5kmz0p"))))
2163 (build-system gnu-build-system)
2164 (arguments
2165 `(#:tests? #f ; there are no tests
2166 #:phases
2167 (modify-phases %standard-phases
2168 (delete 'configure)
2169 (delete 'build)
2170 (replace 'install
2171 (lambda* (#:key outputs #:allow-other-keys)
2172 (install-file "bin/git-when-merged"
2173 (string-append (assoc-ref outputs "out")
2174 "/bin"))
2175 #t))
2176 (add-before 'install 'patch-git
2177 (lambda* (#:key inputs #:allow-other-keys)
2178 (let ((git (string-append (assoc-ref inputs "git")
2179 "/bin/git")))
2180 (substitute* "bin/git-when-merged"
2181 (("'git'") (string-append "'" git "'")))
2182 #t)))
2183 (add-after 'install 'wrap-script
2184 (lambda* (#:key outputs #:allow-other-keys)
2185 (wrap-program (string-append (assoc-ref outputs "out")
2186 "/bin/git-when-merged")
2187 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2188 #t)))))
2189 (inputs
2190 `(("git" ,git)
2191 ("python" ,python-wrapper)))
2192 (home-page "https://github.com/mhagger/git-when-merged")
2193 (synopsis "Determine when a commit was merged into a Git branch")
2194 (description "This Git extension defines a subcommand,
2195 @code{when-merged}, whose core operation is to find the merge that brought a
2196 given commit into the specified ref(s). It has various options that control
2197 how information about the merge is displayed.")
2198 (license license:gpl2+))))
2199
2200 (define-public git-imerge
2201 (package
2202 (name "git-imerge")
2203 (version "1.1.0")
2204 (source
2205 (origin
2206 (method git-fetch)
2207 (uri (git-reference
2208 (url "https://github.com/mhagger/git-imerge.git")
2209 (commit (string-append "v" version))))
2210 (file-name (git-file-name name version))
2211 (sha256
2212 (base32 "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4"))))
2213 (build-system gnu-build-system)
2214 (arguments
2215 `(#:tests? #f ; only manual test scripts
2216 #:make-flags (list (string-append "DESTDIR=" %output)
2217 "PREFIX=")
2218 #:phases
2219 (modify-phases %standard-phases
2220 (delete 'configure)
2221 (add-before 'install 'patch-git
2222 (lambda* (#:key inputs #:allow-other-keys)
2223 (let ((git (string-append (assoc-ref inputs "git")
2224 "/bin/git")))
2225 (substitute* "git-imerge"
2226 (("'git'") (string-append "'" git "'")))
2227 #t)))
2228 (add-after 'install 'wrap-script
2229 (lambda* (#:key outputs #:allow-other-keys)
2230 (wrap-program (string-append (assoc-ref outputs "out")
2231 "/bin/git-imerge")
2232 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2233 #t)))))
2234 (inputs
2235 `(("git" ,git)
2236 ("python" ,python-wrapper)))
2237 (home-page "https://github.com/mhagger/git-imerge")
2238 (synopsis "Incremental merge for Git")
2239 (description "This Git extension defines a subcommand, @code{imerge},
2240 which performs an incremental merge between two branches. Its two primary
2241 design goals are to reduce the pain of resolving merge conflicts by finding
2242 the smallest possible conflicts and to allow a merge to be saved, tested,
2243 interrupted, published, and collaborated on while in progress.")
2244 (license license:gpl2+)))
2245
2246 (define-public git-lfs
2247 (package
2248 (name "git-lfs")
2249 (version "2.7.2")
2250 (source (origin
2251 (method git-fetch)
2252 (uri (git-reference
2253 (url "https://github.com/git-lfs/git-lfs")
2254 (commit (string-append "v" version))))
2255 (file-name (git-file-name name version))
2256 (sha256
2257 (base32
2258 "1nf40rbdz901vsahg5cm09pznpina6wimmxl0lmh8pn0mi51yzvc"))))
2259 (build-system go-build-system)
2260 (arguments
2261 '(#:import-path "github.com/git-lfs/git-lfs"))
2262 (home-page "https://git-lfs.github.com/")
2263 (synopsis "Git extension for versioning large files")
2264 (description
2265 "Git Large File Storage (LFS) replaces large files such as audio samples,
2266 videos, datasets, and graphics with text pointers inside Git, while storing the
2267 file contents on a remote server.")
2268 (license license:expat)))