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