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