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, 2019, 2020 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, 2019 Eric Bavier <bavier@member.fsf.org>
9 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
10 ;;; Copyright © 2015, 2018 Kyle Meyer <kyle@kyleam.com>
11 ;;; Copyright © 2015, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
13 ;;; Copyright © 2016, 2017, 2018 Nikita <nikita@n0.is>
14 ;;; Copyright © 2017, 2018, 2019, 2020 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, 2020 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
20 ;;; Copyright © 2017, 2020 Oleg Pykhalov <go.wigust@gmail.com>
21 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
22 ;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
23 ;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com>
24 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
25 ;;; Copyright © 2019 Jovany Leandro G.C <bit4bit@riseup.net>
26 ;;; Copyright © 2019 Kei Kebreau <kkebreau@posteo.net>
27 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
28 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
29 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
30 ;;; Copyright © 2020 John D. Boy <jboy@bius.moe>
31 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
32 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
34 ;;; This file is part of GNU Guix.
36 ;;; GNU Guix is free software; you can redistribute it and/or modify it
37 ;;; under the terms of the GNU General Public License as published by
38 ;;; the Free Software Foundation; either version 3 of the License, or (at
39 ;;; your option) any later version.
41 ;;; GNU Guix is distributed in the hope that it will be useful, but
42 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
43 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44 ;;; GNU General Public License for more details.
46 ;;; You should have received a copy of the GNU General Public License
47 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49 (define-module (gnu packages version-control)
50 #:use-module ((guix licenses) #:prefix license:)
51 #:use-module (guix utils)
52 #:use-module (guix packages)
53 #:use-module (guix download)
54 #:use-module (guix git-download)
55 #:use-module (guix build-system cmake)
56 #:use-module (guix build-system gnu)
57 #:use-module (guix build-system go)
58 #:use-module (guix build-system perl)
59 #:use-module (guix build-system python)
60 #:use-module (guix build-system trivial)
61 #:use-module (gnu packages apr)
62 #:use-module (gnu packages autotools)
63 #:use-module (gnu packages documentation)
64 #:use-module (gnu packages base)
65 #:use-module (gnu packages bash)
66 #:use-module (gnu packages bison)
67 #:use-module (gnu packages boost)
68 #:use-module (gnu packages check)
69 #:use-module (gnu packages cook)
70 #:use-module (gnu packages curl)
71 #:use-module (gnu packages docbook)
72 #:use-module (gnu packages ed)
73 #:use-module (gnu packages file)
74 #:use-module (gnu packages flex)
75 #:use-module (gnu packages gettext)
76 #:use-module (gnu packages gl)
77 #:use-module (gnu packages groff)
78 #:use-module (gnu packages guile)
79 #:use-module (gnu packages image)
80 #:use-module (gnu packages linux)
81 #:use-module (gnu packages mail)
82 #:use-module (gnu packages maths)
83 #:use-module (gnu packages nano)
84 #:use-module (gnu packages ncurses)
85 #:use-module (gnu packages ssh)
86 #:use-module (gnu packages web)
87 #:use-module (gnu packages openstack)
88 #:use-module (gnu packages pcre)
89 #:use-module (gnu packages perl)
90 #:use-module (gnu packages perl-check)
91 #:use-module (gnu packages pkg-config)
92 #:use-module (gnu packages python)
93 #:use-module (gnu packages python-web)
94 #:use-module (gnu packages python-xyz)
95 #:use-module (gnu packages readline)
96 #:use-module (gnu packages rsync)
97 #:use-module (gnu packages sqlite)
98 #:use-module (gnu packages admin)
99 #:use-module (gnu packages xml)
100 #:use-module (gnu packages emacs)
101 #:use-module (gnu packages compression)
102 #:use-module (gnu packages sdl)
103 #:use-module (gnu packages swig)
104 #:use-module (gnu packages sync)
105 #:use-module (gnu packages tcl)
106 #:use-module (gnu packages textutils)
107 #:use-module (gnu packages time)
108 #:use-module (gnu packages tls)
109 #:use-module (gnu packages)
110 #:use-module (ice-9 match)
111 #:use-module (srfi srfi-1))
113 (define-public bazaar
120 (uri (string-append "https://launchpad.net/bzr/"
121 (version-major+minor version) "/" version
122 "/+download/bzr-" version ".tar.gz"))
123 (patches (search-patches "bazaar-CVE-2017-14176.patch"))
126 "1cysix5k3wa6y7jjck3ckq3abls4gvz570s0v0hxv805nwki4i8d"))))
127 (build-system python-build-system)
129 ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh'
131 `(("gettext" ,gettext-minimal)))
133 `(#:tests? #f ; no test target
134 #:python ,python-2 ; Python 3 apparently not yet supported, see
135 ; https://answers.launchpad.net/bzr/+question/229048
137 (modify-phases %standard-phases
138 (add-after 'unpack 'fix-mandir
140 (substitute* "setup.py"
141 (("man/man1") "share/man/man1"))
143 (home-page "https://gnu.org/software/bazaar")
144 (synopsis "Version control system supporting both distributed and centralized workflows")
146 "GNU Bazaar is a version control system that allows you to record
147 changes to project files over time. It supports both a distributed workflow
148 as well as the classic centralized workflow.")
149 (license license:gpl2+)))
151 (define git-cross-configure-flags
152 '("ac_cv_fread_reads_directories=yes"
153 "ac_cv_snprintf_returns_bogus=no"
154 "ac_cv_iconv_omits_bom=no"))
162 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
166 "17a311vzimqn1glc9d7x82rhb1mb81m5rr4g8xji8idaafid39fz"))))
167 (build-system gnu-build-system)
169 `(("native-perl" ,perl)
170 ;; Add bash-minimal explicitly to ensure it comes before bash-for-tests,
171 ;; see <https://bugs.gnu.org/39513>.
172 ("bash" ,bash-minimal)
173 ("bash-for-tests" ,bash)
174 ("gettext" ,gettext-minimal)
179 "mirror://kernel.org/software/scm/git/git-manpages-"
183 "1dvwq0py8a2ywmgc5pzdlsj3608s7r9wyba292728fcs3yj7ynk6"))))
184 ;; For subtree documentation.
185 ("asciidoc" ,asciidoc-py3)
186 ("docbook-xsl" ,docbook-xsl)
193 ("python" ,python) ; for git-p4
196 ;; For PCRE support in git grep (USE_LIBPCRE2).
200 ("perl-cgi" ,perl-cgi)
203 ("subversion" ,subversion)
204 ("perl-term-readkey" ,perl-term-readkey)
206 ;; For 'git-send-email'.
207 ("perl-authen-sasl" ,perl-authen-sasl)
208 ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
209 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
211 ;; For 'git gui', 'gitk', and 'git citool'.
214 (outputs '("out" ; the core
215 "send-email" ; for git-send-email
217 "credential-netrc" ; git-credential-netrc
218 "subtree" ; git-subtree
219 "gui")) ; gitk, git gui
221 `(#:make-flags `("V=1" ;more verbose compilation
223 ,(string-append "SHELL_PATH="
224 (assoc-ref %build-inputs "bash")
227 ;; Tests require a bash with completion support.
228 ,(string-append "TEST_SHELL_PATH="
229 (assoc-ref %build-inputs "bash-for-tests")
234 ;; By default 'make install' creates hard links for
235 ;; things in 'libexec/git-core', which leads to huge
236 ;; nars; see <https://bugs.gnu.org/21949>.
237 "NO_INSTALL_HARDLINKS=indeed")
239 ;; Make sure the full bash does not end up in the final closure.
240 #:disallowed-references (,bash)
244 ;; The explicit --with-tcltk forces the build system to hardcode the
245 ;; absolute file name to 'wish'.
246 #:configure-flags (list (string-append "--with-tcltk="
247 (assoc-ref %build-inputs "tk")
248 "/bin/wish8.6") ; XXX
249 ,@(if (%current-target-system)
250 git-cross-configure-flags
253 #:modules ((srfi srfi-1)
255 ,@%gnu-build-system-modules)
257 (modify-phases %standard-phases
258 ,@(if (%current-target-system)
259 ;; The git build system assumes build == host
260 `((add-after 'unpack 'use-host-uname_S
262 (substitute* "config.mak.uname"
263 (("uname_S := .*" all)
264 (if (equal? ,(%current-target-system) "i586-pc-gnu")
268 ;; We do not have bash-for-tests when cross-compiling.
269 `((add-after 'unpack 'modify-PATH
270 (lambda* (#:key inputs #:allow-other-keys)
271 (let ((path (string-split (getenv "PATH") #\:))
272 (bash-full (assoc-ref inputs "bash-for-tests")))
273 ;; Drop the test bash from PATH so that (which "sh") and
274 ;; similar does the right thing.
275 (setenv "PATH" (string-join
276 (remove (cut string-prefix? bash-full <>) path)
279 ;; Add cross curl-config script to PATH when cross-compiling.
280 ,@(if (%current-target-system)
281 '((add-before 'configure 'add-cross-curl-config
282 (lambda* (#:key inputs #:allow-other-keys)
284 (string-append (assoc-ref inputs "curl") "/bin:"
288 (add-after 'configure 'patch-makefiles
290 (substitute* "Makefile"
291 (("/usr/bin/perl") (which "perl"))
292 (("/usr/bin/python") (which "python3")))
294 (add-after 'configure 'add-PM.stamp
296 ;; Add the "PM.stamp" to avoid "no rule to make target".
297 (call-with-output-file "perl/PM.stamp" (const #t))
299 (add-after 'build 'build-subtree
300 (lambda* (#:key inputs #:allow-other-keys)
301 (with-directory-excursion "contrib/subtree"
302 (substitute* "Makefile"
303 ;; Apparently `xmlto' does not bother to looks up the stylesheets
304 ;; specified in the XML, unlike the above substitution. Instead it
305 ;; uses a hard-coded URL. Work around it here, but if this is
306 ;; common perhaps we should hardcode this path in xmlto itself.
307 (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
308 (string-append "$(XMLTO) -x "
309 (string-append (assoc-ref inputs "docbook-xsl")
310 "/xml/xsl/docbook-xsl-"
311 ,(package-version docbook-xsl))
312 "/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
314 (invoke "make" "install")
315 (invoke "make" "install-doc")
316 (substitute* "git-subtree"
317 (("/bin/sh") (which "sh"))))
319 (add-before 'check 'patch-tests
321 (let ((store-directory (%store-directory)))
322 ;; These files contain some funny bytes that Guile is unable
323 ;; to decode for shebang patching. Just delete them.
324 (for-each delete-file '("t/t4201-shortlog.sh"
325 "t/t7813-grep-icase-iso.sh"))
326 ;; Many tests contain inline shell scripts (hooks etc).
327 (substitute* (find-files "t" "\\.sh$")
328 (("#!/bin/sh") (string-append "#!" (which "sh"))))
329 ;; Un-do shebang patching here to prevent checksum mismatch.
330 (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
331 (("^#!.*/bin/perl") "#!/usr/bin/perl"))
332 (substitute* "t/t5003-archive-zip.sh"
333 (("cp /bin/sh") (string-append "cp " (which "sh"))))
334 (substitute* "t/t6030-bisect-porcelain.sh"
335 (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
336 ;; FIXME: This test runs `git commit` with a bogus EDITOR
337 ;; and empty commit message, but does not fail the way it's
338 ;; expected to. The test passes when invoked interactively.
339 (substitute* "t/t7508-status.sh"
340 (("\tcommit_template_commented") "\ttrue"))
341 ;; More checksum mismatches due to odd shebangs.
342 (substitute* "t/t9100-git-svn-basic.sh"
343 (((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") )
344 (substitute* "t/t9300-fast-import.sh"
345 (((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh")
346 (((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh"))
347 ;; FIXME: Some hooks fail with "basename: command not found".
348 ;; See 't/trash directory.t9164.../svn-hook.log'.
349 (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
351 ;; XXX: These tests fail intermittently for unknown reasons:
352 ;; <https://bugs.gnu.org/29546>.
353 (for-each delete-file
354 '("t/t9128-git-svn-cmd-branch.sh"
355 "t/t9167-git-svn-cmd-branch-subproject.sh"
356 "t/t9141-git-svn-multiple-branches.sh"))
358 (add-after 'install 'install-shell-completion
359 (lambda* (#:key outputs #:allow-other-keys)
360 (let* ((out (assoc-ref outputs "out"))
361 (completions (string-append out "/etc/bash_completion.d")))
362 ;; TODO: Install the tcsh and zsh completions in the right place.
363 (mkdir-p completions)
364 (copy-file "contrib/completion/git-completion.bash"
365 (string-append completions "/git"))
367 (add-after 'install 'install-credential-netrc
368 (lambda* (#:key outputs #:allow-other-keys)
369 (let* ((netrc (assoc-ref outputs "credential-netrc")))
370 (install-file "contrib/credential/netrc/git-credential-netrc.perl"
371 (string-append netrc "/bin"))
372 (rename-file (string-append netrc "/bin/git-credential-netrc.perl")
373 (string-append netrc "/bin/git-credential-netrc"))
374 ;; Previously, Git.pm was automatically found by netrc.
375 ;; Perl 5.26 changed how it locates modules so that @INC no
376 ;; longer includes the current working directory (the Perl
377 ;; community calls this "dotless @INC").
378 (wrap-program (string-append netrc "/bin/git-credential-netrc")
379 `("PERL5LIB" ":" prefix
380 (,(string-append (assoc-ref outputs "out") "/share/perl5"))))
382 (add-after 'install 'install-subtree
383 (lambda* (#:key outputs #:allow-other-keys)
384 (let ((subtree (assoc-ref outputs "subtree")))
385 (install-file "contrib/subtree/git-subtree"
386 (string-append subtree "/bin"))
387 (install-file "contrib/subtree/git-subtree.1"
388 (string-append subtree "/share/man/man1"))
390 (add-after 'install 'split
391 (lambda* (#:key inputs outputs #:allow-other-keys)
392 ;; Split the binaries to the various outputs.
393 (let* ((out (assoc-ref outputs "out"))
394 (se (assoc-ref outputs "send-email"))
395 (svn (assoc-ref outputs "svn"))
396 (gui (assoc-ref outputs "gui"))
397 (gitk (string-append out "/bin/gitk"))
398 (gitk* (string-append gui "/bin/gitk"))
399 (git-gui (string-append out "/libexec/git-core/git-gui"))
400 (git-gui* (string-append gui "/libexec/git-core/git-gui"))
401 (git-cit (string-append out "/libexec/git-core/git-citool"))
402 (git-cit* (string-append gui "/libexec/git-core/git-citool"))
403 (git-se (string-append out "/libexec/git-core/git-send-email"))
404 (git-se* (string-append se "/libexec/git-core/git-send-email"))
405 (git-svn (string-append out "/libexec/git-core/git-svn"))
406 (git-svn* (string-append svn "/libexec/git-core/git-svn"))
407 (git-sm (string-append out
408 "/libexec/git-core/git-submodule")))
409 (mkdir-p (string-append gui "/bin"))
410 (mkdir-p (string-append gui "/libexec/git-core"))
411 (mkdir-p (string-append se "/libexec/git-core"))
412 (mkdir-p (string-append svn "/libexec/git-core"))
414 (for-each (lambda (old new)
418 (list gitk git-gui git-cit git-se git-svn)
419 (list gitk* git-gui* git-cit* git-se* git-svn*))
421 ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
422 (wrap-program git-svn*
424 (,(string-append (assoc-ref inputs "subversion")
426 `("PERL5LIB" ":" prefix
427 ,(map (lambda (i) (string-append (assoc-ref inputs i)
428 "/lib/perl5/site_perl"))
429 '("subversion" "perl-term-readkey")))
431 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
432 ;; help it find 'libsvn_client-1.so'.
433 `("LD_LIBRARY_PATH" ":" prefix
434 (,(string-append (assoc-ref inputs "subversion")
437 ;; Tell 'git-send-email' where perl modules are.
438 (wrap-program git-se*
439 `("PERL5LIB" ":" prefix
440 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
442 ,@(transitive-input-references
445 (assoc l (package-inputs this-package)))
448 "perl-io-socket-ssl")))))))
450 ;; Tell 'gitweb.cgi' where perl modules are.
451 (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
452 `("PERL5LIB" ":" prefix
453 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
455 ,@(transitive-input-references
458 (assoc l (package-inputs this-package)))
461 ;; Tell 'git-submodule' where Perl is.
464 (,(string-append (assoc-ref inputs "perl")
468 (add-after 'split 'install-man-pages
469 (lambda* (#:key inputs outputs #:allow-other-keys)
470 (let* ((out (assoc-ref outputs "out"))
471 (man (string-append out "/share/man"))
472 (manpages (assoc-ref inputs "git-manpages")))
474 (with-directory-excursion man
475 (invoke "tar" "xvf" manpages))))))))
478 ;; For HTTPS access, Git needs a single-file certificate bundle, specified
479 ;; with $GIT_SSL_CAINFO.
480 (list (search-path-specification
481 (variable "GIT_SSL_CAINFO")
483 (separator #f) ;single entry
484 (files '("etc/ssl/certs/ca-certificates.crt")))
485 (search-path-specification
486 (variable "GIT_EXEC_PATH")
487 (separator #f) ;single entry
488 (files '("libexec/git-core")))))
490 (synopsis "Distributed version control system")
492 "Git is a free distributed version control system designed to handle
493 everything from small to very large projects with speed and efficiency.")
494 (license license:gpl2)
495 (home-page "https://git-scm.com/")))
497 (define-public git-minimal
498 ;; The size of the closure of 'git-minimal' is two thirds that of 'git'.
499 ;; Its test suite runs slightly faster and most importantly it doesn't
500 ;; depend on packages that are expensive to build such as Subversion.
505 (substitute-keyword-arguments (package-arguments git)
507 `(modify-phases ,phases
508 (replace 'patch-makefiles
510 (substitute* "Makefile"
511 (("/usr/bin/perl") (which "perl")))
513 (delete 'build-subtree)
515 (delete 'install-man-pages)
516 (delete 'install-subtree)
517 (delete 'install-credential-netrc)
518 (add-before 'check 'delete-svn-test
520 ;; This test cannot run since we are not building 'git-svn'.
521 (delete-file "t/t9020-remote-svn.sh")
523 (add-after 'install 'remove-unusable-perl-commands
524 (lambda* (#:key outputs #:allow-other-keys)
525 (let* ((out (assoc-ref outputs "out"))
526 (bin (string-append out "/bin"))
527 (libexec (string-append out "/libexec")))
528 (for-each (lambda (file)
529 (delete-file (string-append libexec
531 '("git-svn" "git-cvsimport" "git-archimport"
532 "git-cvsserver" "git-request-pull"
533 "git-add--interactive" "git-cvsexportcommit"
534 "git-instaweb" "git-send-email"))
535 (delete-file (string-append bin "/git-cvsserver"))
537 ;; These templates typically depend on Perl. Remove them.
538 (delete-file-recursively
539 (string-append out "/share/git-core/templates/hooks"))
541 ;; Gitweb depends on Perl as well.
542 (delete-file-recursively
543 (string-append out "/share/gitweb"))
545 ((#:make-flags flags)
546 `(delete "USE_LIBPCRE2=yes" ,flags))
547 ((#:configure-flags flags)
549 ,@(if (%current-target-system)
550 git-cross-configure-flags
552 ((#:disallowed-references lst '())
556 `(("bash" ,bash-minimal)
557 ("bash-for-tests" ,bash)
558 ("native-perl" ,perl)
559 ("gettext" ,gettext-minimal)))
561 `(("curl" ,curl) ;for HTTP(S) access
562 ("expat" ,expat) ;for 'git push' over HTTP(S)
567 (define-public gitless
573 ;; The PyPI package lacks a test suite. Build directly from git.
576 (url "https://github.com/gitless-vcs/gitless")
577 (commit (string-append "v" version))))
579 (base32 "048kl27zjr68hgs70g3l98ci9765wxva6azzrhcdys7nsdd493n6"))
580 (file-name (git-file-name name version))))
581 (build-system python-build-system)
584 (modify-phases %standard-phases
585 (add-before 'build 'loosen-requirements
587 (substitute* "setup.py"
588 ;; Using Guix's python-pygit2 1.1.0 appears to work fine…
589 (("pygit2==") "pygit2>="))
591 (add-before 'check 'prepare-for-tests
593 ;; Find the 'gl' command.
594 (rename-file "gl.py" "gl")
595 (setenv "PATH" (string-append (getcwd) ":" (getenv "PATH")))
597 ;; The tests try to run git as if it were already set up.
598 (setenv "HOME" (getcwd))
599 (invoke "git" "config" "--global" "user.email" "git@example.com")
600 (invoke "git" "config" "--global" "user.name" "Guix")))
602 (lambda* (#:key inputs outputs #:allow-other-keys)
603 (let ((out (assoc-ref outputs "out"))
604 (git (assoc-ref inputs "git")))
605 (wrap-program (string-append out "/bin/gl")
606 `("PATH" ":" prefix (,(string-append git "/bin")))
608 (,(string-append out "/lib/python"
609 ,(version-major+minor
610 (package-version python))
612 ,(getenv "PYTHONPATH"))))
615 `(("git-for-tests" ,git-minimal)))
617 `(("git" ,git-minimal)
618 ("python-clint" ,python-clint)
619 ("python-pygit2" ,python-pygit2)
620 ("python-sh" ,python-sh)))
621 (home-page "https://gitless.com")
622 (synopsis "Simple version control system built on top of Git")
624 "Gitless is a Git-compatible version control system that aims to be easy to
625 learn and use. It simplifies the common workflow by committing changes to
626 tracked files by default and saving any uncommitted changes as part of a branch.
628 The friendly @command{gl} command-line interface gives feedback and helps you
629 figure out what to do next.
631 Gitless is implemented on top of Git and its commits and repositories are
632 indistinguishable from Git's. You (or other contributors) can always fall back
633 on @command{git}, and use any regular Git hosting service.")
634 (license license:expat)))
636 (define-public git-cal
643 (url "https://github.com/k4rthik/git-cal")
644 (commit (string-append "v" version))))
645 (file-name (git-file-name name version))
648 "08s9sif3qlk5n2dqpzq5yjczggnqlnxldljspjdqgpfydb2dqg3z"))))
649 (build-system perl-build-system)
650 (home-page "https://github.com/k4rthik/git-cal/")
651 (synopsis "GitHub like contributions calendar for terminal")
652 (description "@code{git-cal} is a script to view commits calendar similar
653 to GitHub contributions calendar.")
654 (license license:expat)))
656 (define-public libgit2
662 (uri (string-append "https://github.com/libgit2/libgit2/"
663 "releases/download/v" version
664 "/libgit2-" version ".tar.gz"))
667 "0nlg35pxhh548nn7aa3y1m81mf81nkbzz86i2psps4f474n497v8"))
668 (patches (search-patches "libgit2-mtime-0.patch"))
670 (delete-file-recursively "deps") #t))
671 (modules '((guix build utils)))))
672 (build-system cmake-build-system)
673 (outputs '("out" "debug"))
676 (list "-DUSE_NTLMCLIENT=OFF" ;TODO: package this
677 "-DREGEX_BACKEND=pcre2"
678 "-DUSE_HTTP_PARSER=system"
679 ,@(if (%current-target-system)
681 "-DPKG_CONFIG_EXECUTABLE="
682 (assoc-ref %build-inputs "pkg-config")
683 "/bin/" ,(%current-target-system) "-pkg-config"))
686 (modify-phases %standard-phases
687 (add-after 'unpack 'fix-hardcoded-paths
689 (substitute* "tests/repo/init.c"
690 (("#!/bin/sh") (string-append "#!" (which "sh"))))
691 (substitute* "tests/clar/fs.h"
692 (("/bin/cp") (which "cp"))
693 (("/bin/rm") (which "rm")))
695 ;; Run checks more verbosely, unless we are cross-compiling.
697 (lambda* (#:key (tests? #t) #:allow-other-keys)
699 (invoke "./libgit2_clar" "-v" "-Q")
700 ;; Tests may be disabled if cross-compiling.
701 (format #t "Test suite not run.~%")))))))
703 `(("libssh2" ,libssh2)
704 ("http-parser" ,http-parser)))
706 `(("pkg-config" ,pkg-config)
709 ;; These libraries are in 'Requires.private' in libgit2.pc.
710 `(("openssl" ,openssl)
713 (home-page "https://libgit2.org/")
714 (synopsis "Library providing Git core methods")
716 "Libgit2 is a portable, pure C implementation of the Git core methods
717 provided as a re-entrant linkable library with a solid API, allowing you to
718 write native speed custom Git applications in any language with bindings.")
719 ;; GPLv2 with linking exception
720 (license license:gpl2)))
722 (define-public libgit2-0.28
729 (uri (string-append "https://github.com/libgit2/libgit2/releases/"
731 "/libgit2-" version ".tar.gz"))
734 "0hjgpqjjmkciw1i8jqkx9q2vhdc4fc99qajhrj2bq8ziwsp6hyrb"))
735 (patches (search-patches "libgit2-mtime-0.patch"))
736 (modules '((guix build utils)))
738 (delete-file-recursively "deps") #t))))))
740 (define-public git-crypt
748 (url "https://github.com/AGWA/git-crypt")
750 (file-name (git-file-name name version))
752 (base32 "1ba5s0fvmd9hhnfhfsjrm40v0qpxfnwc8vmm55m0k4dryzkzx66q"))))
753 (build-system gnu-build-system)
756 ("openssl" ,openssl)))
758 `(("docbook-xsl" ,docbook-xsl)
759 ("libxslt" ,libxslt)))
761 `(#:tests? #f ; No tests.
763 (modify-phases %standard-phases
765 (add-after 'unpack 'patch-makefile
766 (lambda* (#:key inputs #:allow-other-keys)
767 (substitute* "Makefile"
768 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
769 (string-append (assoc-ref inputs "docbook-xsl")
770 "/xml/xsl/docbook-xsl-"
771 ,(package-version docbook-xsl)
772 "/manpages/docbook.xsl")))
776 (invoke "make" "ENABLE_MAN=yes")))
778 (lambda* (#:key outputs #:allow-other-keys)
779 (let ((out (assoc-ref outputs "out")))
780 (invoke "make" "install"
782 (string-append "PREFIX=" out))))))))
783 (home-page "https://www.agwa.name/projects/git-crypt/")
784 (synopsis "Transparent encryption of files in a git repository")
785 (description "git-crypt enables transparent encryption and decryption of
786 files in a git repository. Files which you choose to protect are encrypted when
787 committed, and decrypted when checked out. git-crypt lets you freely share a
788 repository containing a mix of public and private content. git-crypt gracefully
789 degrades, so developers without the secret key can still clone and commit to a
790 repository with encrypted files. This lets you store your secret material (such
791 as keys or passwords) in the same repository as your code, without requiring you
792 to lock down your entire repository.")
793 (license license:gpl3+)))
795 (define-public git-remote-gcrypt
797 (name "git-remote-gcrypt")
802 (url "https://git.spwhitton.name/git-remote-gcrypt")
804 (file-name (string-append name "-" version "-checkout"))
807 "0n8fzvr6y0pxrbvkywlky2bd8jvi0ayp4n9hwi84l1ldmv4a40dh"))))
808 (build-system trivial-build-system)
810 `(#:modules ((guix build utils))
812 (use-modules (guix build utils))
813 (let* ((source (assoc-ref %build-inputs "source"))
814 (output (assoc-ref %outputs "out"))
815 (bindir (string-append output "/bin")))
816 (install-file (string-append source "/git-remote-gcrypt")
819 (home-page "https://spwhitton.name/tech/code/git-remote-gcrypt/")
820 (synopsis "Whole remote repository encryption")
821 (description "git-remote-gcrypt is a Git remote helper to push and pull from
822 repositories encrypted with GnuPG. It works with the standard Git transports,
823 including repository hosting services like GitLab.
825 Remote helper programs are invoked by Git to handle network transport. This
826 helper handles @code{gcrypt:} URLs that access a remote repository encrypted
827 with GPG, using our custom format.
829 Supported locations are local, @code{rsync://} and @code{sftp://}, where the
830 repository is stored as a set of files, or instead any Git URL where gcrypt
831 will store the same representation in a Git repository, bridged over arbitrary
834 The aim is to provide confidential, authenticated Git storage and
835 collaboration using typical untrusted file hosts or services.")
836 (license license:gpl3+)))
841 ;; Update the ‘git-source’ input as well.
846 "https://git.zx2c4.com/cgit/snapshot/cgit-"
850 "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss"))))
851 (build-system gnu-build-system)
853 '(#:tests? #f ; XXX: fail to build the in-source git.
855 #:make-flags '("CC=gcc" "SHELL_PATH=sh")
857 (modify-phases %standard-phases
858 (add-after 'unpack 'unpack-git
859 (lambda* (#:key inputs #:allow-other-keys)
860 ;; Unpack the source of git into the 'git' directory.
861 (invoke "tar" "--strip-components=1" "-C" "git" "-xf"
862 (assoc-ref inputs "git-source"))))
863 (add-after 'unpack 'patch-absolute-file-names
864 (lambda* (#:key inputs #:allow-other-keys)
865 (define (quoted-file-name input path)
866 (string-append "\"" input path "\""))
867 (substitute* "ui-snapshot.c"
869 (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
871 (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
873 (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
875 (substitute* "filters/about-formatting.sh"
876 (("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out")
877 "/lib/cgit/filters"))
878 (("\\| tr") (string-append "| " (which "tr"))))
880 (substitute* "filters/html-converters/txt2html"
881 (("sed") (which "sed")))
883 (substitute* "filters/html-converters/man2html"
884 (("groff") (which "groff")))
886 (substitute* "filters/html-converters/rst2html"
887 (("rst2html\\.py") (which "rst2html.py")))
890 (delete 'configure) ; no configure script
891 (add-after 'build 'build-man
892 (lambda* (#:key make-flags #:allow-other-keys)
893 (apply invoke "make" "doc-man" make-flags)))
895 (lambda* (#:key make-flags outputs #:allow-other-keys)
896 (let ((out (assoc-ref outputs "out")))
898 "make" "install" "install-man"
899 (string-append "prefix=" out)
900 (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
902 ;; Move the platform-dependent 'cgit.cgi' into lib to get it
904 (rename-file (string-append out "/share/cgit/cgit.cgi")
905 (string-append out "/lib/cgit/cgit.cgi"))
907 (add-after 'install 'wrap-python-scripts
908 (lambda* (#:key outputs #:allow-other-keys)
911 (wrap-program (string-append (assoc-ref outputs "out")
912 "/lib/cgit/filters/" file)
913 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
914 '("syntax-highlighting.py"
915 "html-converters/md2html"))
918 ;; For building manpage.
919 `(("asciidoc" ,asciidoc)
924 `(;; Building cgit requires a Git source tree.
928 ;; cgit is tightly bound to git. Use GIT_VER from the Makefile,
929 ;; which may not match the current (package-version git).
930 (uri "mirror://kernel.org/software/scm/git/git-2.25.4.tar.xz")
932 (base32 "11am6s46wmn1yll5614smjhzlghbqq6gysgcs64igjr9y5wzpdxq"))))
936 ("python-docutils" ,python-docutils)
937 ("python-markdown" ,python-markdown)
938 ("python-pygments" ,python-pygments)
940 (home-page "https://git.zx2c4.com/cgit/")
941 (synopsis "Web frontend for git repositories")
943 "CGit is an attempt to create a fast web interface for the Git SCM, using
944 a built-in cache to decrease server I/O pressure.")
945 (license license:gpl2)))
947 (define-public python-git-multimail
949 (name "python-git-multimail")
950 (version "1.5.0.post1")
954 (uri (pypi-uri "git-multimail" version))
957 "1zkrbsa70anwpw86ysfwalrb7nsr064kygfiyikyq1pl9pcl969y"))))
958 (build-system python-build-system)
961 (modify-phases %standard-phases
962 (add-after 'unpack 'patch
963 (lambda* (#:key inputs #:allow-other-keys)
964 (substitute* "git-multimail/git_multimail.py"
965 (("GIT_EXECUTABLE = 'git'")
966 (string-append "GIT_EXECUTABLE = '"
967 (assoc-ref inputs "git") "/bin/git"
969 (("/usr/sbin/sendmail")
970 (string-append (assoc-ref inputs "sendmail")
971 "/usr/sbin/sendmail")))
975 ("sendmail" ,sendmail)))
976 (home-page "https://github.com/git-multimail/git-multimail")
977 (synopsis "Send notification emails for Git pushes")
979 "This hook sends emails describing changes introduced by pushes to a Git
980 repository. For each reference that was changed, it emits one ReferenceChange
981 email summarizing how the reference was changed, followed by one Revision
982 email for each new commit that was introduced by the reference change.
984 This script is designed to be used as a post-receive hook in a Git
986 (license license:gpl2)))
988 (define-public python-ghp-import
990 (name "python-ghp-import")
996 (url "https://github.com/davisp/ghp-import")
998 (file-name (git-file-name name version))
1000 (base32 "12pmw3zz3i57ljnm0rxdyjqdyhisbvy18mjwkb3bzp5pgzs2f45c"))))
1001 (build-system python-build-system)
1003 `(#:phases (modify-phases %standard-phases
1004 (add-after 'install 'install-documentation
1005 (lambda* (#:key outputs #:allow-other-keys)
1006 (let* ((out (assoc-ref outputs "out"))
1007 (doc (string-append out "/share/doc"))
1008 (licenses (string-append out "/share/licenses")))
1009 (install-file "README.md" doc)
1010 (install-file "LICENSE" licenses)))))))
1011 (home-page "https://github.com/davisp/ghp-import")
1012 (synopsis "Copy directory to the gh-pages branch")
1013 (description "Script that copies a directory to the gh-pages branch (by
1014 default) of the repository.")
1016 ;; See <https://bugs.gnu.org/27913>.
1017 (license (license:non-copyleft
1018 "https://raw.githubusercontent.com/davisp/ghp-import/master/LICENSE"
1019 "Tumbolia Public License"))))
1021 (define-public python2-ghp-import
1022 (package-with-python2
1023 (strip-python2-variant python-ghp-import)))
1025 (define-public python-gitdb
1027 (name "python-gitdb")
1031 (uri (pypi-uri "gitdb" version))
1034 "0l113fphn6msjl3cl3kyf332b6lal7daxdd0nfma0x9ipfb013jr"))))
1035 (build-system python-build-system)
1037 `(#:phases (modify-phases %standard-phases
1038 (add-before 'check 'create-test-repository
1040 (mkdir "/tmp/testrepo")
1041 ;; Some tests require a git repository, so create one.
1042 (with-directory-excursion "/tmp/testrepo"
1043 (do ((filecount 1 (1+ filecount)))
1044 ((> filecount 1000))
1045 (call-with-output-file (string-append
1046 "file" (number->string filecount))
1048 (format port "~a" filecount))))
1050 (invoke "git" "init")
1051 (invoke "git" "config" "user.name" "Total Git")
1052 (invoke "git" "config" "user.email" "git@localhost")
1053 (invoke "git" "add" "-A")
1054 (invoke "git" "commit" "-q" "-m" "dummy commit")))
1056 ;; The repository checkout must be a "bare" clone.
1057 (invoke "git" "clone" "--bare" "/tmp/testrepo"
1058 "/tmp/testrepo.git")))
1061 (setenv "GITDB_TEST_GIT_REPO_BASE" "/tmp/testrepo.git")
1062 ;; Skip tests that must be run from the gitdb repository.
1063 (setenv "TRAVIS" "1")
1064 (invoke "nosetests" "-v"))))))
1066 `(("python-smmap" ,python-smmap)))
1069 ("python-nose" ,python-nose)))
1070 (home-page "https://github.com/gitpython-developers/gitdb")
1071 (synopsis "Python implementation of the Git object database")
1073 "GitDB allows you to access @dfn{bare} Git repositories for reading and
1074 writing. It aims at allowing full access to loose objects as well as packs
1075 with performance and scalability in mind. It operates exclusively on streams,
1076 allowing to handle large objects with a small memory footprint.")
1077 (license license:bsd-3)))
1079 (define-public python-gitpython
1081 (name "python-gitpython")
1085 (uri (pypi-uri "GitPython" version))
1088 "1jzllsy9lwc9yibccgv7h9naxisazx2n3zmpy21c8n5xhysw69p4"))))
1089 (build-system python-build-system)
1091 `(#:tests? #f ;XXX: Tests can only be run within the GitPython repository.
1092 #:phases (modify-phases %standard-phases
1093 (add-after 'unpack 'embed-git-reference
1094 (lambda* (#:key inputs #:allow-other-keys)
1095 (substitute* "git/cmd.py"
1096 (("git_exec_name = \"git\"")
1097 (string-append "git_exec_name = \""
1098 (assoc-ref inputs "git")
1104 `(("python-gitdb" ,python-gitdb)))
1106 `(("python-ddt" ,python-ddt)
1107 ("python-nose" ,python-nose)))
1108 (home-page "https://github.com/gitpython-developers/GitPython")
1109 (synopsis "Python library for interacting with Git repositories")
1111 "GitPython is a python library used to interact with Git repositories,
1112 high-level like git-porcelain, or low-level like git-plumbing.
1114 It provides abstractions of Git objects for easy access of repository data,
1115 and additionally allows you to access the Git repository more directly using
1116 either a pure Python implementation, or the faster, but more resource intensive
1117 @command{git} command implementation.")
1118 (license license:bsd-3)))
1120 (define-public shflags
1127 (url "https://github.com/kward/shflags")
1128 (commit (string-append "v" version))))
1129 (file-name (git-file-name name version))
1132 "1ydx0sb6vz9s2dgp5bd64y7fpzh9qvmlfjxrbmzac8saknijrlly"))))
1133 (build-system gnu-build-system)
1135 `(#:tests? #f ; no tests
1137 (modify-phases %standard-phases
1138 (delete 'configure) ; nothing to configure
1139 (delete 'build) ; nothing to build
1141 (lambda* (#:key outputs #:allow-other-keys)
1142 (let* ((out (assoc-ref outputs "out"))
1143 (src (string-append out "/src")))
1144 (install-file "shflags" src)
1146 (home-page "https://github.com/kward/shflags")
1147 (synopsis "Command-line flags library for shell scripts")
1149 "Shell Flags (shFlags) is a library written to greatly simplify the
1150 handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
1151 ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
1152 different versions of getopt on various OSes make writing portable shell
1153 scripts difficult. shFlags instead provides an API that doesn't change across
1154 shell and OS versions so the script writer can be confident that the script
1156 (license license:lgpl2.1)))
1158 (define-public git-flow
1161 ;; This version has not be officially released yet, so we build it
1162 ;; directly from the git repository.
1167 (url "https://github.com/petervanderdoes/gitflow-avh/")
1169 (file-name (git-file-name name version))
1172 "13q4mnrxr03wz2dkhzy73j384g299m4d545cnhxcaznvdwfany4h"))))
1173 (build-system gnu-build-system)
1174 (inputs `(("shflags" ,shflags)))
1176 '(#:tests? #f ; no tests
1177 #:make-flags (list (string-append "prefix="
1178 (assoc-ref %outputs "out")))
1180 (modify-phases %standard-phases
1181 (add-after 'unpack 'reset-shFlags-link
1182 (lambda* (#:key inputs #:allow-other-keys)
1183 ;; The link points to a file in the shFlags submodule.
1184 ;; Redirect it to point to our system shFlags.
1185 (let ((shflags (assoc-ref inputs "shflags")))
1187 (delete-file "gitflow-shFlags")
1188 (symlink (string-append shflags "/src/shflags")
1189 "gitflow-shFlags")))))
1192 (home-page "https://nvie.com/posts/a-successful-git-branching-model/")
1193 (synopsis "Git extensions for Vincent Driessen's branching model")
1195 "Vincent Driessen's branching model is a git branching and release
1196 management strategy that helps developers keep track of features, hotfixes,
1197 and releases in bigger software projects. The git-flow library of git
1198 subcommands helps automate some parts of the flow to make working with it a
1200 (license license:bsd-2)))
1202 (define-public stgit
1210 (url "https://github.com/ctmarinas/stgit")
1211 (commit (string-append "v" version))))
1212 (file-name (git-file-name name version))
1214 (base32 "00pmz93znl418lsjwy4mr0chp8i2w27h1xjysa05f62smsv91yyc"))))
1215 (build-system python-build-system)
1222 (modify-phases %standard-phases
1223 (add-after 'unpack 'hard-code-version
1225 ;; setup.py tries to cleverly extract the version number from the
1226 ;; git history, which the source checkout lacks. Hard-code one.
1227 (substitute* "setup.py"
1229 (format #f "'~a'" ,version)))
1231 (add-before 'check 'patch-tests
1233 (substitute* (list "t/t1900-mail.sh"
1234 "t/t7504-commit-msg-hook.sh")
1242 (string-append "SHELL_PATH=" (which "bash"))
1244 (home-page "http://procode.org/stgit/")
1245 (synopsis "Stacked Git")
1247 "StGit is a command-line application that provides functionality similar
1248 to Quilt (i.e., pushing/popping patches to/from a stack), but using Git
1249 instead of @command{diff} and @command{patch}. StGit stores its patches in a
1250 Git repository as normal Git commits, and provides a number of commands to
1251 manipulate them in various ways.")
1252 (license license:gpl2)))
1257 (version "1.20151229")
1262 (url "https://github.com/RichiH/vcsh")
1263 (commit (string-append "v" version))))
1264 (file-name (git-file-name name version))
1266 (base32 "1grpj45nbpv4j60vd2kg4rj53zrm0bc0h9l4pfd3c2mwbvywm6ab"))))
1267 (build-system gnu-build-system)
1269 `(("which" ,which)))
1273 ("perl-test-harness" ,perl-test-harness)
1274 ("perl-shell-command" ,perl-shell-command)
1275 ("perl-test-most" ,perl-test-most)))
1277 '(#:phases (modify-phases %standard-phases
1280 #:make-flags (list (string-append "PREFIX="
1281 (assoc-ref %outputs "out")))
1282 #:test-target "test"))
1283 (home-page "https://github.com/RichiH/vcsh")
1284 (synopsis "Version control system for @code{$HOME}")
1286 "vcsh version-controls configuration files in several Git repositories,
1287 all in one single directory. They all maintain their working trees without
1288 clobbering each other or interfering otherwise. By default, all Git
1289 repositories maintained via vcsh store the actual files in @code{$HOME},
1290 though this can be overridden.")
1291 (license license:gpl2+)))
1293 (define-public git-test-sequence
1294 (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76"))
1296 (name "git-test-sequence")
1297 (version (string-append "20140312." (string-take commit 7)))
1301 ;; There are many other scripts in this directory; we
1302 ;; are interested in just one for this package.
1303 (url "https://github.com/dustin/bindir")
1305 (file-name (git-file-name name version))
1308 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
1309 (build-system trivial-build-system)
1311 `(#:modules ((guix build utils))
1313 (use-modules (guix build utils))
1314 (let* ((source (assoc-ref %build-inputs "source"))
1315 (output (assoc-ref %outputs "out"))
1316 (bindir (string-append output "/bin"))
1317 (script "git-test-sequence"))
1318 (install-file (string-append source "/" script)
1321 (home-page "https://dustin.sallings.org/2010/03/28/git-test-sequence.html")
1322 (synopsis "Run a command over a sequence of commits")
1324 "git-test-sequence is similar to an automated git bisect except it’s
1325 linear. It will test every change between two points in the DAG. It will
1326 also walk each side of a merge and test those changes individually.")
1327 (license (license:x11-style "file://LICENSE")))))
1329 (define-public gitolite
1337 (url "https://github.com/sitaramc/gitolite")
1338 (commit (string-append "v" version))))
1339 (file-name (git-file-name name version))
1341 (base32 "1rkj7gknwjlc5ij9w39zf5mr647bm45la57yjczydmvrb8c56yrh"))))
1342 (build-system gnu-build-system)
1344 '(#:tests? #f ; no tests
1345 #:phases (modify-phases %standard-phases
1348 (add-before 'install 'patch-scripts
1349 (lambda* (#:key inputs #:allow-other-keys)
1350 (let ((perl (string-append (assoc-ref inputs "perl")
1352 ;; This seems to take care of every shell script that
1354 (substitute* (find-files "." ".*")
1356 (string-append " " perl " -")))
1358 (substitute* (find-files "src/triggers" ".*")
1360 (string-append " " (which "sed") " ")))
1363 '("src/triggers/post-compile/update-gitweb-access-list"
1364 "src/triggers/post-compile/ssh-authkeys-split"
1365 "src/triggers/upstream")
1367 (string-append " " (which "grep") " ")))
1369 ;; Avoid references to the store in authorized_keys.
1370 ;; This works because gitolite-shell is in the PATH.
1371 (substitute* "src/triggers/post-compile/ssh-authkeys"
1372 (("\\$glshell \\$user")
1373 "gitolite-shell $user"))
1375 (add-before 'install 'patch-source
1376 (lambda* (#:key inputs #:allow-other-keys)
1377 ;; Gitolite uses cat to test the readability of the
1379 (substitute* "src/lib/Gitolite/Setup.pm"
1381 (string-append "\"" (which "cat") " "))
1383 (string-append "\"" (which "ssh-keygen"))))
1385 (substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
1386 "src/lib/Gitolite/Hooks/Update.pm")
1388 (string-append (assoc-ref inputs "perl")
1391 (substitute* "src/lib/Gitolite/Common.pm"
1393 (string-append "\"" (which "ssh-keygen")))
1396 (assoc-ref inputs "inetutils")
1401 (lambda* (#:key outputs #:allow-other-keys)
1402 (let* ((output (assoc-ref outputs "out"))
1403 (sharedir (string-append output "/share/gitolite"))
1404 (bindir (string-append output "/bin")))
1407 (invoke "./install" "-to" sharedir)
1408 ;; Create symlinks for executable scripts in /bin.
1409 (for-each (lambda (script)
1410 (symlink (string-append sharedir "/" script)
1411 (string-append bindir "/" script)))
1412 '("gitolite" "gitolite-shell"))
1414 (add-after 'install 'wrap-scripts
1415 (lambda* (#:key inputs outputs #:allow-other-keys)
1416 (let ((out (assoc-ref outputs "out"))
1417 (coreutils (assoc-ref inputs "coreutils"))
1418 (findutils (assoc-ref inputs "findutils"))
1419 (git (assoc-ref inputs "git")))
1420 (wrap-program (string-append out "/bin/gitolite")
1423 (string-append dir "/bin"))
1424 (list out coreutils findutils git))))
1428 ("coreutils" ,coreutils)
1429 ("findutils" ,findutils)
1430 ("inetutils" ,inetutils)))
1431 ;; git and openssh are propagated because trying to patch the source via
1432 ;; regexp matching is too brittle and prone to false positives.
1435 ("openssh" ,openssh)))
1436 (home-page "https://gitolite.com")
1437 (synopsis "Git access control layer")
1439 "Gitolite is an access control layer on top of Git, providing fine access
1440 control to Git repositories.")
1441 (license license:gpl2)))
1443 (define-public pre-commit
1449 ;; No tests in the PyPI tarball.
1452 (url "https://github.com/pre-commit/pre-commit")
1453 (commit (string-append "v" version))))
1454 (file-name (git-file-name name version))
1456 (base32 "144hcnz8vz07nkx7hk8a3ac822186ardwxa8jnl6s8qvm5ip92f2"))))
1457 (build-system python-build-system)
1460 (modify-phases %standard-phases
1461 (add-before 'check 'set-up-git
1463 ;; Change from /homeless-shelter to /tmp for write permission.
1464 (setenv "HOME" "/tmp")
1465 ;; Environment variables used in the tests.
1466 (setenv "GIT_AUTHOR_NAME" "Your Name")
1467 (setenv "GIT_COMMITTER_NAME" "Your Name")
1468 (setenv "GIT_AUTHOR_EMAIL" "you@example.com")
1469 (setenv "GIT_COMMITTER_EMAIL" "you@example.com")
1470 (invoke "git" "config" "--global" "user.name" "Your Name")
1471 (invoke "git" "config" "--global" "user.email" "you@example.com")
1474 (lambda* (#:key inputs outputs #:allow-other-keys)
1475 (add-installed-pythonpath inputs outputs)
1476 (invoke "pytest" "tests" "-k"
1478 ;; Disable conda tests.
1479 "not test_conda_hook"
1480 " and not test_conda_with_additional_dependencies_hook"
1481 " and not test_local_conda_additional_dependencies"
1482 ;; Disable cpan tests.
1483 " and not test_local_perl_additional_dependencies"
1484 " and not test_perl_hook"
1485 ;; Disable Ruby tests.
1486 " and not test_additional_ruby_dependencies_installed"
1487 " and not test_install_rbenv"
1488 " and not test_install_rbenv_with_version"
1489 " and not test_run_a_ruby_hook"
1490 " and not test_run_ruby_hook_with_disable_shared_gems"
1491 " and not test_run_versioned_ruby_hook"
1492 ;; Disable Cargo tests
1493 " and not test_additional_rust_cli_dependencies_installed"
1494 " and not test_additional_rust_lib_dependencies_installed"
1495 " and not test_local_rust_additional_dependencies"
1496 " and not test_rust_hook"
1497 ;; Disable python2 test.
1498 " and not test_switch_language_versions_doesnt_clobber"
1499 ;; These tests try to open a network socket.
1500 " and not test_additional_golang_dependencies_installed"
1501 " and not test_additional_node_dependencies_installed"
1502 " and not test_golang_hook"
1503 " and not test_golang_hook_still_works_when_gobin_is_set"
1504 " and not test_local_golang_additional_dependencies"
1505 " and not test_main"
1506 " and not test_node_hook_with_npm_userconfig_set"
1507 " and not test_run_a_node_hook"
1508 " and not test_run_versioned_node_hook"
1509 ;; Tests failing with a permission error.
1510 ;; They try to write to the filesystem.
1511 " and not test_autoupdate_hook_disappearing_repo"
1512 " and not test_hook_disppearing_repo_raises"
1513 " and not test_img_conflict"
1514 " and not test_img_something_unstaged"
1515 " and not test_installed_from_venv"
1516 " and not test_too_new_version"
1517 " and not test_try_repo_uncommitted_changes"
1518 " and not test_versions_ok"
1519 ;; This test tries to activate a virtualenv
1520 " and not test_healthy_venv_creator"
1521 ;; Fatal error: Not a Git repository.
1522 " and not test_all_cmds"
1523 " and not test_try_repo"
1524 ;; No module named 'pip._internal.cli.main'
1525 " and not test_additional_dependencies_roll_forward"
1527 " and not test_install_existing_hooks_no_overwrite"
1528 " and not test_uninstall_restores_legacy_hooks"))))
1529 (add-before 'reset-gzip-timestamps 'make-files-writable
1530 (lambda* (#:key outputs #:allow-other-keys)
1531 ;; Make sure .gz files are writable so that the
1532 ;; 'reset-gzip-timestamps' phase can do its work.
1533 (let ((out (assoc-ref outputs "out")))
1534 (for-each make-file-writable
1535 (find-files out "\\.gz$"))
1539 ("python-pytest" ,python-pytest)))
1541 `(("python-cfgv" ,python-cfgv)
1542 ("python-identify" ,python-identify)
1543 ("python-nodeenv" ,python-nodeenv)
1544 ("python-pyyaml" ,python-pyyaml)
1545 ("python-toml" ,python-toml)
1546 ("python-virtualenv" ,python-virtualenv)))
1547 (home-page "https://pre-commit.com/")
1548 (synopsis "Framework for managing and maintaining multi-language pre-commit hooks")
1550 "Pre-commit is a multi-language package manager for pre-commit hooks. You
1551 specify a list of hooks you want and pre-commit manages the installation and
1552 execution of any hook written in any language before every commit.")
1553 (license license:expat)))
1555 (define (mercurial-patch name revision hash)
1558 (uri (string-append "https://www.mercurial-scm.org/repo/hg/raw-rev/" revision))
1559 (file-name (string-append "mercurial-" name ".patch"))
1560 (sha256 (base32 hash))))
1562 (define %mercurial-patches
1564 ;; These three patches fixes compatibility with the updated gzip module
1565 ;; in Python 3.8.2: <https://bz.mercurial-scm.org/show_bug.cgi?id=6284>.
1566 (mercurial-patch "python-mtime" "6c36a521572edf3a79ee567b118469b3192037cc"
1567 "0bmm7y40r8s081ws2sjvn1v8kvyfan4a97jl0fhdh7yc2pzxlzqq")
1568 (mercurial-patch "indent-gzip" "a23b859ad17dd0a5b9bb37846b69b5e30f99c44c"
1569 "1spscv9dgqv38m7h1liki93ax6w97gxayg17fr7wr6acjdfccpr9")
1570 (mercurial-patch "python-gzip" "b7ca03dff14c63d64ad7bfa36a2d0a36a6b62253"
1571 "0p88ffhx0kk21ssrsb156ffhpcb7g8mkwwkmq49qpmbm5ag2paf0")
1572 ;; This fixes an incompatibility with os.isfile in Python 3.8:
1573 ;; <https://bz.mercurial-scm.org/show_bug.cgi?id=6287>.
1574 (mercurial-patch "os-isfile" "6a8738dc4a019da4c9df5c26961aa09d45ce1c68"
1575 "0lr069m12kzrkmr1pmhaxg5lxmdwxabsza61qp1i1q70g7sy8lvy")))
1577 (define-public mercurial
1583 (uri (string-append "https://www.mercurial-scm.org/"
1584 "release/mercurial-" version ".tar.gz"))
1585 (patches %mercurial-patches)
1588 "1nbjpzjrzgql4hrvslpxwbcgn885ikq6ba1yb4w6p78rw9nzkhgp"))))
1589 (build-system python-build-system)
1592 (modify-phases %standard-phases
1593 (add-after 'unpack 'patch-tests
1595 (substitute* '("tests/test-extdiff.t"
1596 "tests/test-logtoprocess.t"
1597 "tests/test-patchbomb.t"
1598 "tests/test-run-tests.t"
1599 "tests/test-transplant.t")
1604 (lambda* (#:key tests? #:allow-other-keys)
1605 (with-directory-excursion "tests"
1606 ;; The following tests are known to fail.
1607 (for-each delete-file
1608 '(;; XXX: This test calls 'run-tests.py --with-hg=
1609 ;; `which hg`' and fails because there is no hg on
1610 ;; PATH from before (that's why we are building it!)?
1613 ;; FIXME: Why does this fail in the build container, but
1614 ;; not in 'guix environment -C' (even without /bin/sh)?
1615 "test-nointerrupt.t"
1617 ;; TODO: the fqaddr() call fails in the build
1618 ;; container, causing these server tests to fail.
1620 "test-http-branchmap.t"
1621 "test-pull-bundle.t"
1624 "test-subrepo-deep-nested-change.t"
1625 "test-subrepo-recursion.t"))
1627 (invoke "./run-tests.py"
1628 ;; ‘make check’ does not respect ‘-j’.
1629 (string-append "-j" (number->string
1630 (parallel-job-count)))
1631 ;; The default time-outs are too low for many systems.
1632 ;; Raise them generously: Guix enforces its own.
1634 "--slowtimeout" "86400"
1635 ;; The test suite takes a long time and produces little
1636 ;; output by default. Prevent timeouts due to silence.
1639 ;; The following inputs are only needed to run the tests.
1641 `(("python-nose" ,python-nose)
1644 (home-page "https://www.mercurial-scm.org/")
1645 (synopsis "Decentralized version control system")
1647 "Mercurial is a free, distributed source control management tool.
1648 It efficiently handles projects of any size
1649 and offers an easy and intuitive interface.")
1650 (license license:gpl2+)))
1658 (uri (string-append "http://www.webdav.org/neon/neon-"
1662 "1jpvczcx658vimqm7c8my2q41fnmjaf1j03g7bsli6rjxk6xh2yv"))))
1663 (build-system gnu-build-system)
1666 ("pkg-config" ,pkg-config)))
1668 `(("libxml2" ,libxml2)
1669 ("openssl" ,openssl)
1672 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
1673 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
1675 #:configure-flags '("--enable-shared"
1676 ;; requires libgnutils-config, deprecated
1678 ; "--with-ssl=gnutls")))
1679 "--with-ssl=openssl")))
1680 (home-page "http://www.webdav.org/neon/")
1681 (synopsis "HTTP and WebDAV client library")
1683 "Neon is an HTTP and WebDAV client library, with a C interface and the
1686 @item High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
1688 @item low-level interface to the HTTP request/response engine, allowing the use
1689 of arbitrary HTTP methods, headers, etc.;
1690 @item authentication support including Basic and Digest support, along with
1691 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
1692 @item SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
1693 verifying server certificates, handling client certificates, and examining
1694 certificate properties, smartcard-based client certificates are also
1695 supported via a PKCS#11 wrapper interface;
1696 @item abstract interface to parsing XML using libxml2 or expat, and wrappers for
1697 simplifying handling XML HTTP response bodies;
1698 @item WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
1699 property manipulation.
1701 (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+
1703 (define-public subversion
1709 (uri (string-append "mirror://apache/subversion/"
1710 "subversion-" version ".tar.bz2"))
1713 "00i1f88snlpcnsycpn6r315h6792l5nkr2p5k6kq6yprz4cf5a3b"))))
1714 (build-system gnu-build-system)
1716 '(#:parallel-tests? #f ; TODO Seems to cause test failures on
1718 #:configure-flags '("--enable-static=no")
1720 (modify-phases %standard-phases
1721 (add-after 'configure 'patch-libtool-wrapper-ls
1722 (lambda* (#:key inputs #:allow-other-keys)
1723 ;; This substitution allows tests svnauthz_tests and svnlook_tests
1724 ;; to pass. These tests execute svnauthz and svnlook through
1725 ;; their libtool wrapper scripts from svn hooks, whose empty
1726 ;; environments cause "ls: command not found" errors. It would be
1727 ;; nice if this fix ultimately made its way into libtool.
1728 (let ((coreutils (assoc-ref inputs "coreutils")))
1729 (substitute* "libtool"
1730 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))
1732 (add-before 'build 'patch-test-sh
1734 (substitute* "subversion/tests/libsvn_repos/repos-test.c"
1735 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1737 (add-before 'check 'set-PARALLEL
1738 (lambda* (#:key parallel-tests? #:allow-other-keys)
1740 (setenv "PARALLEL" (number->string (parallel-job-count)))
1741 (simple-format #t "parallel-tests? are disabled\n"))
1743 (add-after 'install 'install-perl-bindings
1744 (lambda* (#:key outputs #:allow-other-keys)
1745 ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
1746 (let ((out (assoc-ref outputs "out")))
1747 (invoke "make" "swig-pl-lib")
1748 ;; FIXME: Test failures.
1749 ;; (invoke "make" "check-swig-pl")
1750 (invoke "make" "install-swig-pl-lib")
1752 ;; Set the right installation prefix.
1753 (with-directory-excursion
1754 "subversion/bindings/swig/perl/native"
1755 (invoke "perl" "Makefile.PL"
1757 (string-append "PREFIX=" out))
1758 (invoke "make" "install"
1759 (string-append "OTHERLDFLAGS="
1763 `(("pkg-config" ,pkg-config)
1764 ;; For the Perl bindings.
1768 ("apr-util" ,apr-util)
1772 ("python" ,python-wrapper)
1774 ("utf8proc" ,utf8proc)
1776 (home-page "https://subversion.apache.org/")
1777 (synopsis "Revision control system")
1779 "@dfn{Subversion} (svn) exists to be recognized and adopted as a
1780 centralized version control system characterized by its
1781 reliability as a safe haven for valuable data; the simplicity of its model and
1782 usage; and its ability to support the needs of a wide variety of users and
1783 projects, from individuals to large-scale enterprise operations.")
1784 (license license:asl2.0)))
1792 (uri (string-append "mirror://gnu/rcs/rcs-"
1796 "1zsx7bb0rgvvvisiy4zlixf56ay8wbd9qqqcp1a1g0m1gl6mlg86"))
1797 (patches (search-patches "rcs-5.9.4-noreturn.patch"))))
1798 (build-system gnu-build-system)
1799 (native-inputs `(("ed" ,ed)))
1801 `(#:phases (modify-phases %standard-phases
1802 (add-before 'check 'disable-t810
1803 ;; See https://savannah.gnu.org/bugs/index.php?52288
1804 ;; Back-porting the fix is non-trivial, so disable for now.
1806 (substitute* "tests/Makefile"
1807 ((" t810 \\\\\n") ""))
1809 (home-page "https://www.gnu.org/software/rcs/")
1810 (synopsis "Per-file local revision control system")
1812 "RCS is the original Revision Control System. It works on a
1813 file-by-file basis, in contrast to subsequent version control systems such as
1814 CVS, Subversion, and Git. This can make it suitable for system
1815 administration files, for example, which are often inherently local to one
1817 (license license:gpl3+)))
1826 "https://ftp.gnu.org/non-gnu/cvs/source/feature/"
1827 version "/cvs-" version ".tar.bz2"))
1828 (patches (search-patches "cvs-CVE-2017-12836.patch"))
1831 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
1832 (build-system gnu-build-system)
1834 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
1836 #:configure-flags (list "--with-external-zlib")))
1837 (inputs `(("zlib" ,zlib)
1838 ("nano" ,nano))) ; the default editor
1839 (home-page "http://cvs.nongnu.org")
1840 (synopsis "Historical centralized version control system")
1842 "CVS is a version control system, an important component of Source
1843 Configuration Management (SCM). Using it, you can record the history of
1844 sources files, and documents. It fills a similar role to the free software
1845 RCS, PRCS, and Aegis packages.")
1846 (license license:gpl1+)))
1848 (define-public cvs-fast-export
1850 (name "cvs-fast-export")
1854 (uri (string-append "http://www.catb.org/~esr/cvs-fast-export/"
1855 "cvs-fast-export-" version ".tar.gz"))
1858 "06y2myhhv2ap08bq7d7shq0b7lq6wgznwrpz6622xq66cxkf2n5g"))))
1859 (build-system gnu-build-system)
1862 (modify-phases %standard-phases
1863 (delete 'configure)) ; no configure script
1864 #:parallel-build? #f ; parallel a2x commands fail spectacularly
1866 (list "CC=gcc" (string-append "prefix?=" (assoc-ref %outputs "out")))))
1869 ("python" ,python-wrapper)))
1871 `(("asciidoc" ,asciidoc)
1872 ;; These are needed for the tests.
1875 (home-page "http://www.catb.org/esr/cvs-fast-export/")
1876 (synopsis "Export an RCS or CVS history as a fast-import stream")
1877 (description "This program analyzes a collection of RCS files in a CVS
1878 repository (or outside of one) and, when possible, emits an equivalent history
1879 in the form of a fast-import stream. Not all possible histories can be
1880 rendered this way; the program tries to emit useful warnings when it can't.
1882 The program can also produce a visualization of the resulting commit directed
1883 acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org,
1884 Graphviz}. The package also includes @command{cvssync}, a tool for mirroring
1885 masters from remote CVS hosts.")
1886 (license license:gpl2+)))
1888 (define-public vc-dwim
1894 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
1898 "0mf1dd7wdqxsm4fcfinfd7iadzarmzvg747pbsbi32qpavpk8gdf"))))
1899 (build-system gnu-build-system)
1900 (inputs `(("perl" ,perl)))
1902 `(("emacs" ,emacs-minimal) ; for `ctags'
1903 ("inetutils" ,inetutils))) ; for `hostname', used in the tests
1904 (home-page "https://www.gnu.org/software/vc-dwim/")
1905 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
1907 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
1908 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
1909 using version control at the same time, for example by printing a reminder
1910 when a file change has been described in the ChangeLog but the file has not
1911 been added to the VC. vc-chlog scans changed files and generates
1912 standards-compliant ChangeLog entries based on the changes that it detects.")
1913 (license license:gpl3+)))
1915 (define-public diffstat
1923 (string-append "ftp://invisible-island.net/diffstat/"
1924 "diffstat-" version ".tgz")
1925 (string-append "http://invisible-mirror.net/archives/diffstat/"
1926 "diffstat-" version ".tgz")))
1929 "0vyw200s5dv1257pmrh6c6fdkmw3slyz5szpqfx916xr04sdbpby"))))
1930 (build-system gnu-build-system)
1931 (home-page "https://invisible-island.net/diffstat/")
1932 (synopsis "Make histograms from the output of @command{diff}")
1934 "Diffstat reads the output of @command{diff} and displays a histogram of
1935 the insertions, deletions, and modifications per file. It is useful for
1936 reviewing large, complex patch files.")
1937 (license (license:x11-style "file://COPYING"))))
1945 (uri (string-append "mirror://gnu/" name "/CSSC-"
1949 "1vsisqq573xjr2qpn19iwmpqgl3mq03m790akpa4rvj60b4d1gni"))))
1950 (build-system gnu-build-system)
1953 (modify-phases %standard-phases
1954 (add-before 'check 'precheck
1957 (substitute* "tests/common/test-common"
1958 (("/bin/pwd") (which "pwd")))
1960 (substitute* "tests/prt/all-512.sh"
1961 (("/bin/sh") (which "sh")))
1963 ;; XXX: This test has no hope of passing until there is a "nogroup"
1964 ;; entry (or at least some group to which the guix builder does
1965 ;; not belong) in the /etc/group file of the build environment.
1966 ;; Currently we do not have such a group. Disable this test for now.
1967 (substitute* "tests/Makefile"
1968 (("test-delta ") ""))))))))
1969 ;; These are needed for the tests
1970 (native-inputs `(("git" ,git)
1972 (home-page "https://www.gnu.org/software/cssc/")
1973 (synopsis "File-based version control like SCCS")
1974 (description "GNU CSSC provides a replacement for the legacy Unix source
1975 code control system SCCS. This allows old code still under that system to be
1976 accessed and migrated on modern systems.")
1977 (license license:gpl3+)))
1979 ;; This package can unfortunately work only in -TEST mode, since Aegis
1980 ;; requires that it is installed setuid root.
1981 (define-public aegis
1987 (uri (string-append "mirror://sourceforge/aegis/aegis/" version
1988 "/aegis-" version ".tar.gz"))
1991 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
1992 (patches (search-patches "aegis-perl-tempdir1.patch"
1993 "aegis-perl-tempdir2.patch"
1994 "aegis-test-fixup-1.patch"
1995 "aegis-test-fixup-2.patch"
1996 "aegis-constness-error.patch"))))
1997 (build-system gnu-build-system)
1999 `(("e2fsprogs" ,e2fsprogs)
2002 ("libxml2" ,libxml2)
2004 ("gettext" ,gettext-minimal)))
2009 ;; Various tests require the following:
2013 ("subversion" ,subversion)
2017 `(#:configure-flags (list "--with-no-aegis-configured"
2018 "--sharedstatedir=/var/com/aegis"
2019 ;; Uses the old 'throw()' specifier with 'new'
2020 ;; which changed in C++11.
2021 "CXXFLAGS=-std=c++03")
2022 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
2024 (modify-phases %standard-phases
2025 (add-before 'configure 'pre-conf
2027 (substitute* (append '("configure"
2028 "etc/check-tar-gz.sh"
2032 "script/aebisect.in"
2033 "script/aeintegratq.in"
2035 "script/test_funcs.in"
2036 "web/eg_oss_templ.sh"
2038 "libaegis/getpw_cache.cc")
2039 (find-files "test" "\\.sh"))
2040 (("/bin/sh") (which "sh")))
2041 (setenv "SH" (which "sh"))
2045 (let ((home (string-append (getcwd) "/my-new-home")))
2046 ;; Some tests need to write to $HOME.
2048 (setenv "HOME" home)
2050 ;; This test assumes that flex has been symlinked to "lex".
2051 (substitute* "test/00/t0011a.sh"
2052 (("type lex") "type flex"))
2054 ;; XXX Disable tests that fail, for unknown reasons, ‘for now’.
2056 (lambda (test) (substitute* "Makefile"
2057 (((string-append "test/" test "\\.ES ")) "")))
2062 ;; The author decided to call the check rule "sure".
2063 (invoke "make" "sure")))))))
2064 (home-page "https://sourceforge.net/projects/aegis/")
2065 (synopsis "Project change supervisor")
2066 (description "Aegis is a project change supervisor, and performs some of
2067 the Software Configuration Management needed in a CASE environment. Aegis
2068 provides a framework within which a team of developers may work on many
2069 changes to a program independently, and Aegis coordinates integrating these
2070 changes back into the master source of the program, with as little disruption
2071 as possible. Resolution of contention for source files, a major headache for
2072 any project with more than one developer, is one of Aegis's major functions.")
2073 (license license:gpl3+)))
2075 (define-public reposurgeon
2077 (name "reposurgeon")
2081 (uri (string-append "http://www.catb.org/~esr/" name "/"
2082 name "-" version ".tar.xz"))
2085 "1af0z14wcm4bk5a9ysinbwq2fp3lf5f7i8mvwh7286hr3fnagcaz"))
2086 (patches (search-patches
2087 "reposurgeon-add-missing-docbook-files.patch"))))
2088 (build-system gnu-build-system)
2092 (string-append "target=" (assoc-ref %outputs "out")))
2094 (modify-phases %standard-phases
2095 (add-after 'unpack 'patch-inputs
2096 (lambda* (#:key inputs #:allow-other-keys)
2097 (let ((tzdata (assoc-ref inputs "tzdata")))
2098 (substitute* "reposurgeon"
2099 (("/usr/share/zoneinfo")
2100 (string-append tzdata "/share/zoneinfo")))
2101 (substitute* "test/svn-to-svn"
2102 (("/bin/echo") "echo"))
2104 (delete 'configure) ; no configure script
2105 (add-before 'build 'fix-docbook
2106 (lambda* (#:key inputs #:allow-other-keys)
2107 (substitute* (find-files "." "\\.xml$")
2108 (("docbook/docbookx.dtd")
2109 (string-append (assoc-ref inputs "docbook-xml")
2110 "/xml/dtd/docbook/docbookx.dtd")))
2112 (add-before 'check 'set-up-test-environment
2113 (lambda* (#:key inputs #:allow-other-keys)
2114 (let ((tzdata (assoc-ref inputs "tzdata")))
2115 (setenv "TZDIR" (string-append tzdata "/share/zoneinfo"))
2117 (add-after 'install 'install-emacs-data
2118 (lambda* (#:key outputs #:allow-other-keys)
2119 (install-file "reposurgeon-mode.el"
2120 (string-append (assoc-ref outputs "out")
2121 "/share/emacs/site-lisp"))
2124 `(("python" ,python-wrapper)
2125 ("tzdata" ,tzdata)))
2127 `( ;; For building documentation.
2128 ("asciidoc" ,asciidoc)
2129 ("docbook-xml" ,docbook-xml)
2130 ("docbook-xsl" ,docbook-xsl)
2131 ("libxml2" ,libxml2)
2137 ("mercurial" ,mercurial)
2138 ("subversion" ,subversion)))
2139 (home-page "http://www.catb.org/~esr/reposurgeon/")
2140 (synopsis "Edit version-control repository history")
2141 (description "Reposurgeon enables risky operations that version-control
2142 systems don't want to let you do, such as editing past comments and metadata
2143 and removing commits. It works with any version control system that can
2144 export and import Git fast-import streams, including Git, Mercurial, Fossil,
2145 Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly
2146 and can thus be used to script production of very high-quality conversions
2147 from Subversion to any supported Distributed Version Control System (DVCS).")
2148 ;; Most files are distributed under bsd-2, except 'repocutter' which is
2150 (license (list license:bsd-2 license:bsd-3))))
2159 "https://github.com/jonas/tig/releases/download/tig-"
2160 version "/tig-" version ".tar.gz"))
2163 "0r4y9hyvpkplaxrzslws3asz652d83qh3bjwvmp8assga8s5s3ah"))))
2164 (build-system gnu-build-system)
2166 `(("asciidoc" ,asciidoc)
2169 `(("ncurses" ,ncurses)
2170 ("readline" ,readline)))
2173 (modify-phases %standard-phases
2174 (add-after 'install 'install-doc
2176 (invoke "make" "install-doc"))))
2177 #:test-target "test"
2178 #:tests? #f)) ; tests require access to /dev/tty
2179 (home-page "https://jonas.github.io/tig/")
2180 (synopsis "Ncurses-based text user interface for Git")
2182 "Tig is an ncurses text user interface for Git, primarily intended as
2183 a history browser. It can also stage hunks for commit, or colorize the
2184 output of the @code{git} command.")
2185 (license license:gpl2+)))
2187 (define-public findnewest
2195 (url "https://github.com/0-wiz-0/findnewest")
2196 (commit (string-append "findnewest-" version))))
2197 (file-name (git-file-name name version))
2199 (base32 "1x1cbn2b27h5r0ah5xc06fkalfdci2ngrgd4wibxjw0h88h0nvgq"))))
2200 (build-system gnu-build-system)
2201 (native-inputs `(("autoconf" ,autoconf)
2202 ("automake" ,automake)))
2203 (home-page "https://github.com/0-wiz-0/findnewest/releases")
2204 (synopsis "Print the modification time of the latest file")
2206 "Recursively find the newest file in a file tree and print its
2207 modification time.")
2208 (license license:bsd-2)))
2210 (define-public myrepos
2213 (version "1.20180726")
2218 (url "git://myrepos.branchable.com/myrepos")
2220 (file-name (string-append name "-" version "-checkout"))
2222 (base32 "0jphw61plm8cgklja6hs639xhdvxgvjwbr6jpvjwpp7hc5gmhms5"))))
2223 (build-system gnu-build-system)
2225 '(#:test-target "test"
2226 #:make-flags (list (string-append "PREFIX=" %output))
2228 (modify-phases %standard-phases
2230 (add-after 'install 'wrap-webcheckout
2231 (lambda* (#:key inputs outputs #:allow-other-keys)
2232 (let ((out (assoc-ref outputs "out")))
2233 (wrap-program (string-append out "/bin/webcheckout")
2234 `("PERL5LIB" ":" prefix
2235 ,(map (lambda (i) (string-append (assoc-ref inputs i)
2236 "/lib/perl5/site_perl"))
2237 '("perl-encode-locale" "perl-http-date"
2238 "perl-http-message" "perl-html-parser" "perl-libwww"
2239 "perl-uri" "perl-try-tiny"))))
2243 ("perl-encode-locale" ,perl-encode-locale)
2244 ("perl-html-parser" ,perl-html-parser)
2245 ("perl-http-date" ,perl-http-date)
2246 ("perl-http-message" ,perl-http-message)
2247 ("perl-libwww" ,perl-libwww)
2248 ("perl-try-tiny" ,perl-try-tiny)
2249 ("perl-uri" ,perl-uri)))
2250 (home-page "https://myrepos.branchable.com/")
2251 (synopsis "Multiple repository management tool")
2253 "Myrepos provides the @code{mr} command, which maps an operation (e.g.,
2254 fetching updates) over a collection of version control repositories. It
2255 supports a large number of version control systems: Git, Subversion,
2256 Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
2257 (license license:gpl2+)))
2259 (define-public git-annex-remote-rclone
2261 (name "git-annex-remote-rclone")
2267 (url "https://github.com/DanielDent/git-annex-remote-rclone")
2268 (commit (string-append "v" version))))
2269 (file-name (git-file-name name version))
2272 "0j0hlxji8d974fq7zd4xc02n0jpi31ylhxc7z4zp8iiwad5mkpxp"))))
2273 (build-system trivial-build-system)
2275 `(#:modules ((guix build utils))
2278 (use-modules (guix build utils))
2279 (let ((bash (string-append (assoc-ref %build-inputs "bash")
2281 (rclone (string-append (assoc-ref %build-inputs "rclone")
2283 (copy-file (string-append (assoc-ref %build-inputs "source")
2284 "/git-annex-remote-rclone")
2285 "git-annex-remote-rclone")
2286 (substitute* "git-annex-remote-rclone"
2287 (("/bin/bash") bash)
2288 (("runcmd rclone") (string-append "runcmd " rclone)))
2289 (install-file "git-annex-remote-rclone"
2290 (string-append %output "/bin"))
2294 ("rclone" ,rclone)))
2295 (home-page "https://github.com/DanielDent/git-annex-remote-rclone")
2296 (synopsis "Use rclone-supported cloud storage providers with git-annex")
2297 (description "This wrapper around rclone makes any destination supported
2298 by rclone usable with git-annex.")
2299 (license license:gpl3+)))
2301 (define-public fossil
2309 "https://www.fossil-scm.org/index.html/uv/"
2310 "fossil-src-" version ".tar.gz"))
2312 (base32 "0c9nzx42wxfmym9vf1pnbdb1c7gp7a7zqky60izxsph7w2xh8nix"))
2313 (modules '((guix build utils)))
2316 (delete-file-recursively "compat") #t))))
2317 (build-system gnu-build-system)
2319 `(("tcl" ,tcl) ;for configuration only
2320 ("which" ,which) ;for tests only
2323 `(("openssl" ,openssl)
2325 ("sqlite" ,sqlite)))
2327 `(#:configure-flags (list "--with-openssl=auto"
2328 "--disable-internal-sqlite")
2329 #:test-target "test"
2330 #:phases (modify-phases %standard-phases
2331 (add-after 'patch-source-shebangs 'patch-sh
2333 (substitute* '("auto.def")
2334 (("/bin/sh") (which "sh")))
2337 (lambda* (#:key outputs (configure-flags '())
2339 ;; The 'configure' script is not an autoconf script and
2340 ;; chokes on unrecognized options.
2343 (string-append "--prefix="
2344 (assoc-ref outputs "out"))
2347 (add-before 'check 'test-setup
2349 (setenv "USER" "guix")
2352 (home-page "https://fossil-scm.org")
2353 (synopsis "Software configuration management system")
2355 "Fossil is a distributed source control management system which supports
2356 access and administration over HTTP CGI or via a built-in HTTP server. It has
2357 a built-in wiki, built-in file browsing, built-in tickets system, etc.")
2358 (license (list license:public-domain ;src/miniz.c, src/shell.c
2361 (define-public stagit
2367 (uri (string-append "https://dl.2f30.org/releases/"
2368 name "-" version ".tar.gz"))
2371 "1m3s9g1z9szbjrhm8sic91xh6f2bfpi56rskdkqd5wc4wdycpyi5"))))
2372 (build-system gnu-build-system)
2374 `(#:tests? #f ; No tests
2375 #:make-flags (list "CC=gcc"
2376 (string-append "PREFIX=" %output))
2378 (modify-phases %standard-phases
2379 (delete 'configure)))) ; No configure script
2381 `(("libgit2" ,libgit2)))
2382 (home-page "https://2f30.org/")
2383 (synopsis "Static git page generator")
2384 (description "Stagit creates static pages for git repositories, the results can
2385 be served with a HTTP file server of your choice.")
2386 (license license:expat)))
2388 (define-public gource
2395 "https://github.com/acaudwell/Gource/releases/download"
2396 "/gource-" version "/gource-" version ".tar.gz"))
2399 "16p7b1x4r0915w883lp374jcdqqja37fnb7m8vnsfnl2n64gi8qr"))))
2400 (build-system gnu-build-system)
2403 (list (string-append "--with-boost-libdir="
2404 (assoc-ref %build-inputs "boost")
2407 `(("pkg-config" ,pkg-config)))
2417 ("sdl-union" ,(sdl-union (list sdl2 sdl2-image)))))
2418 (home-page "https://gource.io/")
2419 (synopsis "3D visualisation tool for source control repositories")
2420 (description "@code{gource} provides a software version control
2421 visualization. The repository is displayed as a tree where the root of the
2422 repository is the centre, directories are branches and files are leaves.
2423 Contributors to the source code appear and disappear as they contribute to
2424 specific files and directories.")
2425 (license license:gpl3+)))
2434 "http://www.catb.org/~esr/src/src-" version ".tar.gz"))
2437 "0n0skhvya8w2az45h2gsafxy8m2mvqas64nrgxifcmrzfv0rf26c"))))
2438 (build-system gnu-build-system)
2441 (list (string-append "prefix=" (assoc-ref %outputs "out")))
2443 (modify-phases %standard-phases
2444 (delete 'configure) ; no 'configure' script
2445 (add-after 'install 'wrap-program
2446 (lambda* (#:key inputs outputs #:allow-other-keys)
2447 (let* ((out (assoc-ref outputs "out"))
2448 (prog (string-append out "/bin/src"))
2449 (rcs (assoc-ref inputs "rcs")))
2451 `("PATH" ":" prefix (,(string-append rcs "/bin"))))
2455 (setenv "HOME" (getenv "TMPDIR"))
2456 (invoke "git" "config" "--global" "user.name" "guix")
2457 (invoke "git" "config" "--global" "user.email" "guix")
2458 (invoke "./srctest"))))))
2464 `(("python" ,python-wrapper)
2466 (synopsis "Simple revision control")
2467 (home-page "http://www.catb.org/~esr/src/")
2469 "SRC (or src) is simple revision control, a version-control system for
2470 single-file projects by solo developers and authors. It modernizes the
2471 venerable RCS, hence the anagrammatic acronym. The design is tuned for use
2472 cases like all those little scripts in your @file{~/bin} directory, or a
2473 directory full of HOWTOs.")
2474 (license license:bsd-2)))
2476 (define-public git-when-merged
2477 ;; Use an unreleased version to get a PY3 compatibility fix.
2478 (let ((commit "ab6af7865a0ba55ba364a6c507e0be6f84f31c6d"))
2480 (name "git-when-merged")
2481 (version (string-append "1.2.0-" (string-take commit 7)))
2485 (url "https://github.com/mhagger/git-when-merged/")
2487 (file-name (git-file-name name version))
2490 "0iyk2psf97bc9h43m89p3xjmm79fsx99i7px29g4lcnmdy5kmz0p"))))
2491 (build-system gnu-build-system)
2493 `(#:tests? #f ; there are no tests
2495 (modify-phases %standard-phases
2499 (lambda* (#:key outputs #:allow-other-keys)
2500 (install-file "bin/git-when-merged"
2501 (string-append (assoc-ref outputs "out")
2504 (add-before 'install 'patch-git
2505 (lambda* (#:key inputs #:allow-other-keys)
2506 (let ((git (string-append (assoc-ref inputs "git")
2508 (substitute* "bin/git-when-merged"
2509 (("'git'") (string-append "'" git "'")))
2511 (add-after 'install 'wrap-script
2512 (lambda* (#:key outputs #:allow-other-keys)
2513 (wrap-program (string-append (assoc-ref outputs "out")
2514 "/bin/git-when-merged")
2515 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2519 ("python" ,python-wrapper)))
2520 (home-page "https://github.com/mhagger/git-when-merged")
2521 (synopsis "Determine when a commit was merged into a Git branch")
2522 (description "This Git extension defines a subcommand,
2523 @code{when-merged}, whose core operation is to find the merge that brought a
2524 given commit into the specified ref(s). It has various options that control
2525 how information about the merge is displayed.")
2526 (license license:gpl2+))))
2528 (define-public git-imerge
2536 (url "https://github.com/mhagger/git-imerge")
2537 (commit (string-append "v" version))))
2538 (file-name (git-file-name name version))
2540 (base32 "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4"))))
2541 (build-system gnu-build-system)
2543 `(#:tests? #f ; only manual test scripts
2544 #:make-flags (list (string-append "DESTDIR=" %output)
2547 (modify-phases %standard-phases
2549 (add-before 'install 'patch-git
2550 (lambda* (#:key inputs #:allow-other-keys)
2551 (let ((git (string-append (assoc-ref inputs "git")
2553 (substitute* "git-imerge"
2554 (("'git'") (string-append "'" git "'")))
2556 (add-after 'install 'wrap-script
2557 (lambda* (#:key outputs #:allow-other-keys)
2558 (wrap-program (string-append (assoc-ref outputs "out")
2560 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2564 ("python" ,python-wrapper)))
2565 (home-page "https://github.com/mhagger/git-imerge")
2566 (synopsis "Incremental merge for Git")
2567 (description "This Git extension defines a subcommand, @code{imerge},
2568 which performs an incremental merge between two branches. Its two primary
2569 design goals are to reduce the pain of resolving merge conflicts by finding
2570 the smallest possible conflicts and to allow a merge to be saved, tested,
2571 interrupted, published, and collaborated on while in progress.")
2572 (license license:gpl2+)))
2574 (define-public git-lfs
2581 (url "https://github.com/git-lfs/git-lfs")
2582 (commit (string-append "v" version))))
2583 (file-name (git-file-name name version))
2586 "1nf40rbdz901vsahg5cm09pznpina6wimmxl0lmh8pn0mi51yzvc"))))
2587 (build-system go-build-system)
2589 '(#:import-path "github.com/git-lfs/git-lfs"))
2590 (home-page "https://git-lfs.github.com/")
2591 (synopsis "Git extension for versioning large files")
2593 "Git Large File Storage (LFS) replaces large files such as audio samples,
2594 videos, datasets, and graphics with text pointers inside Git, while storing the
2595 file contents on a remote server.")
2596 (license license:expat)))
2604 (uri (string-append "https://ftp.gnu.org/old-gnu/gnu-arch/"
2605 "tla-" version ".tar.gz"))
2608 "01mfzj1i6p4s8191cgd5850hds1zls88hkf9rb6qx1vqjv585aj0"))
2609 (modules '((guix build utils)))
2612 ;; In tar 1.32, '--preserve' is ambiguous and leads to an
2613 ;; error, so address that.
2614 (substitute* "src/tla/libarch/archive.c"
2616 "\"--preserve-permissions\""))
2618 (build-system gnu-build-system)
2620 '(#:phases (modify-phases %standard-phases
2622 (lambda* (#:key inputs outputs #:allow-other-keys)
2623 (let ((out (assoc-ref outputs "out")))
2629 ;; For libneon's 'configure' script.
2630 ;; XXX: There's a bundled copy of neon.
2631 (setenv "CONFIG_SHELL" (which "sh"))
2633 (invoke "../configure" "--prefix" out
2634 "--config-shell" (which "sh")
2635 "--with-posix-shell" (which "sh")
2636 "--with-cc" "gcc")))))
2639 ;; There are build failures when building in parallel.
2640 #:parallel-build? #f
2641 #:parallel-tests? #f
2643 #:test-target "test"))
2645 `(("which" ,which)))
2646 (synopsis "Historical distributed version-control system")
2648 "GNU Arch, aka. @code{tla}, was one of the first free distributed
2649 version-control systems (DVCS). It saw its last release in 2006. This
2650 package is provided for users who need to recover @code{tla} repositories and
2652 (home-page "https://www.gnu.org/software/gnu-arch/")
2653 (license license:gpl2))) ;version 2 only