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>
22 ;;; This file is part of GNU Guix.
24 ;;; GNU Guix is free software; you can redistribute it and/or modify it
25 ;;; under the terms of the GNU General Public License as published by
26 ;;; the Free Software Foundation; either version 3 of the License, or (at
27 ;;; your option) any later version.
29 ;;; GNU Guix is distributed in the hope that it will be useful, but
30 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
31 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 ;;; GNU General Public License for more details.
34 ;;; You should have received a copy of the GNU General Public License
35 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37 (define-module (gnu packages version-control)
38 #:use-module ((guix licenses) #:prefix license:)
39 #:use-module (guix utils)
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix git-download)
43 #:use-module (guix build-system ant)
44 #:use-module (guix build-system cmake)
45 #:use-module (guix build-system gnu)
46 #:use-module (guix build-system haskell)
47 #:use-module (guix build-system python)
48 #:use-module (guix build-system trivial)
49 #:use-module (gnu packages apr)
50 #:use-module (gnu packages autotools)
51 #:use-module (gnu packages documentation)
52 #:use-module (gnu packages base)
53 #:use-module (gnu packages bison)
54 #:use-module (gnu packages boost)
55 #:use-module (gnu packages check)
56 #:use-module (gnu packages cook)
57 #:use-module (gnu packages curl)
58 #:use-module (gnu packages docbook)
59 #:use-module (gnu packages ed)
60 #:use-module (gnu packages file)
61 #:use-module (gnu packages flex)
62 #:use-module (gnu packages gettext)
63 #:use-module (gnu packages gl)
64 #:use-module (gnu packages groff)
65 #:use-module (gnu packages haskell)
66 #:use-module (gnu packages haskell-check)
67 #:use-module (gnu packages haskell-crypto)
68 #:use-module (gnu packages haskell-web)
69 #:use-module (gnu packages image)
70 #:use-module (gnu packages java)
71 #:use-module (gnu packages linux)
72 #:use-module (gnu packages maths)
73 #:use-module (gnu packages nano)
74 #:use-module (gnu packages ncurses)
75 #:use-module (gnu packages ssh)
76 #:use-module (gnu packages web)
77 #:use-module (gnu packages openstack)
78 #:use-module (gnu packages pcre)
79 #:use-module (gnu packages perl)
80 #:use-module (gnu packages perl-check)
81 #:use-module (gnu packages pkg-config)
82 #:use-module (gnu packages python)
83 #:use-module (gnu packages python-web)
84 #:use-module (gnu packages readline)
85 #:use-module (gnu packages databases)
86 #:use-module (gnu packages admin)
87 #:use-module (gnu packages xml)
88 #:use-module (gnu packages emacs)
89 #:use-module (gnu packages compression)
90 #:use-module (gnu packages sdl)
91 #:use-module (gnu packages swig)
92 #:use-module (gnu packages tcl)
93 #:use-module (gnu packages time)
94 #:use-module (gnu packages tls)
95 #:use-module (gnu packages)
96 #:use-module (ice-9 match)
97 #:use-module (srfi srfi-1))
106 (uri (string-append "https://launchpad.net/bzr/"
107 (version-major+minor version) "/" version
108 "/+download/bzr-" version ".tar.gz"))
109 (patches (search-patches "bazaar-CVE-2017-14176.patch"))
112 "1cysix5k3wa6y7jjck3ckq3abls4gvz570s0v0hxv805nwki4i8d"))))
113 (build-system python-build-system)
115 ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh'
117 `(("gettext" ,gettext-minimal)))
119 `(#:tests? #f ; no test target
120 #:python ,python-2 ; Python 3 apparently not yet supported, see
121 ; https://answers.launchpad.net/bzr/+question/229048
123 (modify-phases %standard-phases
124 (add-after 'unpack 'fix-mandir
126 (substitute* "setup.py"
127 (("man/man1") "share/man/man1"))
129 (home-page "https://gnu.org/software/bazaar")
130 (synopsis "Version control system supporting both distributed and centralized workflows")
132 "GNU Bazaar is a version control system that allows you to record
133 changes to project files over time. It supports both a distributed workflow
134 as well as the classic centralized workflow.")
135 (license license:gpl2+)))
140 ;; XXX When updating Git, check if the special 'git:src' input to cgit needs
141 ;; to be updated as well.
145 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
149 "05y7480f2p7fkncbhf08zz56jbykcp0ia5gl6y3djs0lsa5mfq2m"))))
150 (build-system gnu-build-system)
152 `(("native-perl" ,perl)
153 ("gettext" ,gettext-minimal)
158 "mirror://kernel.org/software/scm/git/git-manpages-"
162 "01fbmfsqcv7jmyh80yg3fv5jwv78zvxys9b0fd6bdcy89h9ybvj2"))))))
168 ("python" ,python-2) ; CAVEAT: incompatible with python-3 according to INSTALL
172 ("perl-cgi" ,perl-cgi)
175 ("subversion" ,subversion)
176 ("perl-term-readkey" ,perl-term-readkey)
178 ;; For 'git-send-email'
179 ("perl-authen-sasl" ,perl-authen-sasl)
180 ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
181 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
183 ;; For 'git gui', 'gitk', and 'git citool'.
186 (outputs '("out" ; the core
187 "send-email" ; for git-send-email
189 "gui")) ; gitk, git gui
191 `(#:make-flags `("V=1" ;more verbose compilation
193 ;; By default 'make install' creates hard links for
194 ;; things in 'libexec/git-core', which leads to huge
195 ;; nars; see <https://bugs.gnu.org/21949>.
196 "NO_INSTALL_HARDLINKS=indeed")
199 ;; Tests fail randomly when parallel: <https://bugs.gnu.org/29512>.
202 ;; The explicit --with-tcltk forces the build system to hardcode the
203 ;; absolute file name to 'wish'.
204 #:configure-flags (list (string-append "--with-tcltk="
205 (assoc-ref %build-inputs "tk")
206 "/bin/wish8.6")) ; XXX
208 #:modules ((srfi srfi-1)
209 ,@%gnu-build-system-modules)
211 (modify-phases %standard-phases
212 (add-after 'configure 'patch-makefiles
214 (substitute* "Makefile"
215 (("/bin/sh") (which "sh"))
216 (("/usr/bin/perl") (which "perl"))
217 (("/usr/bin/python") (which "python")))
218 (substitute* "perl/Makefile"
219 ;; Don't create timestamped 'perllocal.pod'.
220 (("\\$< PREFIX=") "$< NO_PERLLOCAL=1 PREFIX="))
222 (add-after 'configure 'add-PM.stamp
224 ;; Add the "PM.stamp" to avoid "no rule to make target".
225 (call-with-output-file "perl/PM.stamp" (const #t))
227 (add-before 'check 'patch-tests
229 ;; These files contain some funny bytes that Guile is unable
230 ;; to decode for shebang patching. Just delete them.
231 (for-each delete-file '("t/t4201-shortlog.sh"
232 "t/t7813-grep-icase-iso.sh"))
233 ;; Many tests contain inline shell scripts (hooks etc).
234 (substitute* (find-files "t" "\\.sh$")
235 (("#!/bin/sh") (string-append "#!" (which "sh"))))
236 ;; Un-do shebang patching here to prevent checksum mismatch.
237 (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
238 (("^#!.*/bin/perl") "#!/usr/bin/perl"))
239 (substitute* "t/t5003-archive-zip.sh"
240 (("cp /bin/sh") (string-append "cp " (which "sh"))))
241 (substitute* "t/t6030-bisect-porcelain.sh"
242 (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
243 ;; FIXME: This test runs `git commit` with a bogus EDITOR
244 ;; and empty commit message, but does not fail the way it's
245 ;; expected to. The test passes when invoked interactively.
246 (substitute* "t/t7508-status.sh"
247 (("\tcommit_template_commented") "\ttrue"))
248 ;; More checksum mismatches due to odd shebangs.
249 (substitute* "t/t9100-git-svn-basic.sh"
250 (("\"#!/gnu.*/bin/sh") "\"#!/bin/sh"))
251 (substitute* "t/t9300-fast-import.sh"
252 (("\t#!/gnu.*/bin/sh") "\t#!/bin/sh")
253 (("'#!/gnu.*/bin/sh") "'#!/bin/sh"))
254 ;; FIXME: Some hooks fail with "basename: command not found".
255 ;; See 't/trash directory.t9164.../svn-hook.log'.
256 (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
258 ;; XXX: These tests fail intermittently for unknown reasons:
259 ;; <https://bugs.gnu.org/29546>.
260 (for-each delete-file
261 '("t/t9128-git-svn-cmd-branch.sh"
262 "t/t9167-git-svn-cmd-branch-subproject.sh"
263 "t/t9141-git-svn-multiple-branches.sh"))
265 (add-after 'install 'install-shell-completion
266 (lambda* (#:key outputs #:allow-other-keys)
267 (let* ((out (assoc-ref outputs "out"))
268 (completions (string-append out "/etc/bash_completion.d")))
269 ;; TODO: Install the tcsh and zsh completions in the right place.
270 (mkdir-p completions)
271 (copy-file "contrib/completion/git-completion.bash"
272 (string-append completions "/git"))
274 (add-after 'install 'split
275 (lambda* (#:key inputs outputs #:allow-other-keys)
276 ;; Split the binaries to the various outputs.
277 (let* ((out (assoc-ref outputs "out"))
278 (se (assoc-ref outputs "send-email"))
279 (svn (assoc-ref outputs "svn"))
280 (gui (assoc-ref outputs "gui"))
281 (gitk (string-append out "/bin/gitk"))
282 (gitk* (string-append gui "/bin/gitk"))
283 (git-gui (string-append out "/libexec/git-core/git-gui"))
284 (git-gui* (string-append gui "/libexec/git-core/git-gui"))
285 (git-cit (string-append out "/libexec/git-core/git-citool"))
286 (git-cit* (string-append gui "/libexec/git-core/git-citool"))
287 (git-se (string-append out "/libexec/git-core/git-send-email"))
288 (git-se* (string-append se "/libexec/git-core/git-send-email"))
289 (git-svn (string-append out "/libexec/git-core/git-svn"))
290 (git-svn* (string-append svn "/libexec/git-core/git-svn"))
291 (git-sm (string-append out
292 "/libexec/git-core/git-submodule")))
293 (mkdir-p (string-append gui "/bin"))
294 (mkdir-p (string-append gui "/libexec/git-core"))
295 (mkdir-p (string-append se "/libexec/git-core"))
296 (mkdir-p (string-append svn "/libexec/git-core"))
298 (for-each (lambda (old new)
302 (list gitk git-gui git-cit git-se git-svn)
303 (list gitk* git-gui* git-cit* git-se* git-svn*))
305 ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
306 (wrap-program git-svn*
308 (,(string-append (assoc-ref inputs "subversion")
310 `("PERL5LIB" ":" prefix
311 ,(map (lambda (i) (string-append (assoc-ref inputs i)
312 "/lib/perl5/site_perl"))
313 '("subversion" "perl-term-readkey")))
315 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
316 ;; help it find 'libsvn_client-1.so'.
317 `("LD_LIBRARY_PATH" ":" prefix
318 (,(string-append (assoc-ref inputs "subversion")
321 ;; Tell 'git-send-email' where perl modules are.
322 (wrap-program git-se*
323 `("PERL5LIB" ":" prefix
324 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
326 ,@(transitive-input-references
332 "perl-io-socket-ssl")))))))
334 ;; Tell 'gitweb.cgi' where perl modules are.
335 (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
336 `("PERL5LIB" ":" prefix
337 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
339 ,@(transitive-input-references
345 ;; Tell 'git-submodule' where Perl is.
348 (,(string-append (assoc-ref inputs "perl")
352 (add-after 'split 'install-man-pages
353 (lambda* (#:key inputs outputs #:allow-other-keys)
354 (let* ((out (assoc-ref outputs "out"))
355 (man (string-append out "/share/man"))
356 (manpages (assoc-ref inputs "git-manpages")))
358 (with-directory-excursion man
359 (invoke "tar" "xvf" manpages))))))))
362 ;; For HTTPS access, Git needs a single-file certificate bundle, specified
363 ;; with $GIT_SSL_CAINFO.
364 (list (search-path-specification
365 (variable "GIT_SSL_CAINFO")
367 (separator #f) ;single entry
368 (files '("etc/ssl/certs/ca-certificates.crt")))
369 (search-path-specification
370 (variable "GIT_EXEC_PATH")
371 (separator #f) ;single entry
372 (files '("libexec/git-core")))))
374 (synopsis "Distributed version control system")
376 "Git is a free distributed version control system designed to handle
377 everything from small to very large projects with speed and efficiency.")
378 (license license:gpl2)
379 (home-page "https://git-scm.com/")))
381 (define-public libgit2
387 (uri (string-append "https://github.com/libgit2/libgit2/"
388 "archive/v" version ".tar.gz"))
389 (file-name (string-append name "-" version ".tar.gz"))
392 "1b3figbhp5l83vd37vq6j2narrq4yl9pfw6mw0px0dzb1hz3jqka"))
393 (patches (search-patches "libgit2-0.25.1-mtime-0.patch"))
395 ;; Remove bundled software.
397 (delete-file-recursively "deps")
399 (modules '((guix build utils)))))
400 (build-system cmake-build-system)
401 (outputs '("out" "debug"))
403 `(#:configure-flags '("-DUSE_SHA1DC=ON") ; SHA-1 collision detection
405 (modify-phases %standard-phases
406 (add-after 'unpack 'fix-hardcoded-paths
408 (substitute* "tests/repo/init.c"
409 (("#!/bin/sh") (string-append "#!" (which "sh"))))
410 (substitute* "tests/clar/fs.h"
411 (("/bin/cp") (which "cp"))
412 (("/bin/rm") (which "rm")))
414 ;; Run checks more verbosely.
416 (lambda _ (zero? (system* "./libgit2_clar" "-v" "-Q")))))))
418 `(("libssh2" ,libssh2)
419 ("http-parser" ,http-parser)
420 ("python" ,python-wrapper)))
422 `(("pkg-config" ,pkg-config)))
424 ;; These two libraries are in 'Requires.private' in libgit2.pc.
425 `(("openssl" ,openssl)
427 (home-page "https://libgit2.github.com/")
428 (synopsis "Library providing Git core methods")
430 "Libgit2 is a portable, pure C implementation of the Git core methods
431 provided as a re-entrant linkable library with a solid API, allowing you to
432 write native speed custom Git applications in any language with bindings.")
433 ;; GPLv2 with linking exception
434 (license license:gpl2)))
436 (define-public git-crypt
442 (uri (string-append "https://github.com/AGWA/git-crypt"
443 "/archive/" version ".tar.gz"))
444 (file-name (string-append name "-" version ".tar.gz"))
447 "0454fdmgm5f3razkn8n03lfqm5zyzvr4r2528zmlxiwba9518l2i"))))
448 (build-system gnu-build-system)
451 ("openssl" ,openssl)))
453 `(#:tests? #f ; No tests.
455 (modify-phases %standard-phases
459 (zero? (system* "make"))))
461 (lambda* (#:key outputs #:allow-other-keys)
462 (let ((out (assoc-ref outputs "out")))
463 (zero? (system* "make" "install"
464 (string-append "PREFIX=" out)))))))))
465 (home-page "https://www.agwa.name/projects/git-crypt")
466 (synopsis "Transparent encryption of files in a git repository")
467 (description "git-crypt enables transparent encryption and decryption of
468 files in a git repository. Files which you choose to protect are encrypted when
469 committed, and decrypted when checked out. git-crypt lets you freely share a
470 repository containing a mix of public and private content. git-crypt gracefully
471 degrades, so developers without the secret key can still clone and commit to a
472 repository with encrypted files. This lets you store your secret material (such
473 as keys or passwords) in the same repository as your code, without requiring you
474 to lock down your entire repository.")
475 (license license:gpl3+)))
477 (define-public git-remote-gcrypt
479 (name "git-remote-gcrypt")
484 (url "https://git.spwhitton.name/git-remote-gcrypt")
486 (file-name (string-append name "-" version "-checkout"))
489 "1vay3204729c7wajgn3nxf0s0hzwpdrw14pl6kd8w2ss25gvw2k1"))))
490 (build-system trivial-build-system)
492 `(#:modules ((guix build utils))
494 (use-modules (guix build utils))
495 (let* ((source (assoc-ref %build-inputs "source"))
496 (output (assoc-ref %outputs "out"))
497 (bindir (string-append output "/bin")))
498 (install-file (string-append source "/git-remote-gcrypt")
501 (home-page "https://spwhitton.name/tech/code/git-remote-gcrypt/")
502 (synopsis "Whole remote repository encryption")
503 (description "git-remote-gcrypt is a Git remote helper to push and pull from
504 repositories encrypted with GnuPG. It works with the standard Git transports,
505 including repository hosting services like GitLab.
507 Remote helper programs are invoked by Git to handle network transport. This
508 helper handles @code{gcrypt:} URLs that access a remote repository encrypted
509 with GPG, using our custom format.
511 Supported locations are local, @code{rsync://} and @code{sftp://}, where the
512 repository is stored as a set of files, or instead any Git URL where gcrypt
513 will store the same representation in a Git repository, bridged over arbitrary
516 The aim is to provide confidential, authenticated Git storage and
517 collaboration using typical untrusted file hosts or services.")
518 (license license:gpl3+)))
523 ;; XXX When updating cgit, try removing the special 'git:src' input and
524 ;; using the source of the git package.
529 "https://git.zx2c4.com/cgit/snapshot/cgit-"
533 "142qcgs8dwnzhymn0a7xx47p9fc2z5wrb86ah4a9iz0mpqlsz288"))))
534 (build-system gnu-build-system)
536 '(#:tests? #f ; XXX: fail to build the in-source git.
538 #:make-flags '("CC=gcc" "SHELL_PATH=sh")
540 (modify-phases %standard-phases
541 (add-after 'unpack 'unpack-git
542 (lambda* (#:key inputs #:allow-other-keys)
543 ;; Unpack the source of git into the 'git' directory.
545 "tar" "--strip-components=1" "-C" "git" "-xf"
546 (assoc-ref inputs "git:src")))))
547 (add-after 'unpack 'patch-absolute-file-names
548 (lambda* (#:key inputs #:allow-other-keys)
549 (define (quoted-file-name input path)
550 (string-append "\"" input path "\""))
551 (substitute* "ui-snapshot.c"
553 (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
555 (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
557 (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
559 (delete 'configure) ; no configure script
560 (add-after 'build 'build-man
561 (lambda* (#:key make-flags #:allow-other-keys)
562 (zero? (apply system* `("make" ,@make-flags "doc-man")))))
564 (lambda* (#:key make-flags outputs #:allow-other-keys)
565 (let ((out (assoc-ref outputs "out")))
566 (and (zero? (apply system*
567 `("make" ,@make-flags
568 ,(string-append "prefix=" out)
570 "CGIT_SCRIPT_PATH=" out "/share/cgit")
571 "install" "install-man")))
572 ;; Move the platform-dependent 'cgit.cgi' into lib
573 ;; to get it stripped.
574 (rename-file (string-append out "/share/cgit/cgit.cgi")
575 (string-append out "/lib/cgit/cgit.cgi"))
578 ;; For building manpage.
579 `(("asciidoc" ,asciidoc)
584 `(;; Cgit directly accesses some internal Git interfaces that changed in
585 ;; Git 2.12. Try removing this special input and using the source of the
586 ;; Git package for cgit > 1.1.
590 (uri "mirror://kernel.org/software/scm/git/git-2.10.5.tar.xz")
593 "1r2aa19gnrvm2y4fqcvpw1g9l72n48axqmpgv18s6d0y2p72vhzj"))))
596 (home-page "https://git.zx2c4.com/cgit/")
597 (synopsis "Web frontend for git repositories")
599 "CGit is an attempt to create a fast web interface for the Git SCM, using
600 a built-in cache to decrease server I/O pressure.")
601 (license license:gpl2)))
603 (define-public python-ghp-import
605 (name "python-ghp-import")
611 "https://github.com/davisp/ghp-import/archive/"
613 (file-name (string-append name "-" version ".tar.gz"))
616 "0x887v690xsac2hzjkpbvp3a6crh3m08mqbk3nb4xwc9dnk869q7"))))
617 (build-system python-build-system)
619 `(#:phases (modify-phases %standard-phases
620 (add-after 'install 'install-documentation
621 (lambda* (#:key outputs #:allow-other-keys)
622 (let* ((out (assoc-ref outputs "out"))
623 (doc (string-append out "/share/doc"))
624 (licenses (string-append out "/share/licenses")))
625 (install-file "README.md" doc)
626 (install-file "LICENSE" licenses)))))))
627 (home-page "https://github.com/davisp/ghp-import")
628 (synopsis "Copy directory to the gh-pages branch")
629 (description "Script that copies a directory to the gh-pages branch (by
630 default) of the repository.")
632 ;; See <https://bugs.gnu.org/27913>.
633 (license (license:non-copyleft
634 "https://raw.githubusercontent.com/davisp/ghp-import/master/LICENSE"
635 "Tumbolia Public License"))))
637 (define-public python2-ghp-import
638 (package-with-python2
639 (strip-python2-variant python-ghp-import)))
641 (define-public python-gitdb
643 (name "python-gitdb")
647 (uri (pypi-uri "gitdb2" version))
650 "02azg62mr99b7cllyjrly77np3vw32y8nrxpa2xjapiyaga2j3mn"))))
651 (build-system python-build-system)
653 `(#:phases (modify-phases %standard-phases
654 (add-before 'check 'create-test-repository
656 (mkdir "/tmp/testrepo")
657 ;; Some tests require a git repository, so create one.
658 (with-directory-excursion "/tmp/testrepo"
659 (do ((filecount 1 (1+ filecount)))
661 (call-with-output-file (string-append
662 "file" (number->string filecount))
664 (format port "~a" filecount))))
666 (invoke "git" "init")
667 (invoke "git" "config" "user.name" "Total Git")
668 (invoke "git" "config" "user.email" "git@localhost")
669 (invoke "git" "add" "-A")
670 (invoke "git" "commit" "-q" "-m" "dummy commit")))
672 ;; The repository checkout must be a "bare" clone.
673 (invoke "git" "clone" "--bare" "/tmp/testrepo"
674 "/tmp/testrepo.git")))
677 (setenv "GITDB_TEST_GIT_REPO_BASE" "/tmp/testrepo.git")
678 ;; Skip tests that must be run from the gitdb repository.
679 (setenv "TRAVIS" "1")
680 (invoke "nosetests" "-v"))))))
682 `(("python-smmap2" ,python-smmap2)))
685 ("python-nose" ,python-nose)))
686 (home-page "https://github.com/gitpython-developers/gitdb")
687 (synopsis "Python implementation of the Git object database")
689 "GitDB allows you to access @dfn{bare} Git repositories for reading and
690 writing. It aims at allowing full access to loose objects as well as packs
691 with performance and scalability in mind. It operates exclusively on streams,
692 allowing to handle large objects with a small memory footprint.")
693 (license license:bsd-3)))
695 (define-public python2-gitdb
696 (package-with-python2 python-gitdb))
698 (define-public python-gitpython
700 (name "python-gitpython")
704 (uri (pypi-uri "GitPython" version))
707 "1sbn018mn3y2r58ix5z12na1s02ccprhckb88yq3bdddvqjvqqdd"))))
708 (build-system python-build-system)
710 `(#:tests? #f ;XXX: Tests can only be run within the GitPython repository.
711 #:phases (modify-phases %standard-phases
712 (add-after 'unpack 'embed-git-reference
713 (lambda* (#:key inputs #:allow-other-keys)
714 (substitute* "git/cmd.py"
715 (("git_exec_name = \"git\"")
716 (string-append "git_exec_name = \""
717 (assoc-ref inputs "git")
723 `(("python-gitdb" ,python-gitdb)))
725 `(("python-ddt" ,python-ddt)
726 ("python-nose" ,python-nose)))
727 (home-page "https://github.com/gitpython-developers/GitPython")
728 (synopsis "Python library for interacting with Git repositories")
730 "GitPython is a python library used to interact with Git repositories,
731 high-level like git-porcelain, or low-level like git-plumbing.
733 It provides abstractions of Git objects for easy access of repository data,
734 and additionally allows you to access the Git repository more directly using
735 either a pure Python implementation, or the faster, but more resource intensive
736 @command{git} command implementation.")
737 (license license:bsd-3)))
739 (define-public python2-gitpython
740 (package-with-python2 python-gitpython))
742 (define-public shflags
748 (uri (string-append "https://github.com/kward/shflags/archive/v"
750 (file-name (string-append name "-" version ".tar.gz"))
753 "1h9xfrwwdhzflipfwdcgcc3y7zapdslnyk1rg5y8jm7k144rfrs4"))))
754 (build-system gnu-build-system)
755 (native-inputs `(("tar" ,tar)
758 `(#:tests? #f ; no tests
760 (modify-phases %standard-phases
761 (delete 'configure) ; nothing to configure
762 (delete 'build) ; nothing to build
764 (lambda* (#:key outputs #:allow-other-keys)
765 (let* ((out (assoc-ref outputs "out"))
766 (src (string-append out "/src")))
767 (install-file "shflags" src)
769 (home-page "https://github.com/kward/shflags")
770 (synopsis "Command-line flags library for shell scripts")
772 "Shell Flags (shFlags) is a library written to greatly simplify the
773 handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
774 ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
775 different versions of getopt on various OSes make writing portable shell
776 scripts difficult. shFlags instead provides an API that doesn't change across
777 shell and OS versions so the script writer can be confident that the script
779 (license license:lgpl2.1)))
781 (define-public git-flow
784 ;; This version has not be officially released yet, so we build it
785 ;; directly from the git repository.
786 (version "0.4.2-pre")
790 (url "https://github.com/nvie/gitflow/")
791 (commit "15aab26490facf285acef56cb5d61025eacb3a69")))
792 (file-name (git-file-name name version))
795 "01fs97q76fdfnvmrh2cyjhywcs3pykf1dg58sy0frflnsdzs6prx"))))
796 (build-system gnu-build-system)
797 (inputs `(("shflags" ,shflags)))
799 '(#:tests? #f ; no tests
800 #:make-flags (list (string-append "prefix="
801 (assoc-ref %outputs "out")))
803 (modify-phases %standard-phases
804 (add-after 'unpack 'reset-shFlags-link
805 (lambda* (#:key inputs #:allow-other-keys)
806 ;; The link points to a file in the shFlags submodule.
807 ;; Redirect it to point to our system shFlags.
808 (let ((shflags (assoc-ref inputs "shflags")))
810 (delete-file "gitflow-shFlags")
811 (symlink (string-append shflags "/src/shflags")
812 "gitflow-shFlags")))))
815 (home-page "http://nvie.com/posts/a-successful-git-branching-model/")
816 (synopsis "Git extensions for Vincent Driessen's branching model")
818 "Vincent Driessen's branching model is a git branching and release
819 management strategy that helps developers keep track of features, hotfixes,
820 and releases in bigger software projects. The git-flow library of git
821 subcommands helps automate some parts of the flow to make working with it a
823 (license license:bsd-2)))
831 (uri (string-append "https://github.com/ctmarinas/stgit/archive/v"
833 (file-name (string-append name "-" version ".tar.gz"))
836 "19fk6vw3pgp2a98wpd4j3kyiyll5dy9bi4921wq1mrky0l53mj00"))))
837 (build-system python-build-system)
843 (modify-phases %standard-phases
846 ;; two tests will fail -> disable them. TODO: fix the failing tests
847 (delete-file "t/t3300-edit.sh")
848 (delete-file "t/t7504-commit-msg-hook.sh")
849 (zero? (system* "make" "test")))))))
850 (home-page "http://procode.org/stgit/")
851 (synopsis "Stacked Git")
853 "StGit is a command-line application that provides functionality similar
854 to Quilt (i.e., pushing/popping patches to/from a stack), but using Git
855 instead of @command{diff} and @command{patch}. StGit stores its patches in a
856 Git repository as normal Git commits, and provides a number of commands to
857 manipulate them in various ways.")
858 (license license:gpl2)))
863 (version "1.20151229")
866 (uri (string-append "https://github.com/RichiH/vcsh/archive/v"
868 (file-name (string-append name "-" version ".tar.gz"))
871 "1ym3swkh738c3vciffvlr96vqzhwmzkb8ajqzap8f0j9n039a1mf"))))
872 (build-system gnu-build-system)
878 ("perl-test-harness" ,perl-test-harness)
879 ("perl-shell-command" ,perl-shell-command)
880 ("perl-test-most" ,perl-test-most)))
882 '(#:phases (modify-phases %standard-phases
885 #:make-flags (list (string-append "PREFIX="
886 (assoc-ref %outputs "out")))
887 #:test-target "test"))
888 (home-page "https://github.com/RichiH/vcsh")
889 (synopsis "Version control system for @code{$HOME}")
891 "vcsh version-controls configuration files in several Git repositories,
892 all in one single directory. They all maintain their working trees without
893 clobbering each other or interfering otherwise. By default, all Git
894 repositories maintained via vcsh store the actual files in @code{$HOME},
895 though this can be overridden.")
896 (license license:gpl2+)))
898 (define-public git-test-sequence
899 (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76"))
901 (name "git-test-sequence")
902 (version (string-append "20140312." (string-take commit 7)))
906 ;; There are many other scripts in this directory; we
907 ;; are interested in just one for this package.
908 (url "https://github.com/dustin/bindir")
910 (file-name (git-file-name name version))
913 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
914 (build-system trivial-build-system)
916 `(#:modules ((guix build utils))
918 (use-modules (guix build utils))
919 (let* ((source (assoc-ref %build-inputs "source"))
920 (output (assoc-ref %outputs "out"))
921 (bindir (string-append output "/bin"))
922 (script "git-test-sequence"))
923 (install-file (string-append source "/" script)
926 (home-page "http://dustin.sallings.org/2010/03/28/git-test-sequence.html")
927 (synopsis "Run a command over a sequence of commits")
929 "git-test-sequence is similar to an automated git bisect except it’s
930 linear. It will test every change between two points in the DAG. It will
931 also walk each side of a merge and test those changes individually.")
932 (license (license:x11-style "file://LICENSE")))))
934 (define-public gitolite
941 "https://github.com/sitaramc/gitolite/archive/v"
943 (file-name (string-append name "-" version ".tar.gz"))
946 "1idxipg0df80bhjcxgwxs3lllqnkvhwpinmfv1xvg1l98fxiapgp"))))
947 (build-system gnu-build-system)
949 '(#:tests? #f ; no tests
950 #:phases (modify-phases %standard-phases
953 (add-before 'install 'patch-scripts
954 (lambda* (#:key inputs #:allow-other-keys)
955 (let ((perl (string-append (assoc-ref inputs "perl")
957 ;; This seems to take care of every shell script that
959 (substitute* (find-files "." ".*")
961 (string-append " " perl " -")))
963 ;; Avoid references to the store in authorized_keys.
964 ;; This works because gitolite-shell is in the PATH.
965 (substitute* "src/triggers/post-compile/ssh-authkeys"
966 (("\\$glshell \\$user")
967 "gitolite-shell $user"))
970 (lambda* (#:key outputs #:allow-other-keys)
971 (let* ((output (assoc-ref outputs "out"))
972 (sharedir (string-append output "/share/gitolite"))
973 (bindir (string-append output "/bin")))
976 (invoke "./install" "-to" sharedir)
977 ;; Create symlinks for executable scripts in /bin.
978 (for-each (lambda (script)
979 (symlink (string-append sharedir "/" script)
980 (string-append bindir "/" script)))
981 '("gitolite" "gitolite-shell"))
985 ;; git and openssh are propagated because trying to patch the source via
986 ;; regexp matching is too brittle and prone to false positives.
989 ("openssh" ,openssh)))
990 (home-page "http://gitolite.com")
991 (synopsis "Git access control layer")
993 "Gitolite is an access control layer on top of Git, providing fine access
994 control to Git repositories.")
995 (license license:gpl2)))
997 (define-public mercurial
1003 (uri (string-append "https://www.mercurial-scm.org/"
1004 "release/mercurial-" version ".tar.gz"))
1007 "0ik2ypzxjr6vpcghxvn39a73gw52629n7vwak04gnbycsq95aalg"))))
1008 (build-system python-build-system)
1010 `(;; Restrict to Python 2, as Python 3 would require
1011 ;; the argument --c2to3.
1013 ;; FIXME: Disabled tests because they require the nose unit
1014 ;; testing framework: https://nose.readthedocs.org/en/latest/ .
1016 (home-page "https://www.mercurial-scm.org/")
1017 (synopsis "Decentralized version control system")
1019 "Mercurial is a free, distributed source control management tool.
1020 It efficiently handles projects of any size
1021 and offers an easy and intuitive interface.")
1022 (license license:gpl2+)))
1030 (uri (string-append "http://www.webdav.org/neon/neon-"
1034 "1jpvczcx658vimqm7c8my2q41fnmjaf1j03g7bsli6rjxk6xh2yv"))))
1035 (build-system gnu-build-system)
1038 ("pkg-config" ,pkg-config)))
1040 `(("libxml2" ,libxml2)
1041 ("openssl" ,openssl)
1044 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
1045 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
1047 #:configure-flags '("--enable-shared"
1048 ;; requires libgnutils-config, deprecated
1050 ; "--with-ssl=gnutls")))
1051 "--with-ssl=openssl")))
1052 (home-page "http://www.webdav.org/neon/")
1053 (synopsis "HTTP and WebDAV client library")
1055 "Neon is an HTTP and WebDAV client library, with a C interface and the
1058 @item High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
1060 @item low-level interface to the HTTP request/response engine, allowing the use
1061 of arbitrary HTTP methods, headers, etc.;
1062 @item authentication support including Basic and Digest support, along with
1063 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
1064 @item SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
1065 verifying server certificates, handling client certificates, and examining
1066 certificate properties, smartcard-based client certificates are also
1067 supported via a PKCS#11 wrapper interface;
1068 @item abstract interface to parsing XML using libxml2 or expat, and wrappers for
1069 simplifying handling XML HTTP response bodies;
1070 @item WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
1071 property manipulation.
1073 (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+
1075 (define-public subversion
1083 (string-append "https://archive.apache.org/dist/subversion/"
1084 "subversion-" version ".tar.bz2")
1085 (string-append "https://www-eu.apache.org/dist/subversion/"
1086 "subversion-" version ".tar.bz2")))
1089 "1gp6426gkdza6ni2whgifjcmjb4nq34ljy07yxkrhlarvfq6ks2n"))))
1090 (build-system gnu-build-system)
1093 (modify-phases %standard-phases
1094 (add-after 'configure 'patch-libtool-wrapper-ls
1095 (lambda* (#:key inputs #:allow-other-keys)
1096 ;; This substitution allows tests svnauthz_tests and svnlook_tests
1097 ;; to pass. These tests execute svnauthz and svnlook through
1098 ;; their libtool wrapper scripts from svn hooks, whose empty
1099 ;; environments cause "ls: command not found" errors. It would be
1100 ;; nice if this fix ultimately made its way into libtool.
1101 (let ((coreutils (assoc-ref inputs "coreutils")))
1102 (substitute* "libtool"
1103 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))
1105 (add-after 'install 'install-perl-bindings
1106 (lambda* (#:key outputs #:allow-other-keys)
1107 ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
1108 (let ((out (assoc-ref outputs "out")))
1109 (and (zero? (system* "make" "swig-pl-lib"))
1110 ;; FIXME: Test failures.
1111 ;; (zero? (system* "make" "check-swig-pl"))
1112 (zero? (system* "make" "install-swig-pl-lib"))
1114 ;; Set the right installation prefix.
1115 (with-directory-excursion
1116 "subversion/bindings/swig/perl/native"
1118 (system* "perl" "Makefile.PL"
1120 (string-append "PREFIX=" out)))
1122 (system* "make" "install"
1123 (string-append "OTHERLDFLAGS="
1125 out "/lib"))))))))))))
1127 `(("pkg-config" ,pkg-config)
1128 ;; For the Perl bindings.
1132 ("apr-util" ,apr-util)
1135 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
1138 (home-page "https://subversion.apache.org/")
1139 (synopsis "Revision control system")
1141 "Subversion exists to be universally recognized and adopted as a
1142 centralized version control system characterized by its
1143 reliability as a safe haven for valuable data; the simplicity of its model and
1144 usage; and its ability to support the needs of a wide variety of users and
1145 projects, from individuals to large-scale enterprise operations.")
1146 (license license:asl2.0)))
1154 (uri (string-append "mirror://gnu/rcs/rcs-"
1158 "1zsx7bb0rgvvvisiy4zlixf56ay8wbd9qqqcp1a1g0m1gl6mlg86"))
1159 (patches (search-patches "rcs-5.9.4-noreturn.patch"))))
1160 (build-system gnu-build-system)
1161 (native-inputs `(("ed" ,ed)))
1162 (home-page "https://www.gnu.org/software/rcs/")
1163 (synopsis "Per-file local revision control system")
1165 "RCS is the original Revision Control System. It works on a
1166 file-by-file basis, in contrast to subsequent version control systems such as
1167 CVS, Subversion, and Git. This can make it suitable for system
1168 administration files, for example, which are often inherently local to one
1170 (license license:gpl3+)))
1179 "https://ftp.gnu.org/non-gnu/cvs/source/feature/"
1180 version "/cvs-" version ".tar.bz2"))
1181 (patches (search-patches "cvs-2017-12836.patch"))
1184 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
1185 (build-system gnu-build-system)
1187 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
1189 #:configure-flags (list "--with-external-zlib")))
1190 (inputs `(("zlib" ,zlib)
1191 ("nano" ,nano))) ; the default editor
1192 (home-page "http://cvs.nongnu.org")
1193 (synopsis "Historical centralized version control system")
1195 "CVS is a version control system, an important component of Source
1196 Configuration Management (SCM). Using it, you can record the history of
1197 sources files, and documents. It fills a similar role to the free software
1198 RCS, PRCS, and Aegis packages.")
1199 (license license:gpl1+)))
1201 (define-public cvs-fast-export
1203 (name "cvs-fast-export")
1207 (uri (string-append "http://www.catb.org/~esr/"
1208 name "/" name "-" version ".tar.gz"))
1211 "17xp5q4cxmd6z0ii1fdr4j1djb9mz1qv7hzr6fawdapjzahi65m3"))))
1212 (build-system gnu-build-system)
1215 (modify-phases %standard-phases
1217 (add-after 'unpack 'remove-optimizations
1219 ;; Don't optimize for a specific processor architecture.
1220 (substitute* "Makefile"
1221 (("CFLAGS \\+= -march=native") ""))
1222 ;; This code runs with Python2 or Python3
1223 (substitute* "cvsreduce"
1224 (("python3") "python"))
1226 #:parallel-build? #f ; parallel a2x commands fail spectacularly
1228 (list "CC=gcc" (string-append "prefix?=" (assoc-ref %outputs "out")))))
1229 (inputs `(("git" ,git)))
1230 (native-inputs `(("asciidoc" ,asciidoc)
1231 ;; These are needed for the tests.
1233 ("python" ,python-2)
1235 (home-page "http://www.catb.org/esr/cvs-fast-export/")
1236 (synopsis "Export an RCS or CVS history as a fast-import stream")
1237 (description "This program analyzes a collection of RCS files in a CVS
1238 repository (or outside of one) and, when possible, emits an equivalent history
1239 in the form of a fast-import stream. Not all possible histories can be
1240 rendered this way; the program tries to emit useful warnings when it can't.
1242 The program can also produce a visualization of the resulting commit directed
1243 acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org,
1244 Graphviz}. The package also includes @command{cvssync}, a tool for mirroring
1245 masters from remote CVS hosts.")
1246 (license license:gpl2+)))
1248 (define-public vc-dwim
1254 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
1258 "0d5sqafc40l878m8wjr35jxmalj4kam1m6ph60v08ng4ml5g7931"))))
1259 (build-system gnu-build-system)
1260 (inputs `(("perl" ,perl)
1261 ("inetutils" ,inetutils))) ; for `hostname', used in the tests
1262 (native-inputs `(("emacs" ,emacs-minimal))) ; for `ctags'
1263 (home-page "https://www.gnu.org/software/vc-dwim/")
1264 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
1266 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
1267 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
1268 using version control at the same time, for example by printing a reminder
1269 when a file change has been described in the ChangeLog but the file has not
1270 been added to the VC. vc-chlog scans changed files and generates
1271 standards-compliant ChangeLog entries based on the changes that it detects.")
1272 (license license:gpl3+)))
1274 (define-public diffstat
1282 (string-append "ftp://invisible-island.net/diffstat/"
1283 name "-" version ".tgz")
1284 (string-append "http://invisible-mirror.net/archives/diffstat/"
1285 name "-" version ".tgz")))
1288 "1vjmda2zfjxg0qkaj8hfqa8g6bfwnn1ja8696rxrjgqq4w69wd95"))))
1289 (build-system gnu-build-system)
1290 (home-page "https://invisible-island.net/diffstat/")
1291 (synopsis "Make histograms from the output of @command{diff}")
1293 "Diffstat reads the output of @command{diff} and displays a histogram of
1294 the insertions, deletions, and modifications per file. It is useful for
1295 reviewing large, complex patch files.")
1296 (license (license:x11-style "file://COPYING"))))
1304 (uri (string-append "mirror://gnu/" name "/CSSC-"
1308 "15191dh8hr46cvssmv4v52gymiiyk6ca9j1bfimlqakcqab6y51h"))))
1309 (build-system gnu-build-system)
1312 (modify-phases %standard-phases
1313 (add-before 'check 'precheck
1316 (substitute* "tests/common/test-common"
1317 (("/bin/pwd") (which "pwd")))
1319 (substitute* "tests/prt/all-512.sh"
1320 (("/bin/sh") (which "sh")))
1322 ;; XXX: This test has no hope of passing until there is a "nogroup"
1323 ;; entry (or at least some group to which the guix builder does
1324 ;; not belong) in the /etc/group file of the build environment.
1325 ;; Currently we do not have such a group. Disable this test for now.
1326 (substitute* "tests/Makefile"
1327 (("test-delta ") ""))))))))
1328 ;; These are needed for the tests
1329 (native-inputs `(("git" ,git)
1331 (home-page "https://www.gnu.org/software/cssc/")
1332 (synopsis "File-based version control like SCCS")
1333 (description "GNU CSSC provides a replacement for the legacy Unix source
1334 code control system SCCS. This allows old code still under that system to be
1335 accessed and migrated on modern systems.")
1336 (license license:gpl3+)))
1338 ;; This package can unfortunately work only in -TEST mode, since Aegis
1339 ;; requires that it is installed setuid root.
1340 (define-public aegis
1346 (uri (string-append "mirror://sourceforge/aegis/aegis/" version
1347 "/aegis-" version ".tar.gz"))
1350 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
1351 (patches (search-patches "aegis-perl-tempdir1.patch"
1352 "aegis-perl-tempdir2.patch"
1353 "aegis-test-fixup-1.patch"
1354 "aegis-test-fixup-2.patch"
1355 "aegis-constness-error.patch"))))
1356 (build-system gnu-build-system)
1358 `(("e2fsprogs" ,e2fsprogs)
1361 ("libxml2" ,libxml2)
1363 ("gettext" ,gettext-minimal)))
1368 ;; Various tests require the following:
1372 ("subversion" ,subversion)
1376 `(#:configure-flags (list "--with-no-aegis-configured"
1377 "--sharedstatedir=/var/com/aegis")
1378 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
1380 (modify-phases %standard-phases
1381 (add-before 'configure 'pre-conf
1383 (substitute* (append '("configure"
1384 "etc/check-tar-gz.sh"
1388 "script/aebisect.in"
1389 "script/aeintegratq.in"
1391 "script/test_funcs.in"
1392 "web/eg_oss_templ.sh"
1394 "libaegis/getpw_cache.cc")
1395 (find-files "test" "\\.sh"))
1396 (("/bin/sh") (which "sh")))
1397 (setenv "SH" (which "sh"))))
1400 (let ((home (string-append (getcwd) "/my-new-home")))
1401 ;; Some tests need to write to $HOME.
1403 (setenv "HOME" home)
1405 ;; This test assumes that flex has been symlinked to "lex".
1406 (substitute* "test/00/t0011a.sh"
1407 (("type lex") "type flex"))
1409 ;; The author decided to call the check rule "sure".
1410 (zero? (system* "make" "sure"))))))))
1411 (home-page "http://aegis.sourceforge.net")
1412 (synopsis "Project change supervisor")
1413 (description "Aegis is a project change supervisor, and performs some of
1414 the Software Configuration Management needed in a CASE environment. Aegis
1415 provides a framework within which a team of developers may work on many
1416 changes to a program independently, and Aegis coordinates integrating these
1417 changes back into the master source of the program, with as little disruption
1418 as possible. Resolution of contention for source files, a major headache for
1419 any project with more than one developer, is one of Aegis's major functions.")
1420 (license license:gpl3+)))
1422 (define-public reposurgeon
1424 (name "reposurgeon")
1428 (uri (string-append "http://www.catb.org/~esr/" name "/"
1429 name "-" version ".tar.xz"))
1432 "1af0z14wcm4bk5a9ysinbwq2fp3lf5f7i8mvwh7286hr3fnagcaz"))
1433 (patches (search-patches
1434 "reposurgeon-add-missing-docbook-files.patch"))))
1435 (build-system gnu-build-system)
1439 (string-append "target=" (assoc-ref %outputs "out")))
1441 (modify-phases %standard-phases
1442 (add-after 'unpack 'patch-inputs
1443 (lambda* (#:key inputs #:allow-other-keys)
1444 (let ((tzdata (assoc-ref inputs "tzdata")))
1445 (substitute* "reposurgeon"
1446 (("/usr/share/zoneinfo")
1447 (string-append tzdata "/share/zoneinfo")))
1448 (substitute* "test/svn-to-svn"
1449 (("/bin/echo") "echo"))
1451 (delete 'configure) ; no configure script
1452 (add-before 'build 'fix-docbook
1453 (lambda* (#:key inputs #:allow-other-keys)
1454 (substitute* (find-files "." "\\.xml$")
1455 (("docbook/docbookx.dtd")
1456 (string-append (assoc-ref inputs "docbook-xml")
1457 "/xml/dtd/docbook/docbookx.dtd")))
1459 (add-before 'check 'set-up-test-environment
1460 (lambda* (#:key inputs #:allow-other-keys)
1461 (let ((tzdata (assoc-ref inputs "tzdata")))
1462 (setenv "TZDIR" (string-append tzdata "/share/zoneinfo"))
1464 (add-after 'install 'install-emacs-data
1465 (lambda* (#:key outputs #:allow-other-keys)
1466 (install-file "reposurgeon-mode.el"
1467 (string-append (assoc-ref outputs "out")
1468 "/share/emacs/site-lisp")))))))
1470 `(("python" ,python-wrapper)
1471 ("tzdata" ,tzdata)))
1473 `( ;; For building documentation.
1474 ("asciidoc" ,asciidoc)
1475 ("docbook-xml" ,docbook-xml)
1476 ("docbook-xsl" ,docbook-xsl)
1477 ("libxml2" ,libxml2)
1483 ("mercurial" ,mercurial)
1484 ("subversion" ,subversion)))
1485 (home-page "http://www.catb.org/~esr/reposurgeon/")
1486 (synopsis "Edit version-control repository history")
1487 (description "Reposurgeon enables risky operations that version-control
1488 systems don't want to let you do, such as editing past comments and metadata
1489 and removing commits. It works with any version control system that can
1490 export and import Git fast-import streams, including Git, Mercurial, Fossil,
1491 Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly
1492 and can thus be used to script production of very high-quality conversions
1493 from Subversion to any supported Distributed Version Control System (DVCS).")
1494 ;; Most files are distributed under bsd-2, except 'repocutter' which is
1496 (license (list license:bsd-2 license:bsd-3))))
1505 "https://github.com/jonas/tig/releases/download/tig-"
1506 version "/tig-" version ".tar.gz"))
1509 "1skbhhj1narsnsff1azdylcy6xghxb18mzqysmipcyyvlv2i17fk"))))
1510 (build-system gnu-build-system)
1512 `(("asciidoc" ,asciidoc)
1515 `(("ncurses" ,ncurses)
1516 ("readline" ,readline)))
1519 (modify-phases %standard-phases
1520 (add-after 'install 'install-doc
1522 (invoke "make" "install-doc"))))
1523 #:tests? #f)) ; tests require access to /dev/tty
1524 ;; #:test-target "test"))
1525 (home-page "https://jonas.github.io/tig/")
1526 (synopsis "Ncurses-based text user interface for Git")
1528 "Tig is an ncurses text user interface for Git, primarily intended as
1529 a history browser. It can also stage hunks for commit, or colorize the
1530 output of the 'git' command.")
1531 (license license:gpl2+)))
1533 (define-public findnewest
1540 "https://github.com/0-wiz-0/findnewest/archive/findnewest-"
1544 "1ydis4y0amkgfr4y60sn076f1l41ya2kn89kfd9fqf44f9ccgb5r"))))
1545 (build-system gnu-build-system)
1546 (native-inputs `(("autoconf" ,autoconf)
1547 ("automake" ,automake)))
1548 (home-page "https://github.com/0-wiz-0/findnewest/releases")
1549 (synopsis "Print the modification time of the latest file")
1551 "Recursively find the newest file in a file tree and print its
1552 modification time.")
1553 (license license:bsd-2)))
1555 (define-public myrepos
1558 (version "1.20171231")
1563 (url "git://myrepos.branchable.com/myrepos")
1565 (file-name (string-append name "-" version "-checkout"))
1567 (base32 "10q7lpx152xnkk701fscn4dq99q9znnmv3bc2482khhjg7z8rps0"))))
1568 (build-system gnu-build-system)
1572 '(#:test-target "test"
1573 #:phases (modify-phases %standard-phases (delete 'configure))
1574 #:make-flags (list (string-append "PREFIX=" %output))))
1575 (home-page "https://myrepos.branchable.com/")
1576 (synopsis "Multiple repository management tool")
1578 "Myrepos provides the @code{mr} command, which maps an operation (e.g.,
1579 fetching updates) over a collection of version control repositories. It
1580 supports a large number of version control systems: Git, Subversion,
1581 Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
1582 (license license:gpl2+)))
1584 (define-public git-annex-remote-hubic
1586 (name "git-annex-remote-hubic")
1591 "https://github.com/Schnouki/" name "/archive/v"
1593 (file-name (string-append name "-" version ".tar.gz"))
1596 "196g3jkaybjx11nbr51n0cjps3wjzb145ab76y717diqvvxp5v4r"))))
1597 (build-system python-build-system)
1598 (arguments `(#:python ,python-2))
1601 ("python2-six" ,python2-six)))
1603 `(("python2-dateutil" ,python2-dateutil)
1604 ("python2-futures" ,python2-futures)
1605 ("python2-rauth" ,python2-rauth)
1606 ("python2-swiftclient" ,python2-swiftclient)))
1607 (home-page "https://github.com/Schnouki/git-annex-remote-hubic/")
1608 (synopsis "Use hubic as a git-annex remote")
1610 "This package allows you to use your hubic account as a \"special
1611 repository\" with git-annex.")
1612 (license license:gpl3+)))
1614 (define-public fossil
1621 ;; Older downloads are moved to another URL.
1624 "https://www.fossil-scm.org/index.html/uv/download/"
1625 "fossil-src-" version ".tar.gz")
1627 "https://www.fossil-scm.org/index.html/uv/"
1628 "fossil-src-" version ".tar.gz")))
1631 "1lxawkhr1ki9fqw8076fxib2b1w673449yzb6vxjshqzh5h77c7r"))))
1632 (build-system gnu-build-system)
1634 `(("tcl" ,tcl) ;for configuration only
1635 ("which" ,which) ;for tests only
1638 `(("openssl" ,openssl)
1640 ("sqlite" ,sqlite)))
1642 `(#:configure-flags (list "--with-openssl=auto"
1643 "--disable-internal-sqlite")
1644 #:test-target "test"
1645 #:phases (modify-phases %standard-phases
1647 (lambda* (#:key outputs (configure-flags '())
1649 ;; The 'configure' script is not an autoconf script and
1650 ;; chokes on unrecognized options.
1653 (string-append "--prefix="
1654 (assoc-ref outputs "out"))
1657 (add-before 'check 'test-setup
1659 (setenv "USER" "guix")
1662 (home-page "https://fossil-scm.org")
1663 (synopsis "Software configuration management system")
1665 "Fossil is a distributed source control management system which supports
1666 access and administration over HTTP CGI or via a built-in HTTP server. It has
1667 a built-in wiki, built-in file browsing, built-in tickets system, etc.")
1668 (license (list license:public-domain ;src/miniz.c, src/shell.c
1671 (define-public stagit
1677 (uri (string-append "https://dl.2f30.org/releases/"
1678 name "-" version ".tar.gz"))
1681 "1m3s9g1z9szbjrhm8sic91xh6f2bfpi56rskdkqd5wc4wdycpyi5"))))
1682 (build-system gnu-build-system)
1684 `(#:tests? #f ; No tests
1685 #:make-flags (list "CC=gcc"
1686 (string-append "PREFIX=" %output))
1688 (modify-phases %standard-phases
1689 (delete 'configure)))) ; No configure script
1691 `(("libgit2" ,libgit2)))
1692 (home-page "https://2f30.org/")
1693 (synopsis "Static git page generator")
1694 (description "Stagit creates static pages for git repositories, the results can
1695 be served with a HTTP file server of your choice.")
1696 (license license:expat)))
1698 ;; Darcs has no https support: http://irclog.perlgeek.de/darcs/2016-09-17
1699 ;; http://darcs.net/manual/Configuring_darcs.html#SECTION00440070000000000000
1700 ;; and results of search engines will show that if the protocol is http, https
1701 ;; is never mentioned.
1702 (define-public darcs
1709 (uri (string-append "https://hackage.haskell.org/package/darcs/"
1710 "darcs-" version ".tar.gz"))
1713 "0lrm0sal5pl453mkqn8b9fc9l7lwinc140iqihya9g17bk408nrm"))
1714 (modules '((guix build utils)))
1715 ;; Remove time-dependent code for reproducibility.
1718 (substitute* "darcs/darcs.hs"
1719 (("__DATE__") "\"1970-01-01\"")
1720 (("__TIME__") "\"00:00:00\""))
1721 (substitute* "src/impossible.h"
1722 (("__DATE__") "\"\"")
1723 (("__TIME__") "\"\""))
1725 (build-system haskell-build-system)
1727 `(#:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
1728 "-fnetwork-uri" "-fhttp" "--flag=executable"
1730 "--allow-newer=shelly")
1731 ;; FIXME: darcs is not compatible with the latest QuickCheck
1734 `(("ghc-cmdargs" ,ghc-cmdargs)
1735 ("ghc-split" ,ghc-split)
1736 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
1737 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
1738 ("ghc-test-framework" ,ghc-test-framework)
1739 ("ghc-quickcheck" ,ghc-quickcheck)
1740 ("ghc-findbin" ,ghc-findbin)
1741 ("ghc-hunit" ,ghc-hunit)
1742 ("ghc-array" ,ghc-array)
1743 ("ghc-async" ,ghc-async)
1744 ("ghc-attoparsec" ,ghc-attoparsec)
1745 ("ghc-base16-bytestring" ,ghc-base16-bytestring)
1746 ("ghc-binary" ,ghc-binary)
1747 ("ghc-bytestring-builder" ,ghc-bytestring-builder)
1748 ("ghc-cryptohash" ,ghc-cryptohash)
1749 ("ghc-data-ordlist" ,ghc-data-ordlist)
1750 ("ghc-fgl" ,ghc-fgl)
1751 ("ghc-system-filepath" ,ghc-system-filepath)
1752 ("ghc-graphviz" ,ghc-graphviz)
1753 ("ghc-hashable" ,ghc-hashable)
1754 ("ghc-haskeline" ,ghc-haskeline)
1755 ("ghc-html" ,ghc-html)
1756 ("ghc-mmap" ,ghc-mmap)
1757 ("ghc-mtl" ,ghc-mtl)
1758 ("ghc-old-time" ,ghc-old-time)
1759 ("ghc-parsec" ,ghc-parsec)
1760 ("ghc-random" ,ghc-random)
1761 ("ghc-regex-applicative" ,ghc-regex-applicative)
1762 ("ghc-regex-compat-tdfa" ,ghc-regex-compat-tdfa)
1763 ("ghc-sandi" ,ghc-sandi)
1764 ("ghc-shelly" ,ghc-shelly)
1765 ("ghc-tar" ,ghc-tar)
1766 ("ghc-transformers-compat" ,ghc-transformers-compat)
1767 ("ghc-unix-compat" ,ghc-unix-compat)
1768 ("ghc-utf8-string" ,ghc-utf8-string)
1769 ("ghc-vector" ,ghc-vector)
1770 ("ghc-zip-archive" ,ghc-zip-archive)
1771 ("ghc-zlib" ,ghc-zlib)
1772 ("ghc-http" ,ghc-http)
1775 ("ncurses" ,ncurses)
1777 ("libiconv" ,libiconv)
1778 ("ghc-network" ,ghc-network)
1779 ("ghc-network-uri" ,ghc-network-uri)))
1781 `(("pkg-config" ,pkg-config)))
1782 (home-page "http://darcs.net")
1783 (synopsis "Distributed Revision Control System")
1785 "Darcs is a revision control system. It is:
1788 @item Distributed: Every user has access to the full command set, removing boundaries
1789 between server and client or committer and non-committers.
1790 @item Interactive: Darcs is easy to learn and efficient to use because it asks you
1791 questions in response to simple commands, giving you choices in your work flow.
1792 You can choose to record one change in a file, while ignoring another. As you update
1793 from upstream, you can review each patch name, even the full diff for interesting
1795 @item Smart: Originally developed by physicist David Roundy, darcs is based on a
1796 unique algebra of patches called @url{http://darcs.net/Theory,Patchtheory}.
1798 (license license:gpl2)))
1800 (define-public java-jgit
1803 (version "4.7.0.201704051617-r")
1806 (uri (string-append "https://repo1.maven.org/maven2/"
1807 "org/eclipse/jgit/org.eclipse.jgit/"
1808 version "/org.eclipse.jgit-"
1809 version "-sources.jar"))
1812 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
1813 (build-system ant-build-system)
1815 `(#:tests? #f ; There are no tests to run.
1816 #:jar-name "jgit.jar"
1817 ;; JGit must be built with a JDK supporting Java 8.
1819 ;; Target our older default JDK.
1820 #:make-flags (list "-Dtarget=1.7")
1822 (modify-phases %standard-phases
1823 ;; The jar file generated by the default build.xml does not include
1824 ;; the text properties files, so we need to add them.
1825 (add-after 'build 'add-properties
1826 (lambda* (#:key jar-name #:allow-other-keys)
1827 (with-directory-excursion "src"
1828 (zero? (apply system* "jar" "-uf"
1829 (string-append "../build/jar/" jar-name)
1830 (find-files "." "\\.properties$")))))))))
1832 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
1833 ("java-javaewah" ,java-javaewah)
1834 ("java-jsch" ,java-jsch)
1835 ("java-slf4j-api" ,java-slf4j-api)))
1836 (home-page "https://eclipse.org/jgit/")
1837 (synopsis "Java library implementing the Git version control system")
1838 (description "JGit is a lightweight, pure Java library implementing the
1839 Git version control system, providing repository access routines, support for
1840 network protocols, and core version control algorithms.")
1841 (license license:edl1.0)))
1843 ;; For axoloti. This package can still be built with icedtea-7, which is
1844 ;; currently used as the default JDK.
1845 (define-public java-jgit-4.2
1846 (package (inherit java-jgit)
1847 (version "4.2.0.201601211800-r")
1850 (uri (string-append "https://repo1.maven.org/maven2/"
1851 "org/eclipse/jgit/org.eclipse.jgit/"
1852 version "/org.eclipse.jgit-"
1853 version "-sources.jar"))
1856 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
1857 (build-system ant-build-system)
1859 (substitute-keyword-arguments (package-arguments java-jgit)
1860 ;; Build for default JDK.
1861 ((#:jdk _) icedtea-7)
1863 `(modify-phases ,phases
1864 (add-after 'unpack 'use-latest-javaewah-API
1866 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
1867 (("wordinbits") "WORD_IN_BITS"))
1870 `(("java-javaewah" ,java-javaewah)
1871 ("java-jsch" ,java-jsch)
1872 ("java-slf4j-api" ,java-slf4j-api)))))
1874 (define-public gource
1881 "https://github.com/acaudwell/Gource/releases/download"
1882 "/gource-" version "/gource-" version ".tar.gz"))
1885 "04qxcm05qiyr9rg2kv6abfy7kkzqr8ziw4iyp1d14lniv93m61dp"))))
1886 (build-system gnu-build-system)
1889 (list (string-append "--with-boost-libdir="
1890 (assoc-ref %build-inputs "boost")
1893 `(("pkg-config" ,pkg-config)))
1903 ("sdl-union" ,(sdl-union (list sdl2 sdl2-image)))))
1904 (home-page "http://gource.io/")
1905 (synopsis "3D visualisation tool for source control repositories")
1906 (description "@code{gource} provides a software version control
1907 visualization. The repository is displayed as a tree where the root of the
1908 repository is the centre, directories are branches and files are leaves.
1909 Contributors to the source code appear and disappear as they contribute to
1910 specific files and directories.")
1911 (license license:gpl3+)))