Merge branch 'master' into staging
[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 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 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 ng0 <contact.ng0@cryptolab.net>
14 ;;; Copyright © 2017 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 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
20 ;;;
21 ;;; This file is part of GNU Guix.
22 ;;;
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
27 ;;;
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
32 ;;;
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35
36 (define-module (gnu packages version-control)
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (guix utils)
39 #:use-module (guix packages)
40 #:use-module (guix download)
41 #:use-module (guix git-download)
42 #:use-module (guix build-system ant)
43 #:use-module (guix build-system cmake)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system haskell)
46 #:use-module (guix build-system python)
47 #:use-module (guix build-system trivial)
48 #:use-module (gnu packages apr)
49 #:use-module (gnu packages autotools)
50 #:use-module (gnu packages documentation)
51 #:use-module (gnu packages base)
52 #:use-module (gnu packages bison)
53 #:use-module (gnu packages cook)
54 #:use-module (gnu packages curl)
55 #:use-module (gnu packages docbook)
56 #:use-module (gnu packages ed)
57 #:use-module (gnu packages file)
58 #:use-module (gnu packages flex)
59 #:use-module (gnu packages gettext)
60 #:use-module (gnu packages groff)
61 #:use-module (gnu packages haskell)
62 #:use-module (gnu packages java)
63 #:use-module (gnu packages linux)
64 #:use-module (gnu packages nano)
65 #:use-module (gnu packages ncurses)
66 #:use-module (gnu packages ssh)
67 #:use-module (gnu packages web)
68 #:use-module (gnu packages openstack)
69 #:use-module (gnu packages perl)
70 #:use-module (gnu packages pkg-config)
71 #:use-module (gnu packages python)
72 #:use-module (gnu packages readline)
73 #:use-module (gnu packages databases)
74 #:use-module (gnu packages admin)
75 #:use-module (gnu packages xml)
76 #:use-module (gnu packages emacs)
77 #:use-module (gnu packages compression)
78 #:use-module (gnu packages swig)
79 #:use-module (gnu packages tcl)
80 #:use-module (gnu packages tls)
81 #:use-module (gnu packages)
82 #:use-module (ice-9 match)
83 #:use-module (srfi srfi-1))
84
85 (define-public bazaar
86 (package
87 (name "bazaar")
88 (version "2.7.0")
89 (source
90 (origin
91 (method url-fetch)
92 (uri (string-append "https://launchpad.net/bzr/"
93 (version-major+minor version) "/" version
94 "/+download/bzr-" version ".tar.gz"))
95 (sha256
96 (base32
97 "1cysix5k3wa6y7jjck3ckq3abls4gvz570s0v0hxv805nwki4i8d"))))
98 (build-system python-build-system)
99 (inputs
100 ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh'
101 ;; require Zsh.
102 `(("gettext" ,gettext-minimal)))
103 (arguments
104 `(#:tests? #f ; no test target
105 #:python ,python-2 ; Python 3 apparently not yet supported, see
106 ; https://answers.launchpad.net/bzr/+question/229048
107 #:phases
108 (modify-phases %standard-phases
109 (add-after 'unpack 'fix-mandir
110 (lambda _
111 (substitute* "setup.py"
112 (("man/man1") "share/man/man1"))
113 #t)))))
114 (home-page "https://gnu.org/software/bazaar")
115 (synopsis "Version control system supporting both distributed and centralized workflows")
116 (description
117 "GNU Bazaar is a version control system that allows you to record
118 changes to project files over time. It supports both a distributed workflow
119 as well as the classic centralized workflow.")
120 (license license:gpl2+)))
121
122 (define-public git
123 (package
124 (name "git")
125 ;; XXX When updating Git, check if the special 'git:src' input to cgit needs
126 ;; to be updated as well.
127 (version "2.14.1")
128 (source (origin
129 (method url-fetch)
130 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
131 version ".tar.xz"))
132 (sha256
133 (base32
134 "1iic3wiihxp3l3k6d4z886v3869c3dzgddjxnd5124wy1rnlqwkg"))))
135 (build-system gnu-build-system)
136 (native-inputs
137 `(("native-perl" ,perl)
138 ("gettext" ,gettext-minimal)
139 ("git-manpages"
140 ,(origin
141 (method url-fetch)
142 (uri (string-append
143 "mirror://kernel.org/software/scm/git/git-manpages-"
144 version ".tar.xz"))
145 (sha256
146
147 (base32
148 "1whlsiicayalym4hkf01zdiqpw37gdf7c52gw9ki7bv2x3hf3g3y"))))))
149 (inputs
150 `(("curl" ,curl)
151 ("expat" ,expat)
152 ("openssl" ,openssl)
153 ("perl" ,perl)
154 ("python" ,python-2) ; CAVEAT: incompatible with python-3 according to INSTALL
155 ("zlib" ,zlib)
156
157 ;; For 'gitweb.cgi'
158 ("perl-cgi" ,perl-cgi)
159
160 ;; For 'git-svn'.
161 ("subversion" ,subversion)
162 ("perl-term-readkey" ,perl-term-readkey)
163
164 ;; For 'git-send-email'
165 ("perl-authen-sasl" ,perl-authen-sasl)
166 ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
167 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
168
169 ;; For 'git gui', 'gitk', and 'git citool'.
170 ("tcl" ,tcl)
171 ("tk" ,tk)))
172 (outputs '("out" ; the core
173 "send-email" ; for git-send-email
174 "svn" ; git-svn
175 "gui")) ; gitk, git gui
176 (arguments
177 `(#:make-flags `("V=1" ;more verbose compilation
178
179 ;; By default 'make install' creates hard links for
180 ;; things in 'libexec/git-core', which leads to huge
181 ;; nars; see <https://bugs.gnu.org/21949>.
182 "NO_INSTALL_HARDLINKS=indeed")
183 #:test-target "test"
184
185 ;; The explicit --with-tcltk forces the build system to hardcode the
186 ;; absolute file name to 'wish'.
187 #:configure-flags (list (string-append "--with-tcltk="
188 (assoc-ref %build-inputs "tk")
189 "/bin/wish8.6")) ; XXX
190
191 #:modules ((srfi srfi-1)
192 ,@%gnu-build-system-modules)
193 #:phases
194 (modify-phases %standard-phases
195 (add-after 'configure 'patch-makefiles
196 (lambda _
197 (substitute* "Makefile"
198 (("/bin/sh") (which "sh"))
199 (("/usr/bin/perl") (which "perl"))
200 (("/usr/bin/python") (which "python")))
201 (substitute* "perl/Makefile"
202 ;; Don't create timestamped 'perllocal.pod'.
203 (("\\$< PREFIX=") "$< NO_PERLLOCAL=1 PREFIX="))
204 #t))
205 (add-after 'configure 'add-PM.stamp
206 (lambda _
207 ;; Add the "PM.stamp" to avoid "no rule to make target".
208 (call-with-output-file "perl/PM.stamp" (const #t))
209 #t))
210 (add-before 'check 'patch-tests
211 (lambda _
212 ;; These files contain some funny bytes that Guile is unable
213 ;; to decode for shebang patching. Just delete them.
214 (for-each delete-file '("t/t4201-shortlog.sh"
215 "t/t7813-grep-icase-iso.sh"))
216 ;; Many tests contain inline shell scripts (hooks etc).
217 (substitute* (find-files "t" "\\.sh$")
218 (("#!/bin/sh") (string-append "#!" (which "sh"))))
219 ;; Un-do shebang patching here to prevent checksum mismatch.
220 (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
221 (("^#!.*/bin/perl") "#!/usr/bin/perl"))
222 (substitute* "t/t5003-archive-zip.sh"
223 (("cp /bin/sh") (string-append "cp " (which "sh"))))
224 (substitute* "t/t6030-bisect-porcelain.sh"
225 (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
226 ;; FIXME: This test runs `git commit` with a bogus EDITOR
227 ;; and empty commit message, but does not fail the way it's
228 ;; expected to. The test passes when invoked interactively.
229 (substitute* "t/t7508-status.sh"
230 (("\tcommit_template_commented") "\ttrue"))
231 ;; More checksum mismatches due to odd shebangs.
232 (substitute* "t/t9100-git-svn-basic.sh"
233 (("\"#!/gnu.*/bin/sh") "\"#!/bin/sh"))
234 (substitute* "t/t9300-fast-import.sh"
235 (("\t#!/gnu.*/bin/sh") "\t#!/bin/sh")
236 (("'#!/gnu.*/bin/sh") "'#!/bin/sh"))
237 ;; FIXME: Some hooks fail with "basename: command not found".
238 ;; See 't/trash directory.t9164.../svn-hook.log'.
239 (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
240 #t))
241 (add-after 'install 'install-shell-completion
242 (lambda* (#:key outputs #:allow-other-keys)
243 (let* ((out (assoc-ref outputs "out"))
244 (completions (string-append out "/etc/bash_completion.d")))
245 ;; TODO: Install the tcsh and zsh completions in the right place.
246 (mkdir-p completions)
247 (copy-file "contrib/completion/git-completion.bash"
248 (string-append completions "/git"))
249 #t)))
250 (add-after 'install 'split
251 (lambda* (#:key inputs outputs #:allow-other-keys)
252 ;; Split the binaries to the various outputs.
253 (let* ((out (assoc-ref outputs "out"))
254 (se (assoc-ref outputs "send-email"))
255 (svn (assoc-ref outputs "svn"))
256 (gui (assoc-ref outputs "gui"))
257 (gitk (string-append out "/bin/gitk"))
258 (gitk* (string-append gui "/bin/gitk"))
259 (git-gui (string-append out "/libexec/git-core/git-gui"))
260 (git-gui* (string-append gui "/libexec/git-core/git-gui"))
261 (git-cit (string-append out "/libexec/git-core/git-citool"))
262 (git-cit* (string-append gui "/libexec/git-core/git-citool"))
263 (git-se (string-append out "/libexec/git-core/git-send-email"))
264 (git-se* (string-append se "/libexec/git-core/git-send-email"))
265 (git-svn (string-append out "/libexec/git-core/git-svn"))
266 (git-svn* (string-append svn "/libexec/git-core/git-svn"))
267 (git-sm (string-append out
268 "/libexec/git-core/git-submodule")))
269 (mkdir-p (string-append gui "/bin"))
270 (mkdir-p (string-append gui "/libexec/git-core"))
271 (mkdir-p (string-append se "/libexec/git-core"))
272 (mkdir-p (string-append svn "/libexec/git-core"))
273
274 (for-each (lambda (old new)
275 (copy-file old new)
276 (delete-file old)
277 (chmod new #o555))
278 (list gitk git-gui git-cit git-se git-svn)
279 (list gitk* git-gui* git-cit* git-se* git-svn*))
280
281 ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
282 (wrap-program git-svn*
283 `("PATH" ":" prefix
284 (,(string-append (assoc-ref inputs "subversion")
285 "/bin")))
286 `("PERL5LIB" ":" prefix
287 ,(map (lambda (i) (string-append (assoc-ref inputs i)
288 "/lib/perl5/site_perl"))
289 '("subversion" "perl-term-readkey")))
290
291 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
292 ;; help it find 'libsvn_client-1.so'.
293 `("LD_LIBRARY_PATH" ":" prefix
294 (,(string-append (assoc-ref inputs "subversion")
295 "/lib"))))
296
297 ;; Tell 'git-send-email' where perl modules are.
298 (wrap-program git-se*
299 `("PERL5LIB" ":" prefix
300 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
301 (list
302 ,@(transitive-input-references
303 'inputs
304 (map (lambda (l)
305 (assoc l (inputs)))
306 '("perl-authen-sasl"
307 "perl-net-smtp-ssl"
308 "perl-io-socket-ssl")))))))
309
310 ;; Tell 'gitweb.cgi' where perl modules are.
311 (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
312 `("PERL5LIB" ":" prefix
313 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
314 (list
315 ,@(transitive-input-references
316 'inputs
317 (map (lambda (l)
318 (assoc l (inputs)))
319 '("perl-cgi")))))))
320
321 ;; Tell 'git-submodule' where Perl is.
322 (wrap-program git-sm
323 `("PATH" ":" prefix
324 (,(string-append (assoc-ref inputs "perl")
325 "/bin")))))))
326 (add-after 'split 'install-man-pages
327 (lambda* (#:key inputs outputs #:allow-other-keys)
328 (let* ((out (assoc-ref outputs "out"))
329 (man (string-append out "/share/man"))
330 (manpages (assoc-ref inputs "git-manpages")))
331 (mkdir-p man)
332 (with-directory-excursion man
333 (zero? (system* "tar" "xvf" manpages)))))))))
334
335 (native-search-paths
336 ;; For HTTPS access, Git needs a single-file certificate bundle, specified
337 ;; with $GIT_SSL_CAINFO.
338 (list (search-path-specification
339 (variable "GIT_SSL_CAINFO")
340 (file-type 'regular)
341 (separator #f) ;single entry
342 (files '("etc/ssl/certs/ca-certificates.crt")))
343 (search-path-specification
344 (variable "GIT_EXEC_PATH")
345 (separator #f) ;single entry
346 (files '("libexec/git-core")))))
347
348 (synopsis "Distributed version control system")
349 (description
350 "Git is a free distributed version control system designed to handle
351 everything from small to very large projects with speed and efficiency.")
352 (license license:gpl2)
353 (home-page "https://git-scm.com/")))
354
355 (define-public libgit2
356 (package
357 (name "libgit2")
358 (version "0.26.0")
359 (source (origin
360 (method url-fetch)
361 (uri (string-append "https://github.com/libgit2/libgit2/"
362 "archive/v" version ".tar.gz"))
363 (file-name (string-append name "-" version ".tar.gz"))
364 (sha256
365 (base32
366 "1fdk9yhwvl1w1z71ykzcvgh4nsf8scxcbclz5anh98zpplmhmisa"))
367 (patches (search-patches "libgit2-0.25.1-mtime-0.patch"))))
368 (build-system cmake-build-system)
369 (outputs '("out" "debug"))
370 (arguments
371 `(#:configure-flags '("-DUSE_SHA1DC=ON") ; SHA-1 collision detection
372 #:phases
373 (modify-phases %standard-phases
374 (add-after 'unpack 'fix-hardcoded-paths
375 (lambda _
376 (substitute* "tests/repo/init.c"
377 (("#!/bin/sh") (string-append "#!" (which "sh"))))
378 (substitute* "tests/clar/fs.h"
379 (("/bin/cp") (which "cp"))
380 (("/bin/rm") (which "rm")))
381 #t))
382 ;; Run checks more verbosely.
383 (replace 'check
384 (lambda _ (zero? (system* "./libgit2_clar" "-v" "-Q")))))))
385 (inputs
386 `(("libssh2" ,libssh2)
387 ("libcurl" ,curl)
388 ("python" ,python-wrapper)))
389 (native-inputs
390 `(("pkg-config" ,pkg-config)))
391 (propagated-inputs
392 ;; These two libraries are in 'Requires.private' in libgit2.pc.
393 `(("openssl" ,openssl)
394 ("zlib" ,zlib)))
395 (home-page "https://libgit2.github.com/")
396 (synopsis "Library providing Git core methods")
397 (description
398 "Libgit2 is a portable, pure C implementation of the Git core methods
399 provided as a re-entrant linkable library with a solid API, allowing you to
400 write native speed custom Git applications in any language with bindings.")
401 ;; GPLv2 with linking exception
402 (license license:gpl2)))
403
404 (define-public git-crypt
405 (package
406 (name "git-crypt")
407 (version "0.5.0")
408 (source (origin
409 (method url-fetch)
410 (uri (string-append "https://github.com/AGWA/git-crypt"
411 "/archive/" version ".tar.gz"))
412 (file-name (string-append name "-" version ".tar.gz"))
413 (sha256
414 (base32
415 "0454fdmgm5f3razkn8n03lfqm5zyzvr4r2528zmlxiwba9518l2i"))))
416 (build-system gnu-build-system)
417 (inputs
418 `(("git" ,git)
419 ("openssl" ,openssl)))
420 (arguments
421 `(#:tests? #f ; No tests.
422 #:phases
423 (modify-phases %standard-phases
424 (delete 'configure)
425 (replace 'build
426 (lambda _
427 (zero? (system* "make"))))
428 (replace 'install
429 (lambda* (#:key outputs #:allow-other-keys)
430 (let ((out (assoc-ref outputs "out")))
431 (zero? (system* "make" "install"
432 (string-append "PREFIX=" out)))))))))
433 (home-page "https://www.agwa.name/projects/git-crypt")
434 (synopsis "Transparent encryption of files in a git repository")
435 (description "git-crypt enables transparent encryption and decryption of
436 files in a git repository. Files which you choose to protect are encrypted when
437 committed, and decrypted when checked out. git-crypt lets you freely share a
438 repository containing a mix of public and private content. git-crypt gracefully
439 degrades, so developers without the secret key can still clone and commit to a
440 repository with encrypted files. This lets you store your secret material (such
441 as keys or passwords) in the same repository as your code, without requiring you
442 to lock down your entire repository.")
443 (license license:gpl3+)))
444
445 (define-public git-remote-gcrypt
446 (package
447 (name "git-remote-gcrypt")
448 (version "1.0.1")
449 (source (origin
450 (method git-fetch)
451 (uri (git-reference
452 (url "https://git.spwhitton.name/git-remote-gcrypt")
453 (commit version)))
454 (file-name (string-append name "-" version "-checkout"))
455 (sha256
456 (base32
457 "0znrx77vpm4a8l7yiybsxk5vrawijqqfxmp1p2yhaaw8cbgrj7az"))))
458 (build-system trivial-build-system)
459 (arguments
460 `(#:modules ((guix build utils))
461 #:builder (begin
462 (use-modules (guix build utils))
463 (let* ((source (assoc-ref %build-inputs "source"))
464 (output (assoc-ref %outputs "out"))
465 (bindir (string-append output "/bin")))
466 (install-file (string-append source "/git-remote-gcrypt")
467 bindir)
468 #t))))
469 (home-page "https://spwhitton.name/tech/code/git-remote-gcrypt/")
470 (synopsis "Whole remote repository encryption")
471 (description "git-remote-gcrypt is a Git remote helper to push and pull from
472 repositories encrypted with GnuPG. It works with the standard Git transports,
473 including repository hosting services like GitLab.
474
475 Remote helper programs are invoked by Git to handle network transport. This
476 helper handles @code{gcrypt:} URLs that access a remote repository encrypted
477 with GPG, using our custom format.
478
479 Supported locations are local, @code{rsync://} and @code{sftp://}, where the
480 repository is stored as a set of files, or instead any Git URL where gcrypt
481 will store the same representation in a Git repository, bridged over arbitrary
482 Git transport.
483
484 The aim is to provide confidential, authenticated Git storage and
485 collaboration using typical untrusted file hosts or services.")
486 (license license:gpl3+)))
487
488 (define-public cgit
489 (package
490 (name "cgit")
491 ;; XXX When updating cgit, try removing the special 'git:src' input and
492 ;; using the source of the git package.
493 (version "1.1")
494 (source (origin
495 (method url-fetch)
496 (uri (string-append
497 "https://git.zx2c4.com/cgit/snapshot/cgit-"
498 version ".tar.xz"))
499 (sha256
500 (base32
501 "142qcgs8dwnzhymn0a7xx47p9fc2z5wrb86ah4a9iz0mpqlsz288"))))
502 (build-system gnu-build-system)
503 (arguments
504 '(#:tests? #f ; XXX: fail to build the in-source git.
505 #:test-target "test"
506 #:make-flags '("CC=gcc" "SHELL_PATH=sh")
507 #:phases
508 (modify-phases %standard-phases
509 (add-after 'unpack 'unpack-git
510 (lambda* (#:key inputs #:allow-other-keys)
511 ;; Unpack the source of git into the 'git' directory.
512 (zero? (system*
513 "tar" "--strip-components=1" "-C" "git" "-xf"
514 (assoc-ref inputs "git:src")))))
515 (delete 'configure) ; no configure script
516 (add-after 'build 'build-man
517 (lambda* (#:key make-flags #:allow-other-keys)
518 (zero? (apply system* `("make" ,@make-flags "doc-man")))))
519 (replace 'install
520 (lambda* (#:key make-flags outputs #:allow-other-keys)
521 (let ((out (assoc-ref outputs "out")))
522 (and (zero? (apply system*
523 `("make" ,@make-flags
524 ,(string-append "prefix=" out)
525 ,(string-append
526 "CGIT_SCRIPT_PATH=" out "/share/cgit")
527 "install" "install-man")))
528 ;; Move the platform-dependent 'cgit.cgi' into lib
529 ;; to get it stripped.
530 (rename-file (string-append out "/share/cgit/cgit.cgi")
531 (string-append out "/lib/cgit/cgit.cgi"))
532 #t)))))))
533 (native-inputs
534 ;; For building manpage.
535 `(("asciidoc" ,asciidoc)))
536 (inputs
537 `(;; Cgit directly accesses some internal Git interfaces that changed in
538 ;; Git 2.12. Try removing this special input and using the source of the
539 ;; Git package for cgit > 1.1.
540 ("git:src"
541 ,(origin
542 (method url-fetch)
543 (uri "mirror://kernel.org/software/scm/git/git-2.10.4.tar.xz")
544 (sha256
545 (base32
546 "1pni4mgih5w42813dxljl61s7xmcpdnar34d9m4548hzpljjyd4l"))))
547 ("openssl" ,openssl)
548 ("zlib" ,zlib)))
549 (home-page "https://git.zx2c4.com/cgit/")
550 (synopsis "Web frontend for git repositories")
551 (description
552 "CGit is an attempt to create a fast web interface for the Git SCM, using
553 a built-in cache to decrease server I/O pressure.")
554 (license license:gpl2)))
555
556 (define-public python-ghp-import
557 (package
558 (name "python-ghp-import")
559 (version "0.5.5")
560 (source
561 (origin
562 (method url-fetch)
563 (uri (string-append
564 "https://github.com/davisp/ghp-import/archive/"
565 version ".tar.gz"))
566 (file-name (string-append name "-" version ".tar.gz"))
567 (sha256
568 (base32
569 "0x887v690xsac2hzjkpbvp3a6crh3m08mqbk3nb4xwc9dnk869q7"))))
570 (build-system python-build-system)
571 (arguments
572 `(#:phases (modify-phases %standard-phases
573 (add-after 'install 'install-documentation
574 (lambda* (#:key outputs #:allow-other-keys)
575 (let* ((out (assoc-ref outputs "out"))
576 (doc (string-append out "/share/doc"))
577 (licenses (string-append out "/share/licenses")))
578 (install-file "README.md" doc)
579 (install-file "LICENSE" licenses)))))))
580 (home-page "https://github.com/davisp/ghp-import")
581 (synopsis "Copy directory to the gh-pages branch")
582 (description "Script that copies a directory to the gh-pages branch (by
583 default) of the repository.")
584
585 ;; See <https://bugs.gnu.org/27913>.
586 (license (license:non-copyleft
587 "https://raw.githubusercontent.com/davisp/ghp-import/master/LICENSE"
588 "Tumbolia Public License"))))
589
590 (define-public python2-ghp-import
591 (package-with-python2
592 (strip-python2-variant python-ghp-import)))
593
594 (define-public shflags
595 (package
596 (name "shflags")
597 (version "1.2.0")
598 (source (origin
599 (method url-fetch)
600 (uri (string-append "https://github.com/kward/shflags/archive/v"
601 version ".tar.gz"))
602 (sha256
603 (base32
604 "0zxw12haylaq60a335xlqcs4afw2zrgwqymmpw0m21r51w6irdmr"))))
605 (build-system trivial-build-system)
606 (native-inputs `(("tar" ,tar)
607 ("gzip" ,gzip)))
608 (arguments
609 `(#:modules ((guix build utils))
610 #:builder (begin
611 (use-modules (guix build utils))
612 (let* ((source (assoc-ref %build-inputs "source"))
613 (tar (assoc-ref %build-inputs "tar"))
614 (gzip (assoc-ref %build-inputs "gzip"))
615 (output (assoc-ref %outputs "out"))
616 (srcdir (string-append output "/src")))
617 (begin
618 (setenv "PATH" (string-append gzip "/bin"))
619 (system* (string-append tar "/bin/tar") "xzf"
620 source)
621 (chdir ,(string-append name "-" version))
622 (mkdir-p srcdir)
623 (copy-file "src/shflags"
624 (string-append srcdir "/shflags"))
625 #t)))))
626 (home-page "https://github.com/kward/shflags")
627 (synopsis "Command-line flags library for shell scripts")
628 (description
629 "Shell Flags (shFlags) is a library written to greatly simplify the
630 handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
631 ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
632 different versions of getopt on various OSes make writing portable shell
633 scripts difficult. shFlags instead provides an API that doesn't change across
634 shell and OS versions so the script writer can be confident that the script
635 will work.")
636 (license license:lgpl2.1)))
637
638 (define-public git-flow
639 (package
640 (name "git-flow")
641 ;; This version has not be officially released yet, so we build it
642 ;; directly from the git repository.
643 (version "0.4.2-pre")
644 (source (origin
645 (method git-fetch)
646 (uri (git-reference
647 (url "https://github.com/nvie/gitflow/")
648 (commit "15aab26490facf285acef56cb5d61025eacb3a69")))
649 (sha256
650 (base32
651 "01fs97q76fdfnvmrh2cyjhywcs3pykf1dg58sy0frflnsdzs6prx"))))
652 (build-system gnu-build-system)
653 (inputs `(("shflags" ,shflags)))
654 (arguments
655 '(#:tests? #f ; no tests
656 #:make-flags (list (string-append "prefix="
657 (assoc-ref %outputs "out")))
658 #:phases
659 (modify-phases %standard-phases
660 (add-after 'unpack 'reset-shFlags-link
661 (lambda* (#:key inputs #:allow-other-keys)
662 ;; The link points to a file in the shFlags submodule.
663 ;; Redirect it to point to our system shFlags.
664 (let ((shflags (assoc-ref inputs "shflags")))
665 (begin
666 (delete-file "gitflow-shFlags")
667 (symlink (string-append shflags "/src/shflags")
668 "gitflow-shFlags")))))
669 (delete 'configure)
670 (delete 'build))))
671 (home-page "http://nvie.com/posts/a-successful-git-branching-model/")
672 (synopsis "Git extensions for Vincent Driessen's branching model")
673 (description
674 "Vincent Driessen's branching model is a git branching and release
675 management strategy that helps developers keep track of features, hotfixes,
676 and releases in bigger software projects. The git-flow library of git
677 subcommands helps automate some parts of the flow to make working with it a
678 lot easier.")
679 (license license:bsd-2)))
680
681 (define-public stgit
682 (package
683 (name "stgit")
684 (version "0.18")
685 (source (origin
686 (method url-fetch)
687 (uri (string-append "https://github.com/ctmarinas/stgit/archive/v"
688 version ".tar.gz"))
689 (file-name (string-append name "-" version ".tar.gz"))
690 (sha256
691 (base32
692 "19fk6vw3pgp2a98wpd4j3kyiyll5dy9bi4921wq1mrky0l53mj00"))))
693 (build-system python-build-system)
694 (inputs
695 `(("git" ,git)))
696 (arguments
697 `(#:python ,python-2
698 #:phases
699 (modify-phases %standard-phases
700 (replace 'check
701 (lambda _
702 ;; two tests will fail -> disable them. TODO: fix the failing tests
703 (delete-file "t/t3300-edit.sh")
704 (delete-file "t/t7504-commit-msg-hook.sh")
705 (zero? (system* "make" "test")))))))
706 (home-page "http://procode.org/stgit/")
707 (synopsis "Stacked Git")
708 (description
709 "StGit is a command-line application that provides functionality similar
710 to Quilt (i.e., pushing/popping patches to/from a stack), but using Git
711 instead of @command{diff} and @command{patch}. StGit stores its patches in a
712 Git repository as normal Git commits, and provides a number of commands to
713 manipulate them in various ways.")
714 (license license:gpl2)))
715
716 (define-public vcsh
717 (package
718 (name "vcsh")
719 (version "1.20151229")
720 (source (origin
721 (method url-fetch)
722 (uri (string-append "https://github.com/RichiH/vcsh/archive/v"
723 version ".tar.gz"))
724 (file-name (string-append name "-" version ".tar.gz"))
725 (sha256
726 (base32
727 "1ym3swkh738c3vciffvlr96vqzhwmzkb8ajqzap8f0j9n039a1mf"))))
728 (build-system gnu-build-system)
729 (native-inputs
730 `(("which" ,which)))
731 (inputs
732 `(("git" ,git)
733 ("perl" ,perl)
734 ("perl-test-harness" ,perl-test-harness)
735 ("perl-shell-command" ,perl-shell-command)
736 ("perl-test-most" ,perl-test-most)))
737 (arguments
738 '(#:phases (modify-phases %standard-phases
739 (delete 'configure)
740 (delete 'build))
741 #:make-flags (list (string-append "PREFIX="
742 (assoc-ref %outputs "out")))
743 #:test-target "test"))
744 (home-page "https://github.com/RichiH/vcsh")
745 (synopsis "Version control system for @code{$HOME}")
746 (description
747 "vcsh version-controls configuration files in several Git repositories,
748 all in one single directory. They all maintain their working trees without
749 clobbering each other or interfering otherwise. By default, all Git
750 repositories maintained via vcsh store the actual files in @code{$HOME},
751 though this can be overridden.")
752 (license license:gpl2+)))
753
754 (define-public git-test-sequence
755 (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76"))
756 (package
757 (name "git-test-sequence")
758 (version (string-append "20140312." (string-take commit 7)))
759 (source (origin
760 (method git-fetch)
761 (uri (git-reference
762 ;; There are many other scripts in this directory; we
763 ;; are interested in just one for this package.
764 (url "https://github.com/dustin/bindir")
765 (commit commit)))
766 (sha256
767 (base32
768 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
769 (build-system trivial-build-system)
770 (arguments
771 `(#:modules ((guix build utils))
772 #:builder (begin
773 (use-modules (guix build utils))
774 (let* ((source (assoc-ref %build-inputs "source"))
775 (output (assoc-ref %outputs "out"))
776 (bindir (string-append output "/bin"))
777 (script "git-test-sequence"))
778 (install-file (string-append source "/" script)
779 bindir)
780 #t))))
781 (home-page "http://dustin.sallings.org/2010/03/28/git-test-sequence.html")
782 (synopsis "Run a command over a sequence of commits")
783 (description
784 "git-test-sequence is similar to an automated git bisect except it’s
785 linear. It will test every change between two points in the DAG. It will
786 also walk each side of a merge and test those changes individually.")
787 (license (license:x11-style "file://LICENSE")))))
788
789 (define-public gitolite
790 (package
791 (name "gitolite")
792 (version "3.6.6")
793 (source (origin
794 (method url-fetch)
795 (uri (string-append
796 "https://github.com/sitaramc/gitolite/archive/v"
797 version ".tar.gz"))
798 (file-name (string-append name "-" version ".tar.gz"))
799 (sha256
800 (base32
801 "07q33f86694s0x3k9lcmy1vzfw9appdrlmmb9j3bz4qkrxqdnwb9"))))
802 (build-system gnu-build-system)
803 (arguments
804 '(#:tests? #f ; no tests
805 #:phases (modify-phases %standard-phases
806 (delete 'configure)
807 (delete 'build)
808 (add-before 'install 'patch-scripts
809 (lambda* (#:key inputs #:allow-other-keys)
810 (let ((perl (string-append (assoc-ref inputs "perl")
811 "/bin/perl")))
812 ;; This seems to take care of every shell script that
813 ;; invokes Perl.
814 (substitute* (find-files "." ".*")
815 ((" perl -")
816 (string-append " " perl " -")))
817
818 ;; Avoid references to the store in authorized_keys.
819 ;; This works because gitolite-shell is in the PATH.
820 (substitute* "src/triggers/post-compile/ssh-authkeys"
821 (("\\$glshell \\$user")
822 "gitolite-shell $user")))))
823 (replace 'install
824 (lambda* (#:key outputs #:allow-other-keys)
825 (let* ((output (assoc-ref outputs "out"))
826 (sharedir (string-append output "/share/gitolite"))
827 (bindir (string-append output "/bin")))
828 (mkdir-p sharedir)
829 (mkdir-p bindir)
830 (system* "./install" "-to" sharedir)
831 ;; Create symlinks for executable scripts in /bin.
832 (for-each (lambda (script)
833 (symlink (string-append sharedir "/" script)
834 (string-append bindir "/" script)))
835 '("gitolite" "gitolite-shell"))
836 #t))))))
837 (inputs
838 `(("perl" ,perl)))
839 ;; git and openssh are propagated because trying to patch the source via
840 ;; regexp matching is too brittle and prone to false positives.
841 (propagated-inputs
842 `(("git" ,git)
843 ("openssh" ,openssh)))
844 (home-page "http://gitolite.com")
845 (synopsis "Git access control layer")
846 (description
847 "Gitolite is an access control layer on top of Git, providing fine access
848 control to Git repositories.")
849 (license license:gpl2)))
850
851 (define-public mercurial
852 (package
853 (name "mercurial")
854 (version "4.2.3")
855 (source (origin
856 (method url-fetch)
857 (uri (string-append "https://www.mercurial-scm.org/"
858 "release/mercurial-" version ".tar.gz"))
859 (sha256
860 (base32
861 "1b7p3z8lin6hyyzkskskp065qnyfxid2yxnjygni0n4yv33qz404"))))
862 (build-system python-build-system)
863 (arguments
864 `(;; Restrict to Python 2, as Python 3 would require
865 ;; the argument --c2to3.
866 #:python ,python-2
867 ;; FIXME: Disabled tests because they require the nose unit
868 ;; testing framework: https://nose.readthedocs.org/en/latest/ .
869 #:tests? #f))
870 (home-page "https://www.mercurial-scm.org/")
871 (synopsis "Decentralized version control system")
872 (description
873 "Mercurial is a free, distributed source control management tool.
874 It efficiently handles projects of any size
875 and offers an easy and intuitive interface.")
876 (license license:gpl2+)))
877
878 (define-public neon
879 (package
880 (name "neon")
881 (version "0.30.2")
882 (source (origin
883 (method url-fetch)
884 (uri (string-append "http://www.webdav.org/neon/neon-"
885 version ".tar.gz"))
886 (sha256
887 (base32
888 "1jpvczcx658vimqm7c8my2q41fnmjaf1j03g7bsli6rjxk6xh2yv"))))
889 (build-system gnu-build-system)
890 (native-inputs
891 `(("perl" ,perl)
892 ("pkg-config" ,pkg-config)))
893 (inputs
894 `(("libxml2" ,libxml2)
895 ("openssl" ,openssl)
896 ("zlib" ,zlib)))
897 (arguments
898 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
899 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
900 #:tests? #f
901 #:configure-flags '("--enable-shared"
902 ;; requires libgnutils-config, deprecated
903 ;; in gnutls 2.8.
904 ; "--with-ssl=gnutls")))
905 "--with-ssl=openssl")))
906 (home-page "http://www.webdav.org/neon/")
907 (synopsis "HTTP and WebDAV client library")
908 (description
909 "Neon is an HTTP and WebDAV client library, with a C interface and the
910 following features:
911 @enumerate
912 @item High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
913 DELETE, etc.);
914 @item low-level interface to the HTTP request/response engine, allowing the use
915 of arbitrary HTTP methods, headers, etc.;
916 @item authentication support including Basic and Digest support, along with
917 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
918 @item SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
919 verifying server certificates, handling client certificates, and examining
920 certificate properties, smartcard-based client certificates are also
921 supported via a PKCS#11 wrapper interface;
922 @item abstract interface to parsing XML using libxml2 or expat, and wrappers for
923 simplifying handling XML HTTP response bodies;
924 @item WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
925 property manipulation.
926 @end enumerate\n")
927 (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+
928
929 (define-public subversion
930 (package
931 (name "subversion")
932 (version "1.8.19")
933 (source (origin
934 (method url-fetch)
935 (uri
936 (list
937 (string-append "https://archive.apache.org/dist/subversion/"
938 "subversion-" version ".tar.bz2")
939 (string-append "https://www-eu.apache.org/dist/subversion/"
940 "subversion-" version ".tar.bz2")))
941 (sha256
942 (base32
943 "1gp6426gkdza6ni2whgifjcmjb4nq34ljy07yxkrhlarvfq6ks2n"))))
944 (build-system gnu-build-system)
945 (arguments
946 '(#:phases
947 (modify-phases %standard-phases
948 (add-after 'configure 'patch-libtool-wrapper-ls
949 (lambda* (#:key inputs #:allow-other-keys)
950 ;; This substitution allows tests svnauthz_tests and svnlook_tests
951 ;; to pass. These tests execute svnauthz and svnlook through
952 ;; their libtool wrapper scripts from svn hooks, whose empty
953 ;; environments cause "ls: command not found" errors. It would be
954 ;; nice if this fix ultimately made its way into libtool.
955 (let ((coreutils (assoc-ref inputs "coreutils")))
956 (substitute* "libtool"
957 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))
958 #t)))
959 (add-after 'install 'install-perl-bindings
960 (lambda* (#:key outputs #:allow-other-keys)
961 ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
962 (let ((out (assoc-ref outputs "out")))
963 (and (zero? (system* "make" "swig-pl-lib"))
964 ;; FIXME: Test failures.
965 ;; (zero? (system* "make" "check-swig-pl"))
966 (zero? (system* "make" "install-swig-pl-lib"))
967
968 ;; Set the right installation prefix.
969 (with-directory-excursion
970 "subversion/bindings/swig/perl/native"
971 (and (zero?
972 (system* "perl" "Makefile.PL"
973 "NO_PERLLOCAL=1"
974 (string-append "PREFIX=" out)))
975 (zero?
976 (system* "make" "install"
977 (string-append "OTHERLDFLAGS="
978 "-Wl,-rpath="
979 out "/lib"))))))))))))
980 (native-inputs
981 `(("pkg-config" ,pkg-config)
982 ;; For the Perl bindings.
983 ("swig" ,swig)))
984 (inputs
985 `(("apr" ,apr)
986 ("apr-util" ,apr-util)
987 ("serf" ,serf)
988 ("perl" ,perl)
989 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
990 ("sqlite" ,sqlite)
991 ("zlib" ,zlib)))
992 (home-page "https://subversion.apache.org/")
993 (synopsis "Revision control system")
994 (description
995 "Subversion exists to be universally recognized and adopted as a
996 centralized version control system characterized by its
997 reliability as a safe haven for valuable data; the simplicity of its model and
998 usage; and its ability to support the needs of a wide variety of users and
999 projects, from individuals to large-scale enterprise operations.")
1000 (license license:asl2.0)))
1001
1002 (define-public rcs
1003 (package
1004 (name "rcs")
1005 (version "5.9.4")
1006 (source (origin
1007 (method url-fetch)
1008 (uri (string-append "mirror://gnu/rcs/rcs-"
1009 version ".tar.xz"))
1010 (sha256
1011 (base32
1012 "1zsx7bb0rgvvvisiy4zlixf56ay8wbd9qqqcp1a1g0m1gl6mlg86"))
1013 (patches (search-patches "rcs-5.9.4-noreturn.patch"))))
1014 (build-system gnu-build-system)
1015 (native-inputs `(("ed" ,ed)))
1016 (home-page "https://www.gnu.org/software/rcs/")
1017 (synopsis "Per-file local revision control system")
1018 (description
1019 "RCS is the original Revision Control System. It works on a
1020 file-by-file basis, in contrast to subsequent version control systems such as
1021 CVS, Subversion, and Git. This can make it suitable for system
1022 administration files, for example, which are often inherently local to one
1023 machine.")
1024 (license license:gpl3+)))
1025
1026 (define-public cvs
1027 (package
1028 (name "cvs")
1029 (version "1.12.13")
1030 (source (origin
1031 (method url-fetch)
1032 (uri (string-append
1033 "https://ftp.gnu.org/non-gnu/cvs/source/feature/"
1034 version "/cvs-" version ".tar.bz2"))
1035 (patches (search-patches "cvs-2017-12836.patch"))
1036 (sha256
1037 (base32
1038 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
1039 (build-system gnu-build-system)
1040 (arguments
1041 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
1042 '(#:tests? #f
1043 #:configure-flags (list "--with-external-zlib")))
1044 (inputs `(("zlib" ,zlib)
1045 ("nano" ,nano))) ; the default editor
1046 (home-page "http://cvs.nongnu.org")
1047 (synopsis "Historical centralized version control system")
1048 (description
1049 "CVS is a version control system, an important component of Source
1050 Configuration Management (SCM). Using it, you can record the history of
1051 sources files, and documents. It fills a similar role to the free software
1052 RCS, PRCS, and Aegis packages.")
1053 (license license:gpl1+)))
1054
1055 (define-public cvs-fast-export
1056 (package
1057 (name "cvs-fast-export")
1058 (version "1.43")
1059 (source (origin
1060 (method url-fetch)
1061 (uri (string-append "http://www.catb.org/~esr/"
1062 name "/" name "-" version ".tar.gz"))
1063 (sha256
1064 (base32
1065 "17xp5q4cxmd6z0ii1fdr4j1djb9mz1qv7hzr6fawdapjzahi65m3"))))
1066 (build-system gnu-build-system)
1067 (arguments
1068 '(#:phases
1069 (modify-phases %standard-phases
1070 (delete 'configure)
1071 (add-after 'unpack 'remove-optimizations
1072 (lambda _
1073 ;; Don't optimize for a specific processor architecture.
1074 (substitute* "Makefile"
1075 (("CFLAGS \\+= -march=native") ""))
1076 ;; This code runs with Python2 or Python3
1077 (substitute* "cvsreduce"
1078 (("python3") "python"))
1079 #t)))
1080 #:parallel-build? #f ; parallel a2x commands fail spectacularly
1081 #:make-flags
1082 (list "CC=gcc" (string-append "prefix?=" (assoc-ref %outputs "out")))))
1083 (inputs `(("git" ,git)))
1084 (native-inputs `(("asciidoc" ,asciidoc)
1085 ;; These are needed for the tests.
1086 ("cvs" ,cvs)
1087 ("python" ,python-2)
1088 ("rcs" ,rcs)))
1089 (home-page "http://www.catb.org/esr/cvs-fast-export/")
1090 (synopsis "Export an RCS or CVS history as a fast-import stream")
1091 (description "This program analyzes a collection of RCS files in a CVS
1092 repository (or outside of one) and, when possible, emits an equivalent history
1093 in the form of a fast-import stream. Not all possible histories can be
1094 rendered this way; the program tries to emit useful warnings when it can't.
1095
1096 The program can also produce a visualization of the resulting commit directed
1097 acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org,
1098 Graphviz}. The package also includes @command{cvssync}, a tool for mirroring
1099 masters from remote CVS hosts.")
1100 (license license:gpl2+)))
1101
1102 (define-public vc-dwim
1103 (package
1104 (name "vc-dwim")
1105 (version "1.8")
1106 (source (origin
1107 (method url-fetch)
1108 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
1109 version ".tar.xz"))
1110 (sha256
1111 (base32
1112 "0d5sqafc40l878m8wjr35jxmalj4kam1m6ph60v08ng4ml5g7931"))))
1113 (build-system gnu-build-system)
1114 (inputs `(("perl" ,perl)
1115 ("inetutils" ,inetutils))) ; for `hostname', used in the tests
1116 (native-inputs `(("emacs" ,emacs-minimal))) ; for `ctags'
1117 (home-page "https://www.gnu.org/software/vc-dwim/")
1118 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
1119 (description
1120 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
1121 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
1122 using version control at the same time, for example by printing a reminder
1123 when a file change has been described in the ChangeLog but the file has not
1124 been added to the VC. vc-chlog scans changed files and generates
1125 standards-compliant ChangeLog entries based on the changes that it detects.")
1126 (license license:gpl3+)))
1127
1128 (define-public diffstat
1129 (package
1130 (name "diffstat")
1131 (version "1.61")
1132 (source (origin
1133 (method url-fetch)
1134 (uri
1135 (list
1136 (string-append "ftp://invisible-island.net/diffstat/"
1137 name "-" version ".tgz")
1138 (string-append "http://invisible-mirror.net/archives/diffstat/"
1139 name "-" version ".tgz")))
1140 (sha256
1141 (base32
1142 "1vjmda2zfjxg0qkaj8hfqa8g6bfwnn1ja8696rxrjgqq4w69wd95"))))
1143 (build-system gnu-build-system)
1144 (home-page "http://invisible-island.net/diffstat/")
1145 (synopsis "Make histograms from the output of @command{diff}")
1146 (description
1147 "Diffstat reads the output of @command{diff} and displays a histogram of
1148 the insertions, deletions, and modifications per file. It is useful for
1149 reviewing large, complex patch files.")
1150 (license (license:x11-style "file://COPYING"))))
1151
1152 (define-public cssc
1153 (package
1154 (name "cssc")
1155 (version "1.4.0")
1156 (source (origin
1157 (method url-fetch)
1158 (uri (string-append "mirror://gnu/" name "/CSSC-"
1159 version ".tar.gz"))
1160 (sha256
1161 (base32
1162 "15191dh8hr46cvssmv4v52gymiiyk6ca9j1bfimlqakcqab6y51h"))))
1163 (build-system gnu-build-system)
1164 (arguments
1165 `(#:phases
1166 (modify-phases %standard-phases
1167 (add-before 'check 'precheck
1168 (lambda _
1169 (begin
1170 (substitute* "tests/common/test-common"
1171 (("/bin/pwd") (which "pwd")))
1172
1173 (substitute* "tests/prt/all-512.sh"
1174 (("/bin/sh") (which "sh")))
1175
1176 ;; XXX: This test has no hope of passing until there is a "nogroup"
1177 ;; entry (or at least some group to which the guix builder does
1178 ;; not belong) in the /etc/group file of the build environment.
1179 ;; Currently we do not have such a group. Disable this test for now.
1180 (substitute* "tests/Makefile"
1181 (("test-delta ") ""))))))))
1182 ;; These are needed for the tests
1183 (native-inputs `(("git" ,git)
1184 ("cvs" ,cvs)))
1185 (home-page "https://www.gnu.org/software/cssc/")
1186 (synopsis "File-based version control like SCCS")
1187 (description "GNU CSSC provides a replacement for the legacy Unix source
1188 code control system SCCS. This allows old code still under that system to be
1189 accessed and migrated on modern systems.")
1190 (license license:gpl3+)))
1191
1192 ;; This package can unfortunately work only in -TEST mode, since Aegis
1193 ;; requires that it is installed setuid root.
1194 (define-public aegis
1195 (package
1196 (name "aegis")
1197 (version "4.24")
1198 (source (origin
1199 (method url-fetch)
1200 (uri (string-append "mirror://sourceforge/aegis/aegis/" version
1201 "/aegis-" version ".tar.gz"))
1202 (sha256
1203 (base32
1204 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
1205 (patches (search-patches "aegis-perl-tempdir1.patch"
1206 "aegis-perl-tempdir2.patch"
1207 "aegis-test-fixup-1.patch"
1208 "aegis-test-fixup-2.patch"
1209 "aegis-constness-error.patch"))))
1210 (build-system gnu-build-system)
1211 (inputs
1212 `(("e2fsprogs" ,e2fsprogs)
1213 ("curl" ,curl)
1214 ("file" ,file)
1215 ("libxml2" ,libxml2)
1216 ("zlib" ,zlib)
1217 ("gettext" ,gettext-minimal)))
1218 (native-inputs
1219 `(("bison" ,bison)
1220 ("groff" ,groff)
1221 ("perl" ,perl)
1222 ;; Various tests require the following:
1223 ("cvs" ,cvs)
1224 ("flex" ,flex)
1225 ("cook" ,cook)
1226 ("subversion" ,subversion)
1227 ("rcs" ,rcs)
1228 ("ed" ,ed)))
1229 (arguments
1230 `(#:configure-flags (list "--with-no-aegis-configured"
1231 "--sharedstatedir=/var/com/aegis")
1232 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
1233 #:phases
1234 (modify-phases %standard-phases
1235 (add-before 'configure 'pre-conf
1236 (lambda _
1237 (substitute* (append '("configure"
1238 "etc/check-tar-gz.sh"
1239 "etc/patches.sh"
1240 "etc/test.sh"
1241 "script/aexver.in"
1242 "script/aebisect.in"
1243 "script/aeintegratq.in"
1244 "script/tkaegis.in"
1245 "script/test_funcs.in"
1246 "web/eg_oss_templ.sh"
1247 "web/webiface.html"
1248 "libaegis/getpw_cache.cc")
1249 (find-files "test" "\\.sh"))
1250 (("/bin/sh") (which "sh")))
1251 (setenv "SH" (which "sh"))))
1252 (replace 'check
1253 (lambda _
1254 (let ((home (string-append (getcwd) "/my-new-home")))
1255 ;; Some tests need to write to $HOME.
1256 (mkdir home)
1257 (setenv "HOME" home)
1258
1259 ;; This test assumes that flex has been symlinked to "lex".
1260 (substitute* "test/00/t0011a.sh"
1261 (("type lex") "type flex"))
1262
1263 ;; The author decided to call the check rule "sure".
1264 (zero? (system* "make" "sure"))))))))
1265 (home-page "http://aegis.sourceforge.net")
1266 (synopsis "Project change supervisor")
1267 (description "Aegis is a project change supervisor, and performs some of
1268 the Software Configuration Management needed in a CASE environment. Aegis
1269 provides a framework within which a team of developers may work on many
1270 changes to a program independently, and Aegis coordinates integrating these
1271 changes back into the master source of the program, with as little disruption
1272 as possible. Resolution of contention for source files, a major headache for
1273 any project with more than one developer, is one of Aegis's major functions.")
1274 (license license:gpl3+)))
1275
1276 (define-public reposurgeon
1277 (package
1278 (name "reposurgeon")
1279 (version "3.37")
1280 (source (origin
1281 (method url-fetch)
1282 (uri (string-append "http://www.catb.org/~esr/" name "/"
1283 name "-" version ".tar.xz"))
1284 (sha256
1285 (base32
1286 "14asjg4xy3mhh5z0r3k7c1wv9y803j2zfq32g5q5m95sf7yzygan"))))
1287 (build-system gnu-build-system)
1288 (arguments
1289 `(#:tests? #f ;no test suite distributed
1290 #:make-flags
1291 (list (string-append "target=" (assoc-ref %outputs "out")))
1292 #:phases
1293 (modify-phases %standard-phases
1294 (delete 'configure)
1295 (add-before 'build 'fix-docbook
1296 (lambda* (#:key inputs #:allow-other-keys)
1297 (substitute* (find-files "." "\\.xml$")
1298 (("docbook/docbookx.dtd")
1299 (string-append (assoc-ref inputs "docbook-xml")
1300 "/xml/dtd/docbook/docbookx.dtd")))
1301 #t))
1302 (add-after 'install 'install-emacs-data
1303 (lambda* (#:key outputs #:allow-other-keys)
1304 (install-file "reposurgeon-mode.el"
1305 (string-append (assoc-ref outputs "out")
1306 "/share/emacs/site-lisp")))))))
1307 (inputs
1308 `(("python" ,python-wrapper)))
1309 (native-inputs
1310 `(("asciidoc" ,asciidoc)
1311 ("docbook-xml" ,docbook-xml-4.1.2)
1312 ("docbook-xsl" ,docbook-xsl)
1313 ("libxml2" ,libxml2)
1314 ("xmlto" ,xmlto)))
1315 (home-page "http://www.catb.org/~esr/reposurgeon/")
1316 (synopsis "Edit version-control repository history")
1317 (description "Reposurgeon enables risky operations that version-control
1318 systems don't want to let you do, such as editing past comments and metadata
1319 and removing commits. It works with any version control system that can
1320 export and import Git fast-import streams, including Git, Mercurial, Fossil,
1321 Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly
1322 and can thus be used to script production of very high-quality conversions
1323 from Subversion to any supported Distributed Version Control System (DVCS).")
1324 ;; Most files are distributed under bsd-2, except 'repocutter' which is
1325 ;; under bsd-3.
1326 (license (list license:bsd-2 license:bsd-3))))
1327
1328 (define-public tig
1329 (package
1330 (name "tig")
1331 (version "2.2")
1332 (source (origin
1333 (method url-fetch)
1334 (uri (string-append
1335 "http://jonas.nitro.dk/tig/releases/tig-"
1336 version ".tar.gz"))
1337 (sha256
1338 (base32
1339 "0k3m894vfkgkj7xbr0j6ph91351dl6id5f0hk2ksjp5lmg9i6llg"))))
1340 (build-system gnu-build-system)
1341 (native-inputs
1342 `(("asciidoc" ,asciidoc)
1343 ("xmlto" ,xmlto)))
1344 (inputs
1345 `(("ncurses" ,ncurses)
1346 ("readline" ,readline)))
1347 (arguments
1348 `(#:phases
1349 (modify-phases %standard-phases
1350 (add-after 'install 'install-doc
1351 (lambda _
1352 (zero? (system* "make" "install-doc")))))
1353 #:tests? #f)) ; tests require access to /dev/tty
1354 ;;`(#:test-target "test"))
1355 (home-page "http://jonas.nitro.dk/tig/")
1356 (synopsis "Ncurses-based text user interface for Git")
1357 (description
1358 "Tig is an ncurses text user interface for Git, primarily intended as
1359 a history browser. It can also stage hunks for commit, or colorize the
1360 output of the 'git' command.")
1361 (license license:gpl2+)))
1362
1363 (define-public findnewest
1364 (package
1365 (name "findnewest")
1366 (version "0.3")
1367 (source (origin
1368 (method url-fetch)
1369 (uri (string-append
1370 "https://github.com/0-wiz-0/findnewest/archive/findnewest-"
1371 version ".tar.gz"))
1372 (sha256
1373 (base32
1374 "1ydis4y0amkgfr4y60sn076f1l41ya2kn89kfd9fqf44f9ccgb5r"))))
1375 (build-system gnu-build-system)
1376 (arguments
1377 '(#:phases (modify-phases %standard-phases
1378 (add-after 'unpack 'bootstrap
1379 (lambda _
1380 (zero? (system* "autoreconf" "-vfi")))))))
1381 (native-inputs `(("autoconf" ,autoconf)
1382 ("automake" ,automake)))
1383 (home-page "https://github.com/0-wiz-0/findnewest/releases")
1384 (synopsis "Print the modification time of the latest file")
1385 (description
1386 "Recursively find the newest file in a file tree and print its
1387 modification time.")
1388 (license license:bsd-2)))
1389
1390 (define-public myrepos
1391 (package
1392 (name "myrepos")
1393 (version "1.20170129")
1394 (source
1395 (origin
1396 (method git-fetch)
1397 (uri (git-reference
1398 (url "git://myrepos.branchable.com/myrepos")
1399 (commit version)))
1400 (file-name (string-append name "-" version "-checkout"))
1401 (sha256
1402 (base32 "15i9bs2i25l7ibv530ghy8280kklcgm5kr6j86s7iwcqqckd0czp"))))
1403 (build-system gnu-build-system)
1404 (inputs
1405 `(("perl" ,perl)))
1406 (arguments
1407 '(#:test-target "test"
1408 #:phases (modify-phases %standard-phases (delete 'configure))
1409 #:make-flags (list (string-append "PREFIX=" %output))))
1410 (home-page "https://myrepos.branchable.com/")
1411 (synopsis "Multiple repository management tool")
1412 (description
1413 "Myrepos provides the @code{mr} command, which maps an operation (e.g.,
1414 fetching updates) over a collection of version control repositories. It
1415 supports a large number of version control systems: Git, Subversion,
1416 Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
1417 (license license:gpl2+)))
1418
1419 (define-public git-annex-remote-hubic
1420 (package
1421 (name "git-annex-remote-hubic")
1422 (version "0.3.1")
1423 (source (origin
1424 (method url-fetch)
1425 (uri (string-append
1426 "https://github.com/Schnouki/" name "/archive/v"
1427 version ".tar.gz"))
1428 (file-name (string-append name "-" version ".tar.gz"))
1429 (sha256
1430 (base32
1431 "196g3jkaybjx11nbr51n0cjps3wjzb145ab76y717diqvvxp5v4r"))))
1432 (build-system python-build-system)
1433 (arguments `(#:python ,python-2))
1434 (native-inputs
1435 `(;; for the tests
1436 ("python2-six" ,python2-six)))
1437 (propagated-inputs
1438 `(("python2-dateutil" ,python2-dateutil)
1439 ("python2-futures" ,python2-futures)
1440 ("python2-rauth" ,python2-rauth)
1441 ("python2-swiftclient" ,python2-swiftclient)))
1442 (home-page "https://github.com/Schnouki/git-annex-remote-hubic/")
1443 (synopsis "Use hubic as a git-annex remote")
1444 (description
1445 "This package allows you to use your hubic account as a \"special
1446 repository\" with git-annex.")
1447 (license license:gpl3+)))
1448
1449 (define-public fossil
1450 (package
1451 (name "fossil")
1452 (version "2.2")
1453 (source
1454 (origin
1455 (method url-fetch)
1456 ;; Older downloads are moved to another URL.
1457 (uri (list
1458 (string-append
1459 "https://www.fossil-scm.org/index.html/uv/download/"
1460 "fossil-src-" version ".tar.gz")
1461 (string-append
1462 "https://www.fossil-scm.org/index.html/uv/"
1463 "fossil-src-" version ".tar.gz")))
1464 (sha256
1465 (base32
1466 "0wfgacfg29dkl0c3l1rp5ji0kraa64gcbg5lh8p4m7mqdqcq53wv"))))
1467 (build-system gnu-build-system)
1468 (native-inputs
1469 `(("tcl" ,tcl) ;for configuration only
1470 ("which" ,which) ;for tests only
1471 ("ed" ,ed))) ;ditto
1472 (inputs
1473 `(("openssl" ,openssl)
1474 ("zlib" ,zlib)
1475 ("sqlite" ,sqlite)))
1476 (arguments
1477 `(#:configure-flags (list "--with-openssl=auto"
1478 "--disable-internal-sqlite")
1479 #:test-target "test"
1480 #:phases (modify-phases %standard-phases
1481 (replace 'configure
1482 (lambda* (#:key outputs (configure-flags '())
1483 #:allow-other-keys)
1484 ;; The 'configure' script is not an autoconf script and
1485 ;; chokes on unrecognized options.
1486 (zero? (apply system*
1487 "./configure"
1488 (string-append "--prefix="
1489 (assoc-ref outputs "out"))
1490 configure-flags))))
1491 (add-before 'check 'test-setup
1492 (lambda _
1493 (setenv "USER" "guix")
1494 (setenv "TZ" "UTC")
1495 #t)))))
1496 (home-page "https://fossil-scm.org")
1497 (synopsis "Software configuration management system")
1498 (description
1499 "Fossil is a distributed source control management system which supports
1500 access and administration over HTTP CGI or via a built-in HTTP server. It has
1501 a built-in wiki, built-in file browsing, built-in tickets system, etc.")
1502 (license (list license:public-domain ;src/miniz.c, src/shell.c
1503 license:bsd-2))))
1504
1505 (define-public stagit
1506 (package
1507 (name "stagit")
1508 (version "0.5")
1509 (source (origin
1510 (method url-fetch)
1511 (uri (string-append "https://dl.2f30.org/releases/"
1512 name "-" version ".tar.gz"))
1513 (sha256
1514 (base32
1515 "0ym1dwzn2z23hcg53qh1m1g5pfibrfnnlp3sm3z1v4mhz0pgaj56"))))
1516 (build-system gnu-build-system)
1517 (arguments
1518 `(#:tests? #f ; No tests
1519 #:make-flags (list "CC=gcc"
1520 (string-append "PREFIX=" %output))
1521 #:phases
1522 (modify-phases %standard-phases
1523 (delete 'configure)))) ; No configure script
1524 (inputs
1525 `(("libgit2" ,libgit2)))
1526 (home-page "https://2f30.org/")
1527 (synopsis "Static git page generator")
1528 (description "Stagit creates static pages for git repositories, the results can
1529 be served with a HTTP file server of your choice.")
1530 (license license:expat)))
1531
1532 ;; Darcs has no https support: http://irclog.perlgeek.de/darcs/2016-09-17
1533 ;; http://darcs.net/manual/Configuring_darcs.html#SECTION00440070000000000000
1534 ;; and results of search engines will show that if the protocol is http, https
1535 ;; is never mentioned.
1536 (define-public darcs
1537 (package
1538 (name "darcs")
1539 (version "2.12.4")
1540 (source
1541 (origin
1542 (method url-fetch)
1543 (uri (string-append "https://hackage.haskell.org/package/darcs/"
1544 "darcs-" version ".tar.gz"))
1545 (sha256
1546 (base32
1547 "0jfwiwl5k8wspciq1kpmvh5yap4japrf97s9pvhcybxxhaj3ds28"))
1548 (modules '((guix build utils)))
1549 ;; Remove time-dependent code for reproducibility.
1550 (snippet
1551 '(begin
1552 (substitute* "darcs/darcs.hs"
1553 (("__DATE__") "\"1970-01-01\"")
1554 (("__TIME__") "\"00:00:00\""))
1555 (substitute* "src/impossible.h"
1556 (("__DATE__") "\"\"")
1557 (("__TIME__") "\"\""))))))
1558 (build-system haskell-build-system)
1559 (arguments
1560 `(#:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
1561 "-fnetwork-uri" "-fhttp" "--flag=executable"
1562 "--flag=library")
1563 #:tests? #f)) ; 20 failing shell tests out of over 400
1564 (inputs
1565 `(("ghc-cmdargs" ,ghc-cmdargs)
1566 ("ghc-split" ,ghc-split)
1567 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
1568 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
1569 ("ghc-test-framework" ,ghc-test-framework)
1570 ("ghc-quickcheck" ,ghc-quickcheck)
1571 ("ghc-findbin" ,ghc-findbin)
1572 ("ghc-hunit" ,ghc-hunit)
1573 ("ghc-array" ,ghc-array)
1574 ("ghc-async" ,ghc-async)
1575 ("ghc-attoparsec" ,ghc-attoparsec)
1576 ("ghc-base16-bytestring" ,ghc-base16-bytestring)
1577 ("ghc-binary" ,ghc-binary)
1578 ("ghc-bytestring-builder" ,ghc-bytestring-builder)
1579 ("ghc-cryptohash" ,ghc-cryptohash)
1580 ("ghc-data-ordlist" ,ghc-data-ordlist)
1581 ("ghc-directory" ,ghc-directory)
1582 ("ghc-fgl" ,ghc-fgl)
1583 ("ghc-system-filepath" ,ghc-system-filepath)
1584 ("ghc-graphviz" ,ghc-graphviz)
1585 ("ghc-hashable" ,ghc-hashable)
1586 ("ghc-haskeline" ,ghc-haskeline)
1587 ("ghc-html" ,ghc-html)
1588 ("ghc-mmap" ,ghc-mmap)
1589 ("ghc-mtl" ,ghc-mtl)
1590 ("ghc-old-time" ,ghc-old-time)
1591 ("ghc-parsec" ,ghc-parsec)
1592 ("ghc-process" ,ghc-process)
1593 ("ghc-random" ,ghc-random)
1594 ("ghc-regex-applicative" ,ghc-regex-applicative)
1595 ("ghc-regex-compat-tdfa" ,ghc-regex-compat-tdfa)
1596 ("ghc-sandi" ,ghc-sandi)
1597 ("ghc-shelly" ,ghc-shelly)
1598 ("ghc-tar" ,ghc-tar)
1599 ("ghc-transformers-compat" ,ghc-transformers-compat)
1600 ("ghc-unix-compat" ,ghc-unix-compat)
1601 ("ghc-utf8-string" ,ghc-utf8-string)
1602 ("ghc-vector" ,ghc-vector)
1603 ("ghc-zip-archive" ,ghc-zip-archive)
1604 ("ghc-zlib" ,ghc-zlib)
1605 ("ghc-http" ,ghc-http)
1606 ("curl" ,curl)
1607 ("ghc" ,ghc)
1608 ("ncurses" ,ncurses)
1609 ("perl" ,perl)
1610 ("libiconv" ,libiconv)
1611 ("ghc-network" ,ghc-network)
1612 ("ghc-network-uri" ,ghc-network-uri)))
1613 (native-inputs
1614 `(("pkg-config" ,pkg-config)))
1615 (home-page "http://darcs.net")
1616 (synopsis "Distributed Revision Control System")
1617 (description
1618 "Darcs is a revision control system. It is:
1619
1620 @enumerate
1621 @item Distributed: Every user has access to the full command set, removing boundaries
1622 between server and client or committer and non-committers.
1623 @item Interactive: Darcs is easy to learn and efficient to use because it asks you
1624 questions in response to simple commands, giving you choices in your work flow.
1625 You can choose to record one change in a file, while ignoring another. As you update
1626 from upstream, you can review each patch name, even the full diff for interesting
1627 patches.
1628 @item Smart: Originally developed by physicist David Roundy, darcs is based on a
1629 unique algebra of patches called @url{http://darcs.net/Theory,Patchtheory}.
1630 @end enumerate")
1631 (license license:gpl2)))
1632
1633 (define-public java-jgit
1634 (package
1635 (name "java-jgit")
1636 (version "4.7.0.201704051617-r")
1637 (source (origin
1638 (method url-fetch)
1639 (uri (string-append "https://repo1.maven.org/maven2/"
1640 "org/eclipse/jgit/org.eclipse.jgit/"
1641 version "/org.eclipse.jgit-"
1642 version "-sources.jar"))
1643 (sha256
1644 (base32
1645 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
1646 (build-system ant-build-system)
1647 (arguments
1648 `(#:tests? #f ; There are no tests to run.
1649 #:jar-name "jgit.jar"
1650 ;; JGit must be built with a JDK supporting Java 8.
1651 #:jdk ,icedtea-8
1652 ;; Target our older default JDK.
1653 #:make-flags (list "-Dtarget=1.7")))
1654 (inputs
1655 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
1656 ("java-javaewah" ,java-javaewah)
1657 ("java-jsch" ,java-jsch)
1658 ("java-slf4j-api" ,java-slf4j-api)))
1659 (home-page "https://eclipse.org/jgit/")
1660 (synopsis "Java library implementing the Git version control system")
1661 (description "JGit is a lightweight, pure Java library implementing the
1662 Git version control system, providing repository access routines, support for
1663 network protocols, and core version control algorithms.")
1664 (license license:edl1.0)))
1665
1666 ;; For axoloti. This package can still be built with icedtea-7, which is
1667 ;; currently used as the default JDK.
1668 (define-public java-jgit-4.2
1669 (package (inherit java-jgit)
1670 (version "4.2.0.201601211800-r")
1671 (source (origin
1672 (method url-fetch)
1673 (uri (string-append "https://repo1.maven.org/maven2/"
1674 "org/eclipse/jgit/org.eclipse.jgit/"
1675 version "/org.eclipse.jgit-"
1676 version "-sources.jar"))
1677 (sha256
1678 (base32
1679 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
1680 (build-system ant-build-system)
1681 (arguments
1682 `(#:phases
1683 (modify-phases %standard-phases
1684 (add-after 'unpack 'use-latest-javaewah-API
1685 (lambda _
1686 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
1687 (("wordinbits") "WORD_IN_BITS"))
1688 #t)))
1689 ;; Build for default JDK.
1690 ,@(substitute-keyword-arguments (package-arguments java-jgit)
1691 ((#:jdk _) icedtea-7))))
1692 (inputs
1693 `(("java-javaewah" ,java-javaewah)
1694 ("java-jsch" ,java-jsch)
1695 ("java-slf4j-api" ,java-slf4j-api)))))