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, 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 ng0 <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")
350 (add-after 'split 'install-man-pages
351 (lambda* (#:key inputs outputs #:allow-other-keys)
352 (let* ((out (assoc-ref outputs "out"))
353 (man (string-append out "/share/man"))
354 (manpages (assoc-ref inputs "git-manpages")))
356 (with-directory-excursion man
357 (zero? (system* "tar" "xvf" manpages)))))))))
360 ;; For HTTPS access, Git needs a single-file certificate bundle, specified
361 ;; with $GIT_SSL_CAINFO.
362 (list (search-path-specification
363 (variable "GIT_SSL_CAINFO")
365 (separator #f) ;single entry
366 (files '("etc/ssl/certs/ca-certificates.crt")))
367 (search-path-specification
368 (variable "GIT_EXEC_PATH")
369 (separator #f) ;single entry
370 (files '("libexec/git-core")))))
372 (synopsis "Distributed version control system")
374 "Git is a free distributed version control system designed to handle
375 everything from small to very large projects with speed and efficiency.")
376 (license license:gpl2)
377 (home-page "https://git-scm.com/")))
379 (define-public libgit2
385 (uri (string-append "https://github.com/libgit2/libgit2/"
386 "archive/v" version ".tar.gz"))
387 (file-name (string-append name "-" version ".tar.gz"))
390 "1b3figbhp5l83vd37vq6j2narrq4yl9pfw6mw0px0dzb1hz3jqka"))
391 (patches (search-patches "libgit2-0.25.1-mtime-0.patch"))
393 ;; Remove bundled software.
394 (snippet '(delete-file-recursively "deps"))
395 (modules '((guix build utils)))))
396 (build-system cmake-build-system)
397 (outputs '("out" "debug"))
399 `(#:configure-flags '("-DUSE_SHA1DC=ON") ; SHA-1 collision detection
401 (modify-phases %standard-phases
402 (add-after 'unpack 'fix-hardcoded-paths
404 (substitute* "tests/repo/init.c"
405 (("#!/bin/sh") (string-append "#!" (which "sh"))))
406 (substitute* "tests/clar/fs.h"
407 (("/bin/cp") (which "cp"))
408 (("/bin/rm") (which "rm")))
410 ;; Run checks more verbosely.
412 (lambda _ (zero? (system* "./libgit2_clar" "-v" "-Q")))))))
414 `(("libssh2" ,libssh2)
415 ("http-parser" ,http-parser)
416 ("python" ,python-wrapper)))
418 `(("pkg-config" ,pkg-config)))
420 ;; These two libraries are in 'Requires.private' in libgit2.pc.
421 `(("openssl" ,openssl)
423 (home-page "https://libgit2.github.com/")
424 (synopsis "Library providing Git core methods")
426 "Libgit2 is a portable, pure C implementation of the Git core methods
427 provided as a re-entrant linkable library with a solid API, allowing you to
428 write native speed custom Git applications in any language with bindings.")
429 ;; GPLv2 with linking exception
430 (license license:gpl2)))
432 (define-public git-crypt
438 (uri (string-append "https://github.com/AGWA/git-crypt"
439 "/archive/" version ".tar.gz"))
440 (file-name (string-append name "-" version ".tar.gz"))
443 "0454fdmgm5f3razkn8n03lfqm5zyzvr4r2528zmlxiwba9518l2i"))))
444 (build-system gnu-build-system)
447 ("openssl" ,openssl)))
449 `(#:tests? #f ; No tests.
451 (modify-phases %standard-phases
455 (zero? (system* "make"))))
457 (lambda* (#:key outputs #:allow-other-keys)
458 (let ((out (assoc-ref outputs "out")))
459 (zero? (system* "make" "install"
460 (string-append "PREFIX=" out)))))))))
461 (home-page "https://www.agwa.name/projects/git-crypt")
462 (synopsis "Transparent encryption of files in a git repository")
463 (description "git-crypt enables transparent encryption and decryption of
464 files in a git repository. Files which you choose to protect are encrypted when
465 committed, and decrypted when checked out. git-crypt lets you freely share a
466 repository containing a mix of public and private content. git-crypt gracefully
467 degrades, so developers without the secret key can still clone and commit to a
468 repository with encrypted files. This lets you store your secret material (such
469 as keys or passwords) in the same repository as your code, without requiring you
470 to lock down your entire repository.")
471 (license license:gpl3+)))
473 (define-public git-remote-gcrypt
475 (name "git-remote-gcrypt")
480 (url "https://git.spwhitton.name/git-remote-gcrypt")
482 (file-name (string-append name "-" version "-checkout"))
485 "1vay3204729c7wajgn3nxf0s0hzwpdrw14pl6kd8w2ss25gvw2k1"))))
486 (build-system trivial-build-system)
488 `(#:modules ((guix build utils))
490 (use-modules (guix build utils))
491 (let* ((source (assoc-ref %build-inputs "source"))
492 (output (assoc-ref %outputs "out"))
493 (bindir (string-append output "/bin")))
494 (install-file (string-append source "/git-remote-gcrypt")
497 (home-page "https://spwhitton.name/tech/code/git-remote-gcrypt/")
498 (synopsis "Whole remote repository encryption")
499 (description "git-remote-gcrypt is a Git remote helper to push and pull from
500 repositories encrypted with GnuPG. It works with the standard Git transports,
501 including repository hosting services like GitLab.
503 Remote helper programs are invoked by Git to handle network transport. This
504 helper handles @code{gcrypt:} URLs that access a remote repository encrypted
505 with GPG, using our custom format.
507 Supported locations are local, @code{rsync://} and @code{sftp://}, where the
508 repository is stored as a set of files, or instead any Git URL where gcrypt
509 will store the same representation in a Git repository, bridged over arbitrary
512 The aim is to provide confidential, authenticated Git storage and
513 collaboration using typical untrusted file hosts or services.")
514 (license license:gpl3+)))
519 ;; XXX When updating cgit, try removing the special 'git:src' input and
520 ;; using the source of the git package.
525 "https://git.zx2c4.com/cgit/snapshot/cgit-"
529 "142qcgs8dwnzhymn0a7xx47p9fc2z5wrb86ah4a9iz0mpqlsz288"))))
530 (build-system gnu-build-system)
532 '(#:tests? #f ; XXX: fail to build the in-source git.
534 #:make-flags '("CC=gcc" "SHELL_PATH=sh")
536 (modify-phases %standard-phases
537 (add-after 'unpack 'unpack-git
538 (lambda* (#:key inputs #:allow-other-keys)
539 ;; Unpack the source of git into the 'git' directory.
541 "tar" "--strip-components=1" "-C" "git" "-xf"
542 (assoc-ref inputs "git:src")))))
543 (add-after 'unpack 'patch-absolute-file-names
544 (lambda* (#:key inputs #:allow-other-keys)
545 (define (quoted-file-name input path)
546 (string-append "\"" input path "\""))
547 (substitute* "ui-snapshot.c"
549 (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
551 (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
553 (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
555 (delete 'configure) ; no configure script
556 (add-after 'build 'build-man
557 (lambda* (#:key make-flags #:allow-other-keys)
558 (zero? (apply system* `("make" ,@make-flags "doc-man")))))
560 (lambda* (#:key make-flags outputs #:allow-other-keys)
561 (let ((out (assoc-ref outputs "out")))
562 (and (zero? (apply system*
563 `("make" ,@make-flags
564 ,(string-append "prefix=" out)
566 "CGIT_SCRIPT_PATH=" out "/share/cgit")
567 "install" "install-man")))
568 ;; Move the platform-dependent 'cgit.cgi' into lib
569 ;; to get it stripped.
570 (rename-file (string-append out "/share/cgit/cgit.cgi")
571 (string-append out "/lib/cgit/cgit.cgi"))
574 ;; For building manpage.
575 `(("asciidoc" ,asciidoc)
580 `(;; Cgit directly accesses some internal Git interfaces that changed in
581 ;; Git 2.12. Try removing this special input and using the source of the
582 ;; Git package for cgit > 1.1.
586 (uri "mirror://kernel.org/software/scm/git/git-2.10.5.tar.xz")
589 "1r2aa19gnrvm2y4fqcvpw1g9l72n48axqmpgv18s6d0y2p72vhzj"))))
592 (home-page "https://git.zx2c4.com/cgit/")
593 (synopsis "Web frontend for git repositories")
595 "CGit is an attempt to create a fast web interface for the Git SCM, using
596 a built-in cache to decrease server I/O pressure.")
597 (license license:gpl2)))
599 (define-public python-ghp-import
601 (name "python-ghp-import")
607 "https://github.com/davisp/ghp-import/archive/"
609 (file-name (string-append name "-" version ".tar.gz"))
612 "0x887v690xsac2hzjkpbvp3a6crh3m08mqbk3nb4xwc9dnk869q7"))))
613 (build-system python-build-system)
615 `(#:phases (modify-phases %standard-phases
616 (add-after 'install 'install-documentation
617 (lambda* (#:key outputs #:allow-other-keys)
618 (let* ((out (assoc-ref outputs "out"))
619 (doc (string-append out "/share/doc"))
620 (licenses (string-append out "/share/licenses")))
621 (install-file "README.md" doc)
622 (install-file "LICENSE" licenses)))))))
623 (home-page "https://github.com/davisp/ghp-import")
624 (synopsis "Copy directory to the gh-pages branch")
625 (description "Script that copies a directory to the gh-pages branch (by
626 default) of the repository.")
628 ;; See <https://bugs.gnu.org/27913>.
629 (license (license:non-copyleft
630 "https://raw.githubusercontent.com/davisp/ghp-import/master/LICENSE"
631 "Tumbolia Public License"))))
633 (define-public python2-ghp-import
634 (package-with-python2
635 (strip-python2-variant python-ghp-import)))
637 (define-public python-gitdb
639 (name "python-gitdb")
643 (uri (pypi-uri "gitdb2" version))
646 "02azg62mr99b7cllyjrly77np3vw32y8nrxpa2xjapiyaga2j3mn"))))
647 (build-system python-build-system)
649 `(#:phases (modify-phases %standard-phases
650 (add-before 'check 'create-test-repository
652 (mkdir "/tmp/testrepo")
653 ;; Some tests require a git repository, so create one.
654 (with-directory-excursion "/tmp/testrepo"
655 (do ((filecount 1 (1+ filecount)))
657 (call-with-output-file (string-append
658 "file" (number->string filecount))
660 (format port "~a" filecount))))
662 (invoke "git" "init")
663 (invoke "git" "config" "user.name" "Total Git")
664 (invoke "git" "config" "user.email" "git@localhost")
665 (invoke "git" "add" "-A")
666 (invoke "git" "commit" "-q" "-m" "dummy commit")))
668 ;; The repository checkout must be a "bare" clone.
669 (invoke "git" "clone" "--bare" "/tmp/testrepo"
670 "/tmp/testrepo.git")))
673 (setenv "GITDB_TEST_GIT_REPO_BASE" "/tmp/testrepo.git")
674 ;; Skip tests that must be run from the gitdb repository.
675 (setenv "TRAVIS" "1")
676 (invoke "nosetests" "-v"))))))
678 `(("python-smmap2" ,python-smmap2)))
681 ("python-nose" ,python-nose)))
682 (home-page "https://github.com/gitpython-developers/gitdb")
683 (synopsis "Python implementation of the Git object database")
685 "GitDB allows you to access @dfn{bare} Git repositories for reading and
686 writing. It aims at allowing full access to loose objects as well as packs
687 with performance and scalability in mind. It operates exclusively on streams,
688 allowing to handle large objects with a small memory footprint.")
689 (license license:bsd-3)))
691 (define-public python2-gitdb
692 (package-with-python2 python-gitdb))
694 (define-public python-gitpython
696 (name "python-gitpython")
700 (uri (pypi-uri "GitPython" version))
703 "1sbn018mn3y2r58ix5z12na1s02ccprhckb88yq3bdddvqjvqqdd"))))
704 (build-system python-build-system)
706 `(#:tests? #f ;XXX: Tests can only be run within the GitPython repository.
707 #:phases (modify-phases %standard-phases
708 (add-after 'unpack 'embed-git-reference
709 (lambda* (#:key inputs #:allow-other-keys)
710 (substitute* "git/cmd.py"
711 (("git_exec_name = \"git\"")
712 (string-append "git_exec_name = \""
713 (assoc-ref inputs "git")
719 `(("python-gitdb" ,python-gitdb)))
721 `(("python-ddt" ,python-ddt)
722 ("python-nose" ,python-nose)))
723 (home-page "https://github.com/gitpython-developers/GitPython")
724 (synopsis "Python library for interacting with Git repositories")
726 "GitPython is a python library used to interact with Git repositories,
727 high-level like git-porcelain, or low-level like git-plumbing.
729 It provides abstractions of Git objects for easy access of repository data,
730 and additionally allows you to access the Git repository more directly using
731 either a pure Python implementation, or the faster, but more resource intensive
732 @command{git} command implementation.")
733 (license license:bsd-3)))
735 (define-public python2-gitpython
736 (package-with-python2 python-gitpython))
738 (define-public shflags
744 (uri (string-append "https://github.com/kward/shflags/archive/v"
746 (file-name (string-append name "-" version ".tar.gz"))
749 "1h9xfrwwdhzflipfwdcgcc3y7zapdslnyk1rg5y8jm7k144rfrs4"))))
750 (build-system gnu-build-system)
751 (native-inputs `(("tar" ,tar)
754 `(#:tests? #f ; no tests
756 (modify-phases %standard-phases
757 (delete 'configure) ; nothing to configure
758 (delete 'build) ; nothing to build
760 (lambda* (#:key outputs #:allow-other-keys)
761 (let* ((out (assoc-ref outputs "out"))
762 (src (string-append out "/src")))
763 (install-file "shflags" src)
765 (home-page "https://github.com/kward/shflags")
766 (synopsis "Command-line flags library for shell scripts")
768 "Shell Flags (shFlags) is a library written to greatly simplify the
769 handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
770 ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
771 different versions of getopt on various OSes make writing portable shell
772 scripts difficult. shFlags instead provides an API that doesn't change across
773 shell and OS versions so the script writer can be confident that the script
775 (license license:lgpl2.1)))
777 (define-public git-flow
780 ;; This version has not be officially released yet, so we build it
781 ;; directly from the git repository.
782 (version "0.4.2-pre")
786 (url "https://github.com/nvie/gitflow/")
787 (commit "15aab26490facf285acef56cb5d61025eacb3a69")))
790 "01fs97q76fdfnvmrh2cyjhywcs3pykf1dg58sy0frflnsdzs6prx"))))
791 (build-system gnu-build-system)
792 (inputs `(("shflags" ,shflags)))
794 '(#:tests? #f ; no tests
795 #:make-flags (list (string-append "prefix="
796 (assoc-ref %outputs "out")))
798 (modify-phases %standard-phases
799 (add-after 'unpack 'reset-shFlags-link
800 (lambda* (#:key inputs #:allow-other-keys)
801 ;; The link points to a file in the shFlags submodule.
802 ;; Redirect it to point to our system shFlags.
803 (let ((shflags (assoc-ref inputs "shflags")))
805 (delete-file "gitflow-shFlags")
806 (symlink (string-append shflags "/src/shflags")
807 "gitflow-shFlags")))))
810 (home-page "http://nvie.com/posts/a-successful-git-branching-model/")
811 (synopsis "Git extensions for Vincent Driessen's branching model")
813 "Vincent Driessen's branching model is a git branching and release
814 management strategy that helps developers keep track of features, hotfixes,
815 and releases in bigger software projects. The git-flow library of git
816 subcommands helps automate some parts of the flow to make working with it a
818 (license license:bsd-2)))
826 (uri (string-append "https://github.com/ctmarinas/stgit/archive/v"
828 (file-name (string-append name "-" version ".tar.gz"))
831 "19fk6vw3pgp2a98wpd4j3kyiyll5dy9bi4921wq1mrky0l53mj00"))))
832 (build-system python-build-system)
838 (modify-phases %standard-phases
841 ;; two tests will fail -> disable them. TODO: fix the failing tests
842 (delete-file "t/t3300-edit.sh")
843 (delete-file "t/t7504-commit-msg-hook.sh")
844 (zero? (system* "make" "test")))))))
845 (home-page "http://procode.org/stgit/")
846 (synopsis "Stacked Git")
848 "StGit is a command-line application that provides functionality similar
849 to Quilt (i.e., pushing/popping patches to/from a stack), but using Git
850 instead of @command{diff} and @command{patch}. StGit stores its patches in a
851 Git repository as normal Git commits, and provides a number of commands to
852 manipulate them in various ways.")
853 (license license:gpl2)))
858 (version "1.20151229")
861 (uri (string-append "https://github.com/RichiH/vcsh/archive/v"
863 (file-name (string-append name "-" version ".tar.gz"))
866 "1ym3swkh738c3vciffvlr96vqzhwmzkb8ajqzap8f0j9n039a1mf"))))
867 (build-system gnu-build-system)
873 ("perl-test-harness" ,perl-test-harness)
874 ("perl-shell-command" ,perl-shell-command)
875 ("perl-test-most" ,perl-test-most)))
877 '(#:phases (modify-phases %standard-phases
880 #:make-flags (list (string-append "PREFIX="
881 (assoc-ref %outputs "out")))
882 #:test-target "test"))
883 (home-page "https://github.com/RichiH/vcsh")
884 (synopsis "Version control system for @code{$HOME}")
886 "vcsh version-controls configuration files in several Git repositories,
887 all in one single directory. They all maintain their working trees without
888 clobbering each other or interfering otherwise. By default, all Git
889 repositories maintained via vcsh store the actual files in @code{$HOME},
890 though this can be overridden.")
891 (license license:gpl2+)))
893 (define-public git-test-sequence
894 (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76"))
896 (name "git-test-sequence")
897 (version (string-append "20140312." (string-take commit 7)))
901 ;; There are many other scripts in this directory; we
902 ;; are interested in just one for this package.
903 (url "https://github.com/dustin/bindir")
907 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
908 (build-system trivial-build-system)
910 `(#:modules ((guix build utils))
912 (use-modules (guix build utils))
913 (let* ((source (assoc-ref %build-inputs "source"))
914 (output (assoc-ref %outputs "out"))
915 (bindir (string-append output "/bin"))
916 (script "git-test-sequence"))
917 (install-file (string-append source "/" script)
920 (home-page "http://dustin.sallings.org/2010/03/28/git-test-sequence.html")
921 (synopsis "Run a command over a sequence of commits")
923 "git-test-sequence is similar to an automated git bisect except it’s
924 linear. It will test every change between two points in the DAG. It will
925 also walk each side of a merge and test those changes individually.")
926 (license (license:x11-style "file://LICENSE")))))
928 (define-public gitolite
935 "https://github.com/sitaramc/gitolite/archive/v"
937 (file-name (string-append name "-" version ".tar.gz"))
940 "1idxipg0df80bhjcxgwxs3lllqnkvhwpinmfv1xvg1l98fxiapgp"))))
941 (build-system gnu-build-system)
943 '(#:tests? #f ; no tests
944 #:phases (modify-phases %standard-phases
947 (add-before 'install 'patch-scripts
948 (lambda* (#:key inputs #:allow-other-keys)
949 (let ((perl (string-append (assoc-ref inputs "perl")
951 ;; This seems to take care of every shell script that
953 (substitute* (find-files "." ".*")
955 (string-append " " perl " -")))
957 ;; Avoid references to the store in authorized_keys.
958 ;; This works because gitolite-shell is in the PATH.
959 (substitute* "src/triggers/post-compile/ssh-authkeys"
960 (("\\$glshell \\$user")
961 "gitolite-shell $user"))
964 (lambda* (#:key outputs #:allow-other-keys)
965 (let* ((output (assoc-ref outputs "out"))
966 (sharedir (string-append output "/share/gitolite"))
967 (bindir (string-append output "/bin")))
970 (invoke "./install" "-to" sharedir)
971 ;; Create symlinks for executable scripts in /bin.
972 (for-each (lambda (script)
973 (symlink (string-append sharedir "/" script)
974 (string-append bindir "/" script)))
975 '("gitolite" "gitolite-shell"))
979 ;; git and openssh are propagated because trying to patch the source via
980 ;; regexp matching is too brittle and prone to false positives.
983 ("openssh" ,openssh)))
984 (home-page "http://gitolite.com")
985 (synopsis "Git access control layer")
987 "Gitolite is an access control layer on top of Git, providing fine access
988 control to Git repositories.")
989 (license license:gpl2)))
991 (define-public mercurial
997 (uri (string-append "https://www.mercurial-scm.org/"
998 "release/mercurial-" version ".tar.gz"))
1001 "0ik2ypzxjr6vpcghxvn39a73gw52629n7vwak04gnbycsq95aalg"))))
1002 (build-system python-build-system)
1004 `(;; Restrict to Python 2, as Python 3 would require
1005 ;; the argument --c2to3.
1007 ;; FIXME: Disabled tests because they require the nose unit
1008 ;; testing framework: https://nose.readthedocs.org/en/latest/ .
1010 (home-page "https://www.mercurial-scm.org/")
1011 (synopsis "Decentralized version control system")
1013 "Mercurial is a free, distributed source control management tool.
1014 It efficiently handles projects of any size
1015 and offers an easy and intuitive interface.")
1016 (license license:gpl2+)))
1024 (uri (string-append "http://www.webdav.org/neon/neon-"
1028 "1jpvczcx658vimqm7c8my2q41fnmjaf1j03g7bsli6rjxk6xh2yv"))))
1029 (build-system gnu-build-system)
1032 ("pkg-config" ,pkg-config)))
1034 `(("libxml2" ,libxml2)
1035 ("openssl" ,openssl)
1038 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
1039 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
1041 #:configure-flags '("--enable-shared"
1042 ;; requires libgnutils-config, deprecated
1044 ; "--with-ssl=gnutls")))
1045 "--with-ssl=openssl")))
1046 (home-page "http://www.webdav.org/neon/")
1047 (synopsis "HTTP and WebDAV client library")
1049 "Neon is an HTTP and WebDAV client library, with a C interface and the
1052 @item High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
1054 @item low-level interface to the HTTP request/response engine, allowing the use
1055 of arbitrary HTTP methods, headers, etc.;
1056 @item authentication support including Basic and Digest support, along with
1057 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
1058 @item SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
1059 verifying server certificates, handling client certificates, and examining
1060 certificate properties, smartcard-based client certificates are also
1061 supported via a PKCS#11 wrapper interface;
1062 @item abstract interface to parsing XML using libxml2 or expat, and wrappers for
1063 simplifying handling XML HTTP response bodies;
1064 @item WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
1065 property manipulation.
1067 (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+
1069 (define-public subversion
1077 (string-append "https://archive.apache.org/dist/subversion/"
1078 "subversion-" version ".tar.bz2")
1079 (string-append "https://www-eu.apache.org/dist/subversion/"
1080 "subversion-" version ".tar.bz2")))
1083 "1gp6426gkdza6ni2whgifjcmjb4nq34ljy07yxkrhlarvfq6ks2n"))))
1084 (build-system gnu-build-system)
1087 (modify-phases %standard-phases
1088 (add-after 'configure 'patch-libtool-wrapper-ls
1089 (lambda* (#:key inputs #:allow-other-keys)
1090 ;; This substitution allows tests svnauthz_tests and svnlook_tests
1091 ;; to pass. These tests execute svnauthz and svnlook through
1092 ;; their libtool wrapper scripts from svn hooks, whose empty
1093 ;; environments cause "ls: command not found" errors. It would be
1094 ;; nice if this fix ultimately made its way into libtool.
1095 (let ((coreutils (assoc-ref inputs "coreutils")))
1096 (substitute* "libtool"
1097 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))
1099 (add-after 'install 'install-perl-bindings
1100 (lambda* (#:key outputs #:allow-other-keys)
1101 ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
1102 (let ((out (assoc-ref outputs "out")))
1103 (and (zero? (system* "make" "swig-pl-lib"))
1104 ;; FIXME: Test failures.
1105 ;; (zero? (system* "make" "check-swig-pl"))
1106 (zero? (system* "make" "install-swig-pl-lib"))
1108 ;; Set the right installation prefix.
1109 (with-directory-excursion
1110 "subversion/bindings/swig/perl/native"
1112 (system* "perl" "Makefile.PL"
1114 (string-append "PREFIX=" out)))
1116 (system* "make" "install"
1117 (string-append "OTHERLDFLAGS="
1119 out "/lib"))))))))))))
1121 `(("pkg-config" ,pkg-config)
1122 ;; For the Perl bindings.
1126 ("apr-util" ,apr-util)
1129 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
1132 (home-page "https://subversion.apache.org/")
1133 (synopsis "Revision control system")
1135 "Subversion exists to be universally recognized and adopted as a
1136 centralized version control system characterized by its
1137 reliability as a safe haven for valuable data; the simplicity of its model and
1138 usage; and its ability to support the needs of a wide variety of users and
1139 projects, from individuals to large-scale enterprise operations.")
1140 (license license:asl2.0)))
1148 (uri (string-append "mirror://gnu/rcs/rcs-"
1152 "1zsx7bb0rgvvvisiy4zlixf56ay8wbd9qqqcp1a1g0m1gl6mlg86"))
1153 (patches (search-patches "rcs-5.9.4-noreturn.patch"))))
1154 (build-system gnu-build-system)
1155 (native-inputs `(("ed" ,ed)))
1156 (home-page "https://www.gnu.org/software/rcs/")
1157 (synopsis "Per-file local revision control system")
1159 "RCS is the original Revision Control System. It works on a
1160 file-by-file basis, in contrast to subsequent version control systems such as
1161 CVS, Subversion, and Git. This can make it suitable for system
1162 administration files, for example, which are often inherently local to one
1164 (license license:gpl3+)))
1173 "https://ftp.gnu.org/non-gnu/cvs/source/feature/"
1174 version "/cvs-" version ".tar.bz2"))
1175 (patches (search-patches "cvs-2017-12836.patch"))
1178 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
1179 (build-system gnu-build-system)
1181 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
1183 #:configure-flags (list "--with-external-zlib")))
1184 (inputs `(("zlib" ,zlib)
1185 ("nano" ,nano))) ; the default editor
1186 (home-page "http://cvs.nongnu.org")
1187 (synopsis "Historical centralized version control system")
1189 "CVS is a version control system, an important component of Source
1190 Configuration Management (SCM). Using it, you can record the history of
1191 sources files, and documents. It fills a similar role to the free software
1192 RCS, PRCS, and Aegis packages.")
1193 (license license:gpl1+)))
1195 (define-public cvs-fast-export
1197 (name "cvs-fast-export")
1201 (uri (string-append "http://www.catb.org/~esr/"
1202 name "/" name "-" version ".tar.gz"))
1205 "17xp5q4cxmd6z0ii1fdr4j1djb9mz1qv7hzr6fawdapjzahi65m3"))))
1206 (build-system gnu-build-system)
1209 (modify-phases %standard-phases
1211 (add-after 'unpack 'remove-optimizations
1213 ;; Don't optimize for a specific processor architecture.
1214 (substitute* "Makefile"
1215 (("CFLAGS \\+= -march=native") ""))
1216 ;; This code runs with Python2 or Python3
1217 (substitute* "cvsreduce"
1218 (("python3") "python"))
1220 #:parallel-build? #f ; parallel a2x commands fail spectacularly
1222 (list "CC=gcc" (string-append "prefix?=" (assoc-ref %outputs "out")))))
1223 (inputs `(("git" ,git)))
1224 (native-inputs `(("asciidoc" ,asciidoc)
1225 ;; These are needed for the tests.
1227 ("python" ,python-2)
1229 (home-page "http://www.catb.org/esr/cvs-fast-export/")
1230 (synopsis "Export an RCS or CVS history as a fast-import stream")
1231 (description "This program analyzes a collection of RCS files in a CVS
1232 repository (or outside of one) and, when possible, emits an equivalent history
1233 in the form of a fast-import stream. Not all possible histories can be
1234 rendered this way; the program tries to emit useful warnings when it can't.
1236 The program can also produce a visualization of the resulting commit directed
1237 acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org,
1238 Graphviz}. The package also includes @command{cvssync}, a tool for mirroring
1239 masters from remote CVS hosts.")
1240 (license license:gpl2+)))
1242 (define-public vc-dwim
1248 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
1252 "0d5sqafc40l878m8wjr35jxmalj4kam1m6ph60v08ng4ml5g7931"))))
1253 (build-system gnu-build-system)
1254 (inputs `(("perl" ,perl)
1255 ("inetutils" ,inetutils))) ; for `hostname', used in the tests
1256 (native-inputs `(("emacs" ,emacs-minimal))) ; for `ctags'
1257 (home-page "https://www.gnu.org/software/vc-dwim/")
1258 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
1260 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
1261 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
1262 using version control at the same time, for example by printing a reminder
1263 when a file change has been described in the ChangeLog but the file has not
1264 been added to the VC. vc-chlog scans changed files and generates
1265 standards-compliant ChangeLog entries based on the changes that it detects.")
1266 (license license:gpl3+)))
1268 (define-public diffstat
1276 (string-append "ftp://invisible-island.net/diffstat/"
1277 name "-" version ".tgz")
1278 (string-append "http://invisible-mirror.net/archives/diffstat/"
1279 name "-" version ".tgz")))
1282 "1vjmda2zfjxg0qkaj8hfqa8g6bfwnn1ja8696rxrjgqq4w69wd95"))))
1283 (build-system gnu-build-system)
1284 (home-page "https://invisible-island.net/diffstat/")
1285 (synopsis "Make histograms from the output of @command{diff}")
1287 "Diffstat reads the output of @command{diff} and displays a histogram of
1288 the insertions, deletions, and modifications per file. It is useful for
1289 reviewing large, complex patch files.")
1290 (license (license:x11-style "file://COPYING"))))
1298 (uri (string-append "mirror://gnu/" name "/CSSC-"
1302 "15191dh8hr46cvssmv4v52gymiiyk6ca9j1bfimlqakcqab6y51h"))))
1303 (build-system gnu-build-system)
1306 (modify-phases %standard-phases
1307 (add-before 'check 'precheck
1310 (substitute* "tests/common/test-common"
1311 (("/bin/pwd") (which "pwd")))
1313 (substitute* "tests/prt/all-512.sh"
1314 (("/bin/sh") (which "sh")))
1316 ;; XXX: This test has no hope of passing until there is a "nogroup"
1317 ;; entry (or at least some group to which the guix builder does
1318 ;; not belong) in the /etc/group file of the build environment.
1319 ;; Currently we do not have such a group. Disable this test for now.
1320 (substitute* "tests/Makefile"
1321 (("test-delta ") ""))))))))
1322 ;; These are needed for the tests
1323 (native-inputs `(("git" ,git)
1325 (home-page "https://www.gnu.org/software/cssc/")
1326 (synopsis "File-based version control like SCCS")
1327 (description "GNU CSSC provides a replacement for the legacy Unix source
1328 code control system SCCS. This allows old code still under that system to be
1329 accessed and migrated on modern systems.")
1330 (license license:gpl3+)))
1332 ;; This package can unfortunately work only in -TEST mode, since Aegis
1333 ;; requires that it is installed setuid root.
1334 (define-public aegis
1340 (uri (string-append "mirror://sourceforge/aegis/aegis/" version
1341 "/aegis-" version ".tar.gz"))
1344 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
1345 (patches (search-patches "aegis-perl-tempdir1.patch"
1346 "aegis-perl-tempdir2.patch"
1347 "aegis-test-fixup-1.patch"
1348 "aegis-test-fixup-2.patch"
1349 "aegis-constness-error.patch"))))
1350 (build-system gnu-build-system)
1352 `(("e2fsprogs" ,e2fsprogs)
1355 ("libxml2" ,libxml2)
1357 ("gettext" ,gettext-minimal)))
1362 ;; Various tests require the following:
1366 ("subversion" ,subversion)
1370 `(#:configure-flags (list "--with-no-aegis-configured"
1371 "--sharedstatedir=/var/com/aegis")
1372 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
1374 (modify-phases %standard-phases
1375 (add-before 'configure 'pre-conf
1377 (substitute* (append '("configure"
1378 "etc/check-tar-gz.sh"
1382 "script/aebisect.in"
1383 "script/aeintegratq.in"
1385 "script/test_funcs.in"
1386 "web/eg_oss_templ.sh"
1388 "libaegis/getpw_cache.cc")
1389 (find-files "test" "\\.sh"))
1390 (("/bin/sh") (which "sh")))
1391 (setenv "SH" (which "sh"))))
1394 (let ((home (string-append (getcwd) "/my-new-home")))
1395 ;; Some tests need to write to $HOME.
1397 (setenv "HOME" home)
1399 ;; This test assumes that flex has been symlinked to "lex".
1400 (substitute* "test/00/t0011a.sh"
1401 (("type lex") "type flex"))
1403 ;; The author decided to call the check rule "sure".
1404 (zero? (system* "make" "sure"))))))))
1405 (home-page "http://aegis.sourceforge.net")
1406 (synopsis "Project change supervisor")
1407 (description "Aegis is a project change supervisor, and performs some of
1408 the Software Configuration Management needed in a CASE environment. Aegis
1409 provides a framework within which a team of developers may work on many
1410 changes to a program independently, and Aegis coordinates integrating these
1411 changes back into the master source of the program, with as little disruption
1412 as possible. Resolution of contention for source files, a major headache for
1413 any project with more than one developer, is one of Aegis's major functions.")
1414 (license license:gpl3+)))
1416 (define-public reposurgeon
1418 (name "reposurgeon")
1422 (uri (string-append "http://www.catb.org/~esr/" name "/"
1423 name "-" version ".tar.xz"))
1426 "1af0z14wcm4bk5a9ysinbwq2fp3lf5f7i8mvwh7286hr3fnagcaz"))
1427 (patches (search-patches
1428 "reposurgeon-add-missing-docbook-files.patch"))))
1429 (build-system gnu-build-system)
1433 (string-append "target=" (assoc-ref %outputs "out")))
1435 (modify-phases %standard-phases
1436 (add-after 'unpack 'patch-inputs
1437 (lambda* (#:key inputs #:allow-other-keys)
1438 (let ((tzdata (assoc-ref inputs "tzdata")))
1439 (substitute* "reposurgeon"
1440 (("/usr/share/zoneinfo")
1441 (string-append tzdata "/share/zoneinfo")))
1442 (substitute* "test/svn-to-svn"
1443 (("/bin/echo") "echo"))
1445 (delete 'configure) ; no configure script
1446 (add-before 'build 'fix-docbook
1447 (lambda* (#:key inputs #:allow-other-keys)
1448 (substitute* (find-files "." "\\.xml$")
1449 (("docbook/docbookx.dtd")
1450 (string-append (assoc-ref inputs "docbook-xml")
1451 "/xml/dtd/docbook/docbookx.dtd")))
1453 (add-before 'check 'set-up-test-environment
1454 (lambda* (#:key inputs #:allow-other-keys)
1455 (let ((tzdata (assoc-ref inputs "tzdata")))
1456 (setenv "TZDIR" (string-append tzdata "/share/zoneinfo"))
1458 (add-after 'install 'install-emacs-data
1459 (lambda* (#:key outputs #:allow-other-keys)
1460 (install-file "reposurgeon-mode.el"
1461 (string-append (assoc-ref outputs "out")
1462 "/share/emacs/site-lisp")))))))
1464 `(("python" ,python-wrapper)
1465 ("tzdata" ,tzdata)))
1467 `( ;; For building documentation.
1468 ("asciidoc" ,asciidoc)
1469 ("docbook-xml" ,docbook-xml)
1470 ("docbook-xsl" ,docbook-xsl)
1471 ("libxml2" ,libxml2)
1477 ("mercurial" ,mercurial)
1478 ("subversion" ,subversion)))
1479 (home-page "http://www.catb.org/~esr/reposurgeon/")
1480 (synopsis "Edit version-control repository history")
1481 (description "Reposurgeon enables risky operations that version-control
1482 systems don't want to let you do, such as editing past comments and metadata
1483 and removing commits. It works with any version control system that can
1484 export and import Git fast-import streams, including Git, Mercurial, Fossil,
1485 Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly
1486 and can thus be used to script production of very high-quality conversions
1487 from Subversion to any supported Distributed Version Control System (DVCS).")
1488 ;; Most files are distributed under bsd-2, except 'repocutter' which is
1490 (license (list license:bsd-2 license:bsd-3))))
1499 "https://github.com/jonas/tig/releases/download/tig-"
1500 version "/tig-" version ".tar.gz"))
1503 "1skbhhj1narsnsff1azdylcy6xghxb18mzqysmipcyyvlv2i17fk"))))
1504 (build-system gnu-build-system)
1506 `(("asciidoc" ,asciidoc)
1509 `(("ncurses" ,ncurses)
1510 ("readline" ,readline)))
1513 (modify-phases %standard-phases
1514 (add-after 'install 'install-doc
1516 (invoke "make" "install-doc"))))
1517 #:tests? #f)) ; tests require access to /dev/tty
1518 ;; #:test-target "test"))
1519 (home-page "https://jonas.github.io/tig/")
1520 (synopsis "Ncurses-based text user interface for Git")
1522 "Tig is an ncurses text user interface for Git, primarily intended as
1523 a history browser. It can also stage hunks for commit, or colorize the
1524 output of the 'git' command.")
1525 (license license:gpl2+)))
1527 (define-public findnewest
1534 "https://github.com/0-wiz-0/findnewest/archive/findnewest-"
1538 "1ydis4y0amkgfr4y60sn076f1l41ya2kn89kfd9fqf44f9ccgb5r"))))
1539 (build-system gnu-build-system)
1541 '(#:phases (modify-phases %standard-phases
1542 (add-after 'unpack 'bootstrap
1544 (zero? (system* "autoreconf" "-vfi")))))))
1545 (native-inputs `(("autoconf" ,autoconf)
1546 ("automake" ,automake)))
1547 (home-page "https://github.com/0-wiz-0/findnewest/releases")
1548 (synopsis "Print the modification time of the latest file")
1550 "Recursively find the newest file in a file tree and print its
1551 modification time.")
1552 (license license:bsd-2)))
1554 (define-public myrepos
1557 (version "1.20171231")
1562 (url "git://myrepos.branchable.com/myrepos")
1564 (file-name (string-append name "-" version "-checkout"))
1566 (base32 "10q7lpx152xnkk701fscn4dq99q9znnmv3bc2482khhjg7z8rps0"))))
1567 (build-system gnu-build-system)
1571 '(#:test-target "test"
1572 #:phases (modify-phases %standard-phases (delete 'configure))
1573 #:make-flags (list (string-append "PREFIX=" %output))))
1574 (home-page "https://myrepos.branchable.com/")
1575 (synopsis "Multiple repository management tool")
1577 "Myrepos provides the @code{mr} command, which maps an operation (e.g.,
1578 fetching updates) over a collection of version control repositories. It
1579 supports a large number of version control systems: Git, Subversion,
1580 Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
1581 (license license:gpl2+)))
1583 (define-public git-annex-remote-hubic
1585 (name "git-annex-remote-hubic")
1590 "https://github.com/Schnouki/" name "/archive/v"
1592 (file-name (string-append name "-" version ".tar.gz"))
1595 "196g3jkaybjx11nbr51n0cjps3wjzb145ab76y717diqvvxp5v4r"))))
1596 (build-system python-build-system)
1597 (arguments `(#:python ,python-2))
1600 ("python2-six" ,python2-six)))
1602 `(("python2-dateutil" ,python2-dateutil)
1603 ("python2-futures" ,python2-futures)
1604 ("python2-rauth" ,python2-rauth)
1605 ("python2-swiftclient" ,python2-swiftclient)))
1606 (home-page "https://github.com/Schnouki/git-annex-remote-hubic/")
1607 (synopsis "Use hubic as a git-annex remote")
1609 "This package allows you to use your hubic account as a \"special
1610 repository\" with git-annex.")
1611 (license license:gpl3+)))
1613 (define-public fossil
1620 ;; Older downloads are moved to another URL.
1623 "https://www.fossil-scm.org/index.html/uv/download/"
1624 "fossil-src-" version ".tar.gz")
1626 "https://www.fossil-scm.org/index.html/uv/"
1627 "fossil-src-" version ".tar.gz")))
1630 "0add35lk2ac4qg29d7ygj7pskv8lfln33f3kgf6x3548msv9hd6j"))))
1631 (build-system gnu-build-system)
1633 `(("tcl" ,tcl) ;for configuration only
1634 ("which" ,which) ;for tests only
1637 `(("openssl" ,openssl)
1639 ("sqlite" ,sqlite)))
1641 `(#:configure-flags (list "--with-openssl=auto"
1642 "--disable-internal-sqlite")
1643 #:test-target "test"
1644 #:phases (modify-phases %standard-phases
1646 (lambda* (#:key outputs (configure-flags '())
1648 ;; The 'configure' script is not an autoconf script and
1649 ;; chokes on unrecognized options.
1652 (string-append "--prefix="
1653 (assoc-ref outputs "out"))
1656 (add-before 'check 'test-setup
1658 (setenv "USER" "guix")
1661 (home-page "https://fossil-scm.org")
1662 (synopsis "Software configuration management system")
1664 "Fossil is a distributed source control management system which supports
1665 access and administration over HTTP CGI or via a built-in HTTP server. It has
1666 a built-in wiki, built-in file browsing, built-in tickets system, etc.")
1667 (license (list license:public-domain ;src/miniz.c, src/shell.c
1670 (define-public stagit
1676 (uri (string-append "https://dl.2f30.org/releases/"
1677 name "-" version ".tar.gz"))
1680 "1m3s9g1z9szbjrhm8sic91xh6f2bfpi56rskdkqd5wc4wdycpyi5"))))
1681 (build-system gnu-build-system)
1683 `(#:tests? #f ; No tests
1684 #:make-flags (list "CC=gcc"
1685 (string-append "PREFIX=" %output))
1687 (modify-phases %standard-phases
1688 (delete 'configure)))) ; No configure script
1690 `(("libgit2" ,libgit2)))
1691 (home-page "https://2f30.org/")
1692 (synopsis "Static git page generator")
1693 (description "Stagit creates static pages for git repositories, the results can
1694 be served with a HTTP file server of your choice.")
1695 (license license:expat)))
1697 ;; Darcs has no https support: http://irclog.perlgeek.de/darcs/2016-09-17
1698 ;; http://darcs.net/manual/Configuring_darcs.html#SECTION00440070000000000000
1699 ;; and results of search engines will show that if the protocol is http, https
1700 ;; is never mentioned.
1701 (define-public darcs
1708 (uri (string-append "https://hackage.haskell.org/package/darcs/"
1709 "darcs-" version ".tar.gz"))
1712 "0lrm0sal5pl453mkqn8b9fc9l7lwinc140iqihya9g17bk408nrm"))
1713 (modules '((guix build utils)))
1714 ;; Remove time-dependent code for reproducibility.
1717 (substitute* "darcs/darcs.hs"
1718 (("__DATE__") "\"1970-01-01\"")
1719 (("__TIME__") "\"00:00:00\""))
1720 (substitute* "src/impossible.h"
1721 (("__DATE__") "\"\"")
1722 (("__TIME__") "\"\""))))))
1723 (build-system haskell-build-system)
1725 `(#:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
1726 "-fnetwork-uri" "-fhttp" "--flag=executable"
1728 "--allow-newer=shelly")
1729 ;; FIXME: darcs is not compatible with the latest QuickCheck
1732 `(("ghc-cmdargs" ,ghc-cmdargs)
1733 ("ghc-split" ,ghc-split)
1734 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
1735 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
1736 ("ghc-test-framework" ,ghc-test-framework)
1737 ("ghc-quickcheck" ,ghc-quickcheck)
1738 ("ghc-findbin" ,ghc-findbin)
1739 ("ghc-hunit" ,ghc-hunit)
1740 ("ghc-array" ,ghc-array)
1741 ("ghc-async" ,ghc-async)
1742 ("ghc-attoparsec" ,ghc-attoparsec)
1743 ("ghc-base16-bytestring" ,ghc-base16-bytestring)
1744 ("ghc-binary" ,ghc-binary)
1745 ("ghc-bytestring-builder" ,ghc-bytestring-builder)
1746 ("ghc-cryptohash" ,ghc-cryptohash)
1747 ("ghc-data-ordlist" ,ghc-data-ordlist)
1748 ("ghc-fgl" ,ghc-fgl)
1749 ("ghc-system-filepath" ,ghc-system-filepath)
1750 ("ghc-graphviz" ,ghc-graphviz)
1751 ("ghc-hashable" ,ghc-hashable)
1752 ("ghc-haskeline" ,ghc-haskeline)
1753 ("ghc-html" ,ghc-html)
1754 ("ghc-mmap" ,ghc-mmap)
1755 ("ghc-mtl" ,ghc-mtl)
1756 ("ghc-old-time" ,ghc-old-time)
1757 ("ghc-parsec" ,ghc-parsec)
1758 ("ghc-random" ,ghc-random)
1759 ("ghc-regex-applicative" ,ghc-regex-applicative)
1760 ("ghc-regex-compat-tdfa" ,ghc-regex-compat-tdfa)
1761 ("ghc-sandi" ,ghc-sandi)
1762 ("ghc-shelly" ,ghc-shelly)
1763 ("ghc-tar" ,ghc-tar)
1764 ("ghc-transformers-compat" ,ghc-transformers-compat)
1765 ("ghc-unix-compat" ,ghc-unix-compat)
1766 ("ghc-utf8-string" ,ghc-utf8-string)
1767 ("ghc-vector" ,ghc-vector)
1768 ("ghc-zip-archive" ,ghc-zip-archive)
1769 ("ghc-zlib" ,ghc-zlib)
1770 ("ghc-http" ,ghc-http)
1773 ("ncurses" ,ncurses)
1775 ("libiconv" ,libiconv)
1776 ("ghc-network" ,ghc-network)
1777 ("ghc-network-uri" ,ghc-network-uri)))
1779 `(("pkg-config" ,pkg-config)))
1780 (home-page "http://darcs.net")
1781 (synopsis "Distributed Revision Control System")
1783 "Darcs is a revision control system. It is:
1786 @item Distributed: Every user has access to the full command set, removing boundaries
1787 between server and client or committer and non-committers.
1788 @item Interactive: Darcs is easy to learn and efficient to use because it asks you
1789 questions in response to simple commands, giving you choices in your work flow.
1790 You can choose to record one change in a file, while ignoring another. As you update
1791 from upstream, you can review each patch name, even the full diff for interesting
1793 @item Smart: Originally developed by physicist David Roundy, darcs is based on a
1794 unique algebra of patches called @url{http://darcs.net/Theory,Patchtheory}.
1796 (license license:gpl2)))
1798 (define-public java-jgit
1801 (version "4.7.0.201704051617-r")
1804 (uri (string-append "https://repo1.maven.org/maven2/"
1805 "org/eclipse/jgit/org.eclipse.jgit/"
1806 version "/org.eclipse.jgit-"
1807 version "-sources.jar"))
1810 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
1811 (build-system ant-build-system)
1813 `(#:tests? #f ; There are no tests to run.
1814 #:jar-name "jgit.jar"
1815 ;; JGit must be built with a JDK supporting Java 8.
1817 ;; Target our older default JDK.
1818 #:make-flags (list "-Dtarget=1.7")
1820 (modify-phases %standard-phases
1821 ;; The jar file generated by the default build.xml does not include
1822 ;; the text properties files, so we need to add them.
1823 (add-after 'build 'add-properties
1824 (lambda* (#:key jar-name #:allow-other-keys)
1825 (with-directory-excursion "src"
1826 (zero? (apply system* "jar" "-uf"
1827 (string-append "../build/jar/" jar-name)
1828 (find-files "." "\\.properties$")))))))))
1830 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
1831 ("java-javaewah" ,java-javaewah)
1832 ("java-jsch" ,java-jsch)
1833 ("java-slf4j-api" ,java-slf4j-api)))
1834 (home-page "https://eclipse.org/jgit/")
1835 (synopsis "Java library implementing the Git version control system")
1836 (description "JGit is a lightweight, pure Java library implementing the
1837 Git version control system, providing repository access routines, support for
1838 network protocols, and core version control algorithms.")
1839 (license license:edl1.0)))
1841 ;; For axoloti. This package can still be built with icedtea-7, which is
1842 ;; currently used as the default JDK.
1843 (define-public java-jgit-4.2
1844 (package (inherit java-jgit)
1845 (version "4.2.0.201601211800-r")
1848 (uri (string-append "https://repo1.maven.org/maven2/"
1849 "org/eclipse/jgit/org.eclipse.jgit/"
1850 version "/org.eclipse.jgit-"
1851 version "-sources.jar"))
1854 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
1855 (build-system ant-build-system)
1857 (substitute-keyword-arguments (package-arguments java-jgit)
1858 ;; Build for default JDK.
1859 ((#:jdk _) icedtea-7)
1861 `(modify-phases ,phases
1862 (add-after 'unpack 'use-latest-javaewah-API
1864 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
1865 (("wordinbits") "WORD_IN_BITS"))
1868 `(("java-javaewah" ,java-javaewah)
1869 ("java-jsch" ,java-jsch)
1870 ("java-slf4j-api" ,java-slf4j-api)))))
1872 (define-public gource
1879 "https://github.com/acaudwell/Gource/releases/download"
1880 "/gource-" version "/gource-" version ".tar.gz"))
1883 "04qxcm05qiyr9rg2kv6abfy7kkzqr8ziw4iyp1d14lniv93m61dp"))))
1884 (build-system gnu-build-system)
1887 (list (string-append "--with-boost-libdir="
1888 (assoc-ref %build-inputs "boost")
1891 `(("pkg-config" ,pkg-config)))
1901 ("sdl-union" ,(sdl-union (list sdl2 sdl2-image)))))
1902 (home-page "http://gource.io/")
1903 (synopsis "3D visualisation tool for source control repositories")
1904 (description "@code{gource} provides a software version control
1905 visualization. The repository is displayed as a tree where the root of the
1906 repository is the centre, directories are branches and files are leaves.
1907 Contributors to the source code appear and disappear as they contribute to
1908 specific files and directories.")
1909 (license license:gpl3+)))