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 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>
33 ;;; This file is part of GNU Guix.
35 ;;; GNU Guix is free software; you can redistribute it and/or modify it
36 ;;; under the terms of the GNU General Public License as published by
37 ;;; the Free Software Foundation; either version 3 of the License, or (at
38 ;;; your option) any later version.
40 ;;; GNU Guix is distributed in the hope that it will be useful, but
41 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
42 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 ;;; GNU General Public License for more details.
45 ;;; You should have received a copy of the GNU General Public License
46 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
48 (define-module (gnu packages version-control)
49 #:use-module ((guix licenses) #:prefix license:)
50 #:use-module (guix utils)
51 #:use-module (guix packages)
52 #:use-module (guix download)
53 #:use-module (guix git-download)
54 #:use-module (guix build-system cmake)
55 #:use-module (guix build-system gnu)
56 #:use-module (guix build-system go)
57 #:use-module (guix build-system python)
58 #:use-module (guix build-system trivial)
59 #:use-module (gnu packages apr)
60 #:use-module (gnu packages autotools)
61 #:use-module (gnu packages documentation)
62 #:use-module (gnu packages base)
63 #:use-module (gnu packages bash)
64 #:use-module (gnu packages bison)
65 #:use-module (gnu packages boost)
66 #:use-module (gnu packages check)
67 #:use-module (gnu packages cook)
68 #:use-module (gnu packages curl)
69 #:use-module (gnu packages docbook)
70 #:use-module (gnu packages ed)
71 #:use-module (gnu packages file)
72 #:use-module (gnu packages flex)
73 #:use-module (gnu packages gettext)
74 #:use-module (gnu packages gl)
75 #:use-module (gnu packages groff)
76 #:use-module (gnu packages guile)
77 #:use-module (gnu packages image)
78 #:use-module (gnu packages linux)
79 #:use-module (gnu packages mail)
80 #:use-module (gnu packages maths)
81 #:use-module (gnu packages nano)
82 #:use-module (gnu packages ncurses)
83 #:use-module (gnu packages ssh)
84 #:use-module (gnu packages web)
85 #:use-module (gnu packages openstack)
86 #:use-module (gnu packages pcre)
87 #:use-module (gnu packages perl)
88 #:use-module (gnu packages perl-check)
89 #:use-module (gnu packages pkg-config)
90 #:use-module (gnu packages python)
91 #:use-module (gnu packages python-web)
92 #:use-module (gnu packages python-xyz)
93 #:use-module (gnu packages readline)
94 #:use-module (gnu packages rsync)
95 #:use-module (gnu packages sqlite)
96 #:use-module (gnu packages admin)
97 #:use-module (gnu packages xml)
98 #:use-module (gnu packages emacs)
99 #:use-module (gnu packages compression)
100 #:use-module (gnu packages sdl)
101 #:use-module (gnu packages swig)
102 #:use-module (gnu packages sync)
103 #:use-module (gnu packages tcl)
104 #:use-module (gnu packages textutils)
105 #:use-module (gnu packages time)
106 #:use-module (gnu packages tls)
107 #:use-module (gnu packages)
108 #:use-module (ice-9 match)
109 #:use-module (srfi srfi-1))
111 (define-public bazaar
118 (uri (string-append "https://launchpad.net/bzr/"
119 (version-major+minor version) "/" version
120 "/+download/bzr-" version ".tar.gz"))
121 (patches (search-patches "bazaar-CVE-2017-14176.patch"))
124 "1cysix5k3wa6y7jjck3ckq3abls4gvz570s0v0hxv805nwki4i8d"))))
125 (build-system python-build-system)
127 ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh'
129 `(("gettext" ,gettext-minimal)))
131 `(#:tests? #f ; no test target
132 #:python ,python-2 ; Python 3 apparently not yet supported, see
133 ; https://answers.launchpad.net/bzr/+question/229048
135 (modify-phases %standard-phases
136 (add-after 'unpack 'fix-mandir
138 (substitute* "setup.py"
139 (("man/man1") "share/man/man1"))
141 (home-page "https://gnu.org/software/bazaar")
142 (synopsis "Version control system supporting both distributed and centralized workflows")
144 "GNU Bazaar is a version control system that allows you to record
145 changes to project files over time. It supports both a distributed workflow
146 as well as the classic centralized workflow.")
147 (license license:gpl2+)))
149 (define git-cross-configure-flags
150 '("ac_cv_fread_reads_directories=yes"
151 "ac_cv_snprintf_returns_bogus=no"
152 "ac_cv_iconv_omits_bom=no"))
160 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
164 "1ybk39ylvs32lywq7ra4l2kdr5izc80r9461hwfnw8pssxs9gjkk"))))
165 (build-system gnu-build-system)
167 `(("native-perl" ,perl)
168 ;; Add bash-minimal explicitly to ensure it comes before bash-for-tests,
169 ;; see <https://bugs.gnu.org/39513>.
170 ("bash" ,bash-minimal)
171 ("bash-for-tests" ,bash)
172 ("gettext" ,gettext-minimal)
177 "mirror://kernel.org/software/scm/git/git-manpages-"
181 "176lkcfhjhqin2w8s814j9wwcian9jr6xx6xzn35i5scn14spjz6"))))
182 ;; For subtree documentation.
183 ("asciidoc" ,asciidoc-py3)
184 ("docbook-xsl" ,docbook-xsl)
191 ("python" ,python) ; for git-p4
194 ;; For PCRE support in git grep (USE_LIBPCRE2).
198 ("perl-cgi" ,perl-cgi)
201 ("subversion" ,subversion)
202 ("perl-term-readkey" ,perl-term-readkey)
204 ;; For 'git-send-email'.
205 ("perl-authen-sasl" ,perl-authen-sasl)
206 ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
207 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
209 ;; For 'git gui', 'gitk', and 'git citool'.
212 (outputs '("out" ; the core
213 "send-email" ; for git-send-email
215 "credential-netrc" ; git-credential-netrc
216 "subtree" ; git-subtree
217 "gui")) ; gitk, git gui
219 `(#:make-flags `("V=1" ;more verbose compilation
221 ,(string-append "SHELL_PATH="
222 (assoc-ref %build-inputs "bash")
225 ;; Tests require a bash with completion support.
226 ,(string-append "TEST_SHELL_PATH="
227 (assoc-ref %build-inputs "bash-for-tests")
232 ;; By default 'make install' creates hard links for
233 ;; things in 'libexec/git-core', which leads to huge
234 ;; nars; see <https://bugs.gnu.org/21949>.
235 "NO_INSTALL_HARDLINKS=indeed")
237 ;; Make sure the full bash does not end up in the final closure.
238 #:disallowed-references (,bash)
242 ;; The explicit --with-tcltk forces the build system to hardcode the
243 ;; absolute file name to 'wish'.
244 #:configure-flags (list (string-append "--with-tcltk="
245 (assoc-ref %build-inputs "tk")
246 "/bin/wish8.6") ; XXX
247 ,@(if (%current-target-system)
248 git-cross-configure-flags
251 #:modules ((srfi srfi-1)
253 ,@%gnu-build-system-modules)
255 (modify-phases %standard-phases
256 ,@(if (%current-target-system)
257 ;; The git build system assumes build == host
258 `((add-after 'unpack 'use-host-uname_S
260 (substitute* "config.mak.uname"
261 (("uname_S := .*" all)
262 (if (equal? ,(%current-target-system) "i586-pc-gnu")
266 ;; We do not have bash-for-tests when cross-compiling.
267 `((add-after 'unpack 'modify-PATH
268 (lambda* (#:key inputs #:allow-other-keys)
269 (let ((path (string-split (getenv "PATH") #\:))
270 (bash-full (assoc-ref inputs "bash-for-tests")))
271 ;; Drop the test bash from PATH so that (which "sh") and
272 ;; similar does the right thing.
273 (setenv "PATH" (string-join
274 (remove (cut string-prefix? bash-full <>) path)
277 ;; Add cross curl-config script to PATH when cross-compiling.
278 ,@(if (%current-target-system)
279 '((add-before 'configure 'add-cross-curl-config
280 (lambda* (#:key inputs #:allow-other-keys)
282 (string-append (assoc-ref inputs "curl") "/bin:"
286 (add-after 'configure 'patch-makefiles
288 (substitute* "Makefile"
289 (("/usr/bin/perl") (which "perl"))
290 (("/usr/bin/python") (which "python3")))
292 (add-after 'configure 'add-PM.stamp
294 ;; Add the "PM.stamp" to avoid "no rule to make target".
295 (call-with-output-file "perl/PM.stamp" (const #t))
297 (add-after 'build 'build-subtree
298 (lambda* (#:key inputs #:allow-other-keys)
299 (with-directory-excursion "contrib/subtree"
300 (substitute* "Makefile"
301 ;; Apparently `xmlto' does not bother to looks up the stylesheets
302 ;; specified in the XML, unlike the above substitution. Instead it
303 ;; uses a hard-coded URL. Work around it here, but if this is
304 ;; common perhaps we should hardcode this path in xmlto itself.
305 (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
306 (string-append "$(XMLTO) -x "
307 (string-append (assoc-ref inputs "docbook-xsl")
308 "/xml/xsl/docbook-xsl-"
309 ,(package-version docbook-xsl))
310 "/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
312 (invoke "make" "install")
313 (invoke "make" "install-doc")
314 (substitute* "git-subtree"
315 (("/bin/sh") (which "sh"))))
317 (add-before 'check 'patch-tests
319 (let ((store-directory (%store-directory)))
320 ;; These files contain some funny bytes that Guile is unable
321 ;; to decode for shebang patching. Just delete them.
322 (for-each delete-file '("t/t4201-shortlog.sh"
323 "t/t7813-grep-icase-iso.sh"))
324 ;; Many tests contain inline shell scripts (hooks etc).
325 (substitute* (find-files "t" "\\.sh$")
326 (("#!/bin/sh") (string-append "#!" (which "sh"))))
327 ;; Un-do shebang patching here to prevent checksum mismatch.
328 (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
329 (("^#!.*/bin/perl") "#!/usr/bin/perl"))
330 (substitute* "t/t5003-archive-zip.sh"
331 (("cp /bin/sh") (string-append "cp " (which "sh"))))
332 (substitute* "t/t6030-bisect-porcelain.sh"
333 (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
334 ;; FIXME: This test runs `git commit` with a bogus EDITOR
335 ;; and empty commit message, but does not fail the way it's
336 ;; expected to. The test passes when invoked interactively.
337 (substitute* "t/t7508-status.sh"
338 (("\tcommit_template_commented") "\ttrue"))
339 ;; More checksum mismatches due to odd shebangs.
340 (substitute* "t/t9100-git-svn-basic.sh"
341 (((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") )
342 (substitute* "t/t9300-fast-import.sh"
343 (((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh")
344 (((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh"))
345 ;; FIXME: Some hooks fail with "basename: command not found".
346 ;; See 't/trash directory.t9164.../svn-hook.log'.
347 (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
349 ;; XXX: These tests fail intermittently for unknown reasons:
350 ;; <https://bugs.gnu.org/29546>.
351 (for-each delete-file
352 '("t/t9128-git-svn-cmd-branch.sh"
353 "t/t9167-git-svn-cmd-branch-subproject.sh"
354 "t/t9141-git-svn-multiple-branches.sh"))
356 (add-after 'install 'install-shell-completion
357 (lambda* (#:key outputs #:allow-other-keys)
358 (let* ((out (assoc-ref outputs "out"))
359 (completions (string-append out "/etc/bash_completion.d")))
360 ;; TODO: Install the tcsh and zsh completions in the right place.
361 (mkdir-p completions)
362 (copy-file "contrib/completion/git-completion.bash"
363 (string-append completions "/git"))
365 (add-after 'install 'install-credential-netrc
366 (lambda* (#:key outputs #:allow-other-keys)
367 (let* ((netrc (assoc-ref outputs "credential-netrc")))
368 (install-file "contrib/credential/netrc/git-credential-netrc.perl"
369 (string-append netrc "/bin"))
370 (rename-file (string-append netrc "/bin/git-credential-netrc.perl")
371 (string-append netrc "/bin/git-credential-netrc"))
372 ;; Previously, Git.pm was automatically found by netrc.
373 ;; Perl 5.26 changed how it locates modules so that @INC no
374 ;; longer includes the current working directory (the Perl
375 ;; community calls this "dotless @INC").
376 (wrap-program (string-append netrc "/bin/git-credential-netrc")
377 `("PERL5LIB" ":" prefix
378 (,(string-append (assoc-ref outputs "out") "/share/perl5"))))
380 (add-after 'install 'install-subtree
381 (lambda* (#:key outputs #:allow-other-keys)
382 (let ((subtree (assoc-ref outputs "subtree")))
383 (install-file "contrib/subtree/git-subtree"
384 (string-append subtree "/bin"))
385 (install-file "contrib/subtree/git-subtree.1"
386 (string-append subtree "/share/man/man1"))
388 (add-after 'install 'split
389 (lambda* (#:key inputs outputs #:allow-other-keys)
390 ;; Split the binaries to the various outputs.
391 (let* ((out (assoc-ref outputs "out"))
392 (se (assoc-ref outputs "send-email"))
393 (svn (assoc-ref outputs "svn"))
394 (gui (assoc-ref outputs "gui"))
395 (gitk (string-append out "/bin/gitk"))
396 (gitk* (string-append gui "/bin/gitk"))
397 (git-gui (string-append out "/libexec/git-core/git-gui"))
398 (git-gui* (string-append gui "/libexec/git-core/git-gui"))
399 (git-cit (string-append out "/libexec/git-core/git-citool"))
400 (git-cit* (string-append gui "/libexec/git-core/git-citool"))
401 (git-se (string-append out "/libexec/git-core/git-send-email"))
402 (git-se* (string-append se "/libexec/git-core/git-send-email"))
403 (git-svn (string-append out "/libexec/git-core/git-svn"))
404 (git-svn* (string-append svn "/libexec/git-core/git-svn"))
405 (git-sm (string-append out
406 "/libexec/git-core/git-submodule")))
407 (mkdir-p (string-append gui "/bin"))
408 (mkdir-p (string-append gui "/libexec/git-core"))
409 (mkdir-p (string-append se "/libexec/git-core"))
410 (mkdir-p (string-append svn "/libexec/git-core"))
412 (for-each (lambda (old new)
416 (list gitk git-gui git-cit git-se git-svn)
417 (list gitk* git-gui* git-cit* git-se* git-svn*))
419 ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
420 (wrap-program git-svn*
422 (,(string-append (assoc-ref inputs "subversion")
424 `("PERL5LIB" ":" prefix
425 ,(map (lambda (i) (string-append (assoc-ref inputs i)
426 "/lib/perl5/site_perl"))
427 '("subversion" "perl-term-readkey")))
429 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
430 ;; help it find 'libsvn_client-1.so'.
431 `("LD_LIBRARY_PATH" ":" prefix
432 (,(string-append (assoc-ref inputs "subversion")
435 ;; Tell 'git-send-email' where perl modules are.
436 (wrap-program git-se*
437 `("PERL5LIB" ":" prefix
438 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
440 ,@(transitive-input-references
443 (assoc l (package-inputs this-package)))
446 "perl-io-socket-ssl")))))))
448 ;; Tell 'gitweb.cgi' where perl modules are.
449 (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
450 `("PERL5LIB" ":" prefix
451 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
453 ,@(transitive-input-references
456 (assoc l (package-inputs this-package)))
459 ;; Tell 'git-submodule' where Perl is.
462 (,(string-append (assoc-ref inputs "perl")
466 (add-after 'split 'install-man-pages
467 (lambda* (#:key inputs outputs #:allow-other-keys)
468 (let* ((out (assoc-ref outputs "out"))
469 (man (string-append out "/share/man"))
470 (manpages (assoc-ref inputs "git-manpages")))
472 (with-directory-excursion man
473 (invoke "tar" "xvf" manpages))))))))
476 ;; For HTTPS access, Git needs a single-file certificate bundle, specified
477 ;; with $GIT_SSL_CAINFO.
478 (list (search-path-specification
479 (variable "GIT_SSL_CAINFO")
481 (separator #f) ;single entry
482 (files '("etc/ssl/certs/ca-certificates.crt")))
483 (search-path-specification
484 (variable "GIT_EXEC_PATH")
485 (separator #f) ;single entry
486 (files '("libexec/git-core")))))
488 (synopsis "Distributed version control system")
490 "Git is a free distributed version control system designed to handle
491 everything from small to very large projects with speed and efficiency.")
492 (license license:gpl2)
493 (home-page "https://git-scm.com/")))
495 (define-public git-minimal
496 ;; The size of the closure of 'git-minimal' is two thirds that of 'git'.
497 ;; Its test suite runs slightly faster and most importantly it doesn't
498 ;; depend on packages that are expensive to build such as Subversion.
503 (substitute-keyword-arguments (package-arguments git)
505 `(modify-phases ,phases
506 (replace 'patch-makefiles
508 (substitute* "Makefile"
509 (("/usr/bin/perl") (which "perl")))
511 (delete 'build-subtree)
513 (delete 'install-man-pages)
514 (delete 'install-subtree)
515 (delete 'install-credential-netrc)
516 (add-before 'check 'delete-svn-test
518 ;; This test cannot run since we are not building 'git-svn'.
519 (delete-file "t/t9020-remote-svn.sh")
521 (add-after 'install 'remove-unusable-perl-commands
522 (lambda* (#:key outputs #:allow-other-keys)
523 (let* ((out (assoc-ref outputs "out"))
524 (bin (string-append out "/bin"))
525 (libexec (string-append out "/libexec")))
526 (for-each (lambda (file)
527 (delete-file (string-append libexec
529 '("git-svn" "git-cvsimport" "git-archimport"
530 "git-cvsserver" "git-request-pull"
531 "git-add--interactive" "git-cvsexportcommit"
532 "git-instaweb" "git-send-email"))
533 (delete-file (string-append bin "/git-cvsserver"))
535 ;; These templates typically depend on Perl. Remove them.
536 (delete-file-recursively
537 (string-append out "/share/git-core/templates/hooks"))
539 ;; Gitweb depends on Perl as well.
540 (delete-file-recursively
541 (string-append out "/share/gitweb"))
543 ((#:make-flags flags)
544 `(delete "USE_LIBPCRE2=yes" ,flags))
545 ((#:configure-flags flags)
547 ,@(if (%current-target-system)
548 git-cross-configure-flags
550 ((#:disallowed-references lst '())
554 `(("bash" ,bash-minimal)
555 ("bash-for-tests" ,bash)
556 ("native-perl" ,perl)
557 ("gettext" ,gettext-minimal)))
559 `(("curl" ,curl) ;for HTTP(S) access
560 ("expat" ,expat) ;for 'git push' over HTTP(S)
565 (define-public gitless
571 ;; The PyPI package lacks a test suite. Build directly from git.
574 (url "https://github.com/gitless-vcs/gitless")
575 (commit (string-append "v" version))))
577 (base32 "048kl27zjr68hgs70g3l98ci9765wxva6azzrhcdys7nsdd493n6"))
578 (file-name (git-file-name name version))))
579 (build-system python-build-system)
582 (modify-phases %standard-phases
583 (add-before 'build 'loosen-requirements
585 (substitute* "setup.py"
586 ;; Using Guix's python-pygit2 1.1.0 appears to work fine…
587 (("pygit2==") "pygit2>="))
589 (add-before 'check 'prepare-for-tests
591 ;; Find the 'gl' command.
592 (rename-file "gl.py" "gl")
593 (setenv "PATH" (string-append (getcwd) ":" (getenv "PATH")))
595 ;; The tests try to run git as if it were already set up.
596 (setenv "HOME" (getcwd))
597 (invoke "git" "config" "--global" "user.email" "git@example.com")
598 (invoke "git" "config" "--global" "user.name" "Guix")))
600 (lambda* (#:key inputs outputs #:allow-other-keys)
601 (let ((out (assoc-ref outputs "out"))
602 (git (assoc-ref inputs "git")))
603 (wrap-program (string-append out "/bin/gl")
604 `("PATH" ":" prefix (,(string-append git "/bin")))
606 (,(string-append out "/lib/python"
607 ,(version-major+minor
608 (package-version python))
610 ,(getenv "PYTHONPATH"))))
613 `(("git-for-tests" ,git-minimal)))
615 `(("git" ,git-minimal)
616 ("python-clint" ,python-clint)
617 ("python-pygit2" ,python-pygit2)
618 ("python-sh" ,python-sh)))
619 (home-page "https://gitless.com")
620 (synopsis "Simple version control system built on top of Git")
622 "Gitless is a Git-compatible version control system that aims to be easy to
623 learn and use. It simplifies the common workflow by committing changes to
624 tracked files by default and saving any uncommitted changes as part of a branch.
626 The friendly @command{gl} command-line interface gives feedback and helps you
627 figure out what to do next.
629 Gitless is implemented on top of Git and its commits and repositories are
630 indistinguishable from Git's. You (or other contributors) can always fall back
631 on @command{git}, and use any regular Git hosting service.")
632 (license license:expat)))
634 (define-public libgit2
640 (uri (string-append "https://github.com/libgit2/libgit2/"
641 "releases/download/v" version
642 "/libgit2-" version ".tar.gz"))
645 "0nlg35pxhh548nn7aa3y1m81mf81nkbzz86i2psps4f474n497v8"))
646 (patches (search-patches "libgit2-mtime-0.patch"))
648 (delete-file-recursively "deps") #t))
649 (modules '((guix build utils)))))
650 (build-system cmake-build-system)
651 (outputs '("out" "debug"))
654 (list "-DUSE_NTLMCLIENT=OFF" ;TODO: package this
655 "-DREGEX_BACKEND=pcre2"
656 "-DUSE_HTTP_PARSER=system"
657 ,@(if (%current-target-system)
659 "-DPKG_CONFIG_EXECUTABLE="
660 (assoc-ref %build-inputs "pkg-config")
661 "/bin/" ,(%current-target-system) "-pkg-config"))
664 (modify-phases %standard-phases
665 (add-after 'unpack 'fix-hardcoded-paths
667 (substitute* "tests/repo/init.c"
668 (("#!/bin/sh") (string-append "#!" (which "sh"))))
669 (substitute* "tests/clar/fs.h"
670 (("/bin/cp") (which "cp"))
671 (("/bin/rm") (which "rm")))
673 ;; Run checks more verbosely, unless we are cross-compiling.
675 (lambda* (#:key (tests? #t) #:allow-other-keys)
677 (invoke "./libgit2_clar" "-v" "-Q")
678 ;; Tests may be disabled if cross-compiling.
679 (format #t "Test suite not run.~%")))))))
681 `(("libssh2" ,libssh2)
682 ("http-parser" ,http-parser)))
684 `(("pkg-config" ,pkg-config)
687 ;; These libraries are in 'Requires.private' in libgit2.pc.
688 `(("openssl" ,openssl)
691 (home-page "https://libgit2.org/")
692 (synopsis "Library providing Git core methods")
694 "Libgit2 is a portable, pure C implementation of the Git core methods
695 provided as a re-entrant linkable library with a solid API, allowing you to
696 write native speed custom Git applications in any language with bindings.")
697 ;; GPLv2 with linking exception
698 (license license:gpl2)))
700 (define-public libgit2-0.28
707 (uri (string-append "https://github.com/libgit2/libgit2/releases/"
709 "/libgit2-" version ".tar.gz"))
712 "0hjgpqjjmkciw1i8jqkx9q2vhdc4fc99qajhrj2bq8ziwsp6hyrb"))
713 (patches (search-patches "libgit2-mtime-0.patch"))
714 (modules '((guix build utils)))
716 (delete-file-recursively "deps") #t))))))
718 (define-public git-crypt
726 (url "https://github.com/AGWA/git-crypt")
728 (file-name (git-file-name name version))
730 (base32 "1ba5s0fvmd9hhnfhfsjrm40v0qpxfnwc8vmm55m0k4dryzkzx66q"))))
731 (build-system gnu-build-system)
734 ("openssl" ,openssl)))
736 `(("docbook-xsl" ,docbook-xsl)
737 ("libxslt" ,libxslt)))
739 `(#:tests? #f ; No tests.
741 (modify-phases %standard-phases
743 (add-after 'unpack 'patch-makefile
744 (lambda* (#:key inputs #:allow-other-keys)
745 (substitute* "Makefile"
746 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
747 (string-append (assoc-ref inputs "docbook-xsl")
748 "/xml/xsl/docbook-xsl-"
749 ,(package-version docbook-xsl)
750 "/manpages/docbook.xsl")))
754 (invoke "make" "ENABLE_MAN=yes")))
756 (lambda* (#:key outputs #:allow-other-keys)
757 (let ((out (assoc-ref outputs "out")))
758 (invoke "make" "install"
760 (string-append "PREFIX=" out))))))))
761 (home-page "https://www.agwa.name/projects/git-crypt/")
762 (synopsis "Transparent encryption of files in a git repository")
763 (description "git-crypt enables transparent encryption and decryption of
764 files in a git repository. Files which you choose to protect are encrypted when
765 committed, and decrypted when checked out. git-crypt lets you freely share a
766 repository containing a mix of public and private content. git-crypt gracefully
767 degrades, so developers without the secret key can still clone and commit to a
768 repository with encrypted files. This lets you store your secret material (such
769 as keys or passwords) in the same repository as your code, without requiring you
770 to lock down your entire repository.")
771 (license license:gpl3+)))
773 (define-public git-remote-gcrypt
775 (name "git-remote-gcrypt")
780 (url "https://git.spwhitton.name/git-remote-gcrypt")
782 (file-name (string-append name "-" version "-checkout"))
785 "0n8fzvr6y0pxrbvkywlky2bd8jvi0ayp4n9hwi84l1ldmv4a40dh"))))
786 (build-system trivial-build-system)
788 `(#:modules ((guix build utils))
790 (use-modules (guix build utils))
791 (let* ((source (assoc-ref %build-inputs "source"))
792 (output (assoc-ref %outputs "out"))
793 (bindir (string-append output "/bin")))
794 (install-file (string-append source "/git-remote-gcrypt")
797 (home-page "https://spwhitton.name/tech/code/git-remote-gcrypt/")
798 (synopsis "Whole remote repository encryption")
799 (description "git-remote-gcrypt is a Git remote helper to push and pull from
800 repositories encrypted with GnuPG. It works with the standard Git transports,
801 including repository hosting services like GitLab.
803 Remote helper programs are invoked by Git to handle network transport. This
804 helper handles @code{gcrypt:} URLs that access a remote repository encrypted
805 with GPG, using our custom format.
807 Supported locations are local, @code{rsync://} and @code{sftp://}, where the
808 repository is stored as a set of files, or instead any Git URL where gcrypt
809 will store the same representation in a Git repository, bridged over arbitrary
812 The aim is to provide confidential, authenticated Git storage and
813 collaboration using typical untrusted file hosts or services.")
814 (license license:gpl3+)))
819 ;; Update the ‘git-source’ input as well.
824 "https://git.zx2c4.com/cgit/snapshot/cgit-"
828 "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss"))))
829 (build-system gnu-build-system)
831 '(#:tests? #f ; XXX: fail to build the in-source git.
833 #:make-flags '("CC=gcc" "SHELL_PATH=sh")
835 (modify-phases %standard-phases
836 (add-after 'unpack 'unpack-git
837 (lambda* (#:key inputs #:allow-other-keys)
838 ;; Unpack the source of git into the 'git' directory.
839 (invoke "tar" "--strip-components=1" "-C" "git" "-xf"
840 (assoc-ref inputs "git-source"))))
841 (add-after 'unpack 'patch-absolute-file-names
842 (lambda* (#:key inputs #:allow-other-keys)
843 (define (quoted-file-name input path)
844 (string-append "\"" input path "\""))
845 (substitute* "ui-snapshot.c"
847 (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
849 (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
851 (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
853 (substitute* "filters/about-formatting.sh"
854 (("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out")
855 "/lib/cgit/filters"))
856 (("\\| tr") (string-append "| " (which "tr"))))
858 (substitute* "filters/html-converters/txt2html"
859 (("sed") (which "sed")))
861 (substitute* "filters/html-converters/man2html"
862 (("groff") (which "groff")))
864 (substitute* "filters/html-converters/rst2html"
865 (("rst2html\\.py") (which "rst2html.py")))
868 (delete 'configure) ; no configure script
869 (add-after 'build 'build-man
870 (lambda* (#:key make-flags #:allow-other-keys)
871 (apply invoke "make" "doc-man" make-flags)))
873 (lambda* (#:key make-flags outputs #:allow-other-keys)
874 (let ((out (assoc-ref outputs "out")))
876 "make" "install" "install-man"
877 (string-append "prefix=" out)
878 (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
880 ;; Move the platform-dependent 'cgit.cgi' into lib to get it
882 (rename-file (string-append out "/share/cgit/cgit.cgi")
883 (string-append out "/lib/cgit/cgit.cgi"))
885 (add-after 'install 'wrap-python-scripts
886 (lambda* (#:key outputs #:allow-other-keys)
889 (wrap-program (string-append (assoc-ref outputs "out")
890 "/lib/cgit/filters/" file)
891 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
892 '("syntax-highlighting.py"
893 "html-converters/md2html"))
896 ;; For building manpage.
897 `(("asciidoc" ,asciidoc)
902 `(;; Building cgit requires a Git source tree.
906 ;; cgit is tightly bound to git. Use GIT_VER from the Makefile,
907 ;; which may not match the current (package-version git).
908 (uri "mirror://kernel.org/software/scm/git/git-2.25.4.tar.xz")
910 (base32 "11am6s46wmn1yll5614smjhzlghbqq6gysgcs64igjr9y5wzpdxq"))))
914 ("python-docutils" ,python-docutils)
915 ("python-markdown" ,python-markdown)
916 ("python-pygments" ,python-pygments)
918 (home-page "https://git.zx2c4.com/cgit/")
919 (synopsis "Web frontend for git repositories")
921 "CGit is an attempt to create a fast web interface for the Git SCM, using
922 a built-in cache to decrease server I/O pressure.")
923 (license license:gpl2)))
925 (define-public python-git-multimail
927 (name "python-git-multimail")
928 (version "1.5.0.post1")
932 (uri (pypi-uri "git-multimail" version))
935 "1zkrbsa70anwpw86ysfwalrb7nsr064kygfiyikyq1pl9pcl969y"))))
936 (build-system python-build-system)
939 (modify-phases %standard-phases
940 (add-after 'unpack 'patch
941 (lambda* (#:key inputs #:allow-other-keys)
942 (substitute* "git-multimail/git_multimail.py"
943 (("GIT_EXECUTABLE = 'git'")
944 (string-append "GIT_EXECUTABLE = '"
945 (assoc-ref inputs "git") "/bin/git"
947 (("/usr/sbin/sendmail")
948 (string-append (assoc-ref inputs "sendmail")
949 "/usr/sbin/sendmail")))
953 ("sendmail" ,sendmail)))
954 (home-page "https://github.com/git-multimail/git-multimail")
955 (synopsis "Send notification emails for Git pushes")
957 "This hook sends emails describing changes introduced by pushes to a Git
958 repository. For each reference that was changed, it emits one ReferenceChange
959 email summarizing how the reference was changed, followed by one Revision
960 email for each new commit that was introduced by the reference change.
962 This script is designed to be used as a post-receive hook in a Git
964 (license license:gpl2)))
966 (define-public python-ghp-import
968 (name "python-ghp-import")
974 (url "https://github.com/davisp/ghp-import")
976 (file-name (git-file-name name version))
978 (base32 "12pmw3zz3i57ljnm0rxdyjqdyhisbvy18mjwkb3bzp5pgzs2f45c"))))
979 (build-system python-build-system)
981 `(#:phases (modify-phases %standard-phases
982 (add-after 'install 'install-documentation
983 (lambda* (#:key outputs #:allow-other-keys)
984 (let* ((out (assoc-ref outputs "out"))
985 (doc (string-append out "/share/doc"))
986 (licenses (string-append out "/share/licenses")))
987 (install-file "README.md" doc)
988 (install-file "LICENSE" licenses)))))))
989 (home-page "https://github.com/davisp/ghp-import")
990 (synopsis "Copy directory to the gh-pages branch")
991 (description "Script that copies a directory to the gh-pages branch (by
992 default) of the repository.")
994 ;; See <https://bugs.gnu.org/27913>.
995 (license (license:non-copyleft
996 "https://raw.githubusercontent.com/davisp/ghp-import/master/LICENSE"
997 "Tumbolia Public License"))))
999 (define-public python2-ghp-import
1000 (package-with-python2
1001 (strip-python2-variant python-ghp-import)))
1003 (define-public python-gitdb
1005 (name "python-gitdb")
1009 (uri (pypi-uri "gitdb" version))
1012 "0l113fphn6msjl3cl3kyf332b6lal7daxdd0nfma0x9ipfb013jr"))))
1013 (build-system python-build-system)
1015 `(#:phases (modify-phases %standard-phases
1016 (add-before 'check 'create-test-repository
1018 (mkdir "/tmp/testrepo")
1019 ;; Some tests require a git repository, so create one.
1020 (with-directory-excursion "/tmp/testrepo"
1021 (do ((filecount 1 (1+ filecount)))
1022 ((> filecount 1000))
1023 (call-with-output-file (string-append
1024 "file" (number->string filecount))
1026 (format port "~a" filecount))))
1028 (invoke "git" "init")
1029 (invoke "git" "config" "user.name" "Total Git")
1030 (invoke "git" "config" "user.email" "git@localhost")
1031 (invoke "git" "add" "-A")
1032 (invoke "git" "commit" "-q" "-m" "dummy commit")))
1034 ;; The repository checkout must be a "bare" clone.
1035 (invoke "git" "clone" "--bare" "/tmp/testrepo"
1036 "/tmp/testrepo.git")))
1039 (setenv "GITDB_TEST_GIT_REPO_BASE" "/tmp/testrepo.git")
1040 ;; Skip tests that must be run from the gitdb repository.
1041 (setenv "TRAVIS" "1")
1042 (invoke "nosetests" "-v"))))))
1044 `(("python-smmap" ,python-smmap)))
1047 ("python-nose" ,python-nose)))
1048 (home-page "https://github.com/gitpython-developers/gitdb")
1049 (synopsis "Python implementation of the Git object database")
1051 "GitDB allows you to access @dfn{bare} Git repositories for reading and
1052 writing. It aims at allowing full access to loose objects as well as packs
1053 with performance and scalability in mind. It operates exclusively on streams,
1054 allowing to handle large objects with a small memory footprint.")
1055 (license license:bsd-3)))
1057 (define-public python-gitpython
1059 (name "python-gitpython")
1063 (uri (pypi-uri "GitPython" version))
1066 "1jzllsy9lwc9yibccgv7h9naxisazx2n3zmpy21c8n5xhysw69p4"))))
1067 (build-system python-build-system)
1069 `(#:tests? #f ;XXX: Tests can only be run within the GitPython repository.
1070 #:phases (modify-phases %standard-phases
1071 (add-after 'unpack 'embed-git-reference
1072 (lambda* (#:key inputs #:allow-other-keys)
1073 (substitute* "git/cmd.py"
1074 (("git_exec_name = \"git\"")
1075 (string-append "git_exec_name = \""
1076 (assoc-ref inputs "git")
1082 `(("python-gitdb" ,python-gitdb)))
1084 `(("python-ddt" ,python-ddt)
1085 ("python-nose" ,python-nose)))
1086 (home-page "https://github.com/gitpython-developers/GitPython")
1087 (synopsis "Python library for interacting with Git repositories")
1089 "GitPython is a python library used to interact with Git repositories,
1090 high-level like git-porcelain, or low-level like git-plumbing.
1092 It provides abstractions of Git objects for easy access of repository data,
1093 and additionally allows you to access the Git repository more directly using
1094 either a pure Python implementation, or the faster, but more resource intensive
1095 @command{git} command implementation.")
1096 (license license:bsd-3)))
1098 (define-public shflags
1105 (url "https://github.com/kward/shflags")
1106 (commit (string-append "v" version))))
1107 (file-name (git-file-name name version))
1110 "1ydx0sb6vz9s2dgp5bd64y7fpzh9qvmlfjxrbmzac8saknijrlly"))))
1111 (build-system gnu-build-system)
1113 `(#:tests? #f ; no tests
1115 (modify-phases %standard-phases
1116 (delete 'configure) ; nothing to configure
1117 (delete 'build) ; nothing to build
1119 (lambda* (#:key outputs #:allow-other-keys)
1120 (let* ((out (assoc-ref outputs "out"))
1121 (src (string-append out "/src")))
1122 (install-file "shflags" src)
1124 (home-page "https://github.com/kward/shflags")
1125 (synopsis "Command-line flags library for shell scripts")
1127 "Shell Flags (shFlags) is a library written to greatly simplify the
1128 handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
1129 ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
1130 different versions of getopt on various OSes make writing portable shell
1131 scripts difficult. shFlags instead provides an API that doesn't change across
1132 shell and OS versions so the script writer can be confident that the script
1134 (license license:lgpl2.1)))
1136 (define-public git-flow
1139 ;; This version has not be officially released yet, so we build it
1140 ;; directly from the git repository.
1145 (url "https://github.com/petervanderdoes/gitflow-avh/")
1147 (file-name (git-file-name name version))
1150 "13q4mnrxr03wz2dkhzy73j384g299m4d545cnhxcaznvdwfany4h"))))
1151 (build-system gnu-build-system)
1152 (inputs `(("shflags" ,shflags)))
1154 '(#:tests? #f ; no tests
1155 #:make-flags (list (string-append "prefix="
1156 (assoc-ref %outputs "out")))
1158 (modify-phases %standard-phases
1159 (add-after 'unpack 'reset-shFlags-link
1160 (lambda* (#:key inputs #:allow-other-keys)
1161 ;; The link points to a file in the shFlags submodule.
1162 ;; Redirect it to point to our system shFlags.
1163 (let ((shflags (assoc-ref inputs "shflags")))
1165 (delete-file "gitflow-shFlags")
1166 (symlink (string-append shflags "/src/shflags")
1167 "gitflow-shFlags")))))
1170 (home-page "https://nvie.com/posts/a-successful-git-branching-model/")
1171 (synopsis "Git extensions for Vincent Driessen's branching model")
1173 "Vincent Driessen's branching model is a git branching and release
1174 management strategy that helps developers keep track of features, hotfixes,
1175 and releases in bigger software projects. The git-flow library of git
1176 subcommands helps automate some parts of the flow to make working with it a
1178 (license license:bsd-2)))
1180 (define-public stgit
1188 (url "https://github.com/ctmarinas/stgit")
1189 (commit (string-append "v" version))))
1190 (file-name (git-file-name name version))
1192 (base32 "00pmz93znl418lsjwy4mr0chp8i2w27h1xjysa05f62smsv91yyc"))))
1193 (build-system python-build-system)
1200 (modify-phases %standard-phases
1201 (add-after 'unpack 'hard-code-version
1203 ;; setup.py tries to cleverly extract the version number from the
1204 ;; git history, which the source checkout lacks. Hard-code one.
1205 (substitute* "setup.py"
1207 (format #f "'~a'" ,version)))
1209 (add-before 'check 'patch-tests
1211 (substitute* (list "t/t1900-mail.sh"
1212 "t/t7504-commit-msg-hook.sh")
1220 (string-append "SHELL_PATH=" (which "bash"))
1222 (home-page "http://procode.org/stgit/")
1223 (synopsis "Stacked Git")
1225 "StGit is a command-line application that provides functionality similar
1226 to Quilt (i.e., pushing/popping patches to/from a stack), but using Git
1227 instead of @command{diff} and @command{patch}. StGit stores its patches in a
1228 Git repository as normal Git commits, and provides a number of commands to
1229 manipulate them in various ways.")
1230 (license license:gpl2)))
1235 (version "1.20151229")
1240 (url "https://github.com/RichiH/vcsh")
1241 (commit (string-append "v" version))))
1242 (file-name (git-file-name name version))
1244 (base32 "1grpj45nbpv4j60vd2kg4rj53zrm0bc0h9l4pfd3c2mwbvywm6ab"))))
1245 (build-system gnu-build-system)
1247 `(("which" ,which)))
1251 ("perl-test-harness" ,perl-test-harness)
1252 ("perl-shell-command" ,perl-shell-command)
1253 ("perl-test-most" ,perl-test-most)))
1255 '(#:phases (modify-phases %standard-phases
1258 #:make-flags (list (string-append "PREFIX="
1259 (assoc-ref %outputs "out")))
1260 #:test-target "test"))
1261 (home-page "https://github.com/RichiH/vcsh")
1262 (synopsis "Version control system for @code{$HOME}")
1264 "vcsh version-controls configuration files in several Git repositories,
1265 all in one single directory. They all maintain their working trees without
1266 clobbering each other or interfering otherwise. By default, all Git
1267 repositories maintained via vcsh store the actual files in @code{$HOME},
1268 though this can be overridden.")
1269 (license license:gpl2+)))
1271 (define-public git-test-sequence
1272 (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76"))
1274 (name "git-test-sequence")
1275 (version (string-append "20140312." (string-take commit 7)))
1279 ;; There are many other scripts in this directory; we
1280 ;; are interested in just one for this package.
1281 (url "https://github.com/dustin/bindir")
1283 (file-name (git-file-name name version))
1286 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
1287 (build-system trivial-build-system)
1289 `(#:modules ((guix build utils))
1291 (use-modules (guix build utils))
1292 (let* ((source (assoc-ref %build-inputs "source"))
1293 (output (assoc-ref %outputs "out"))
1294 (bindir (string-append output "/bin"))
1295 (script "git-test-sequence"))
1296 (install-file (string-append source "/" script)
1299 (home-page "https://dustin.sallings.org/2010/03/28/git-test-sequence.html")
1300 (synopsis "Run a command over a sequence of commits")
1302 "git-test-sequence is similar to an automated git bisect except it’s
1303 linear. It will test every change between two points in the DAG. It will
1304 also walk each side of a merge and test those changes individually.")
1305 (license (license:x11-style "file://LICENSE")))))
1307 (define-public gitolite
1315 (url "https://github.com/sitaramc/gitolite")
1316 (commit (string-append "v" version))))
1317 (file-name (git-file-name name version))
1319 (base32 "1rkj7gknwjlc5ij9w39zf5mr647bm45la57yjczydmvrb8c56yrh"))))
1320 (build-system gnu-build-system)
1322 '(#:tests? #f ; no tests
1323 #:phases (modify-phases %standard-phases
1326 (add-before 'install 'patch-scripts
1327 (lambda* (#:key inputs #:allow-other-keys)
1328 (let ((perl (string-append (assoc-ref inputs "perl")
1330 ;; This seems to take care of every shell script that
1332 (substitute* (find-files "." ".*")
1334 (string-append " " perl " -")))
1336 (substitute* (find-files "src/triggers" ".*")
1338 (string-append " " (which "sed") " ")))
1341 '("src/triggers/post-compile/update-gitweb-access-list"
1342 "src/triggers/post-compile/ssh-authkeys-split"
1343 "src/triggers/upstream")
1345 (string-append " " (which "grep") " ")))
1347 ;; Avoid references to the store in authorized_keys.
1348 ;; This works because gitolite-shell is in the PATH.
1349 (substitute* "src/triggers/post-compile/ssh-authkeys"
1350 (("\\$glshell \\$user")
1351 "gitolite-shell $user"))
1353 (add-before 'install 'patch-source
1354 (lambda* (#:key inputs #:allow-other-keys)
1355 ;; Gitolite uses cat to test the readability of the
1357 (substitute* "src/lib/Gitolite/Setup.pm"
1359 (string-append "\"" (which "cat") " "))
1361 (string-append "\"" (which "ssh-keygen"))))
1363 (substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
1364 "src/lib/Gitolite/Hooks/Update.pm")
1366 (string-append (assoc-ref inputs "perl")
1369 (substitute* "src/lib/Gitolite/Common.pm"
1371 (string-append "\"" (which "ssh-keygen")))
1374 (assoc-ref inputs "inetutils")
1379 (lambda* (#:key outputs #:allow-other-keys)
1380 (let* ((output (assoc-ref outputs "out"))
1381 (sharedir (string-append output "/share/gitolite"))
1382 (bindir (string-append output "/bin")))
1385 (invoke "./install" "-to" sharedir)
1386 ;; Create symlinks for executable scripts in /bin.
1387 (for-each (lambda (script)
1388 (symlink (string-append sharedir "/" script)
1389 (string-append bindir "/" script)))
1390 '("gitolite" "gitolite-shell"))
1392 (add-after 'install 'wrap-scripts
1393 (lambda* (#:key inputs outputs #:allow-other-keys)
1394 (let ((out (assoc-ref outputs "out"))
1395 (coreutils (assoc-ref inputs "coreutils"))
1396 (findutils (assoc-ref inputs "findutils"))
1397 (git (assoc-ref inputs "git")))
1398 (wrap-program (string-append out "/bin/gitolite")
1401 (string-append dir "/bin"))
1402 (list out coreutils findutils git))))
1406 ("coreutils" ,coreutils)
1407 ("findutils" ,findutils)
1408 ("inetutils" ,inetutils)))
1409 ;; git and openssh are propagated because trying to patch the source via
1410 ;; regexp matching is too brittle and prone to false positives.
1413 ("openssh" ,openssh)))
1414 (home-page "https://gitolite.com")
1415 (synopsis "Git access control layer")
1417 "Gitolite is an access control layer on top of Git, providing fine access
1418 control to Git repositories.")
1419 (license license:gpl2)))
1421 (define (mercurial-patch name revision hash)
1424 (uri (string-append "https://www.mercurial-scm.org/repo/hg/raw-rev/" revision))
1425 (file-name (string-append "mercurial-" name ".patch"))
1426 (sha256 (base32 hash))))
1428 (define %mercurial-patches
1430 ;; These three patches fixes compatibility with the updated gzip module
1431 ;; in Python 3.8.2: <https://bz.mercurial-scm.org/show_bug.cgi?id=6284>.
1432 (mercurial-patch "python-mtime" "6c36a521572edf3a79ee567b118469b3192037cc"
1433 "0bmm7y40r8s081ws2sjvn1v8kvyfan4a97jl0fhdh7yc2pzxlzqq")
1434 (mercurial-patch "indent-gzip" "a23b859ad17dd0a5b9bb37846b69b5e30f99c44c"
1435 "1spscv9dgqv38m7h1liki93ax6w97gxayg17fr7wr6acjdfccpr9")
1436 (mercurial-patch "python-gzip" "b7ca03dff14c63d64ad7bfa36a2d0a36a6b62253"
1437 "0p88ffhx0kk21ssrsb156ffhpcb7g8mkwwkmq49qpmbm5ag2paf0")
1438 ;; This fixes an incompatibility with os.isfile in Python 3.8:
1439 ;; <https://bz.mercurial-scm.org/show_bug.cgi?id=6287>.
1440 (mercurial-patch "os-isfile" "6a8738dc4a019da4c9df5c26961aa09d45ce1c68"
1441 "0lr069m12kzrkmr1pmhaxg5lxmdwxabsza61qp1i1q70g7sy8lvy")))
1443 (define-public mercurial
1449 (uri (string-append "https://www.mercurial-scm.org/"
1450 "release/mercurial-" version ".tar.gz"))
1451 (patches %mercurial-patches)
1454 "1nbjpzjrzgql4hrvslpxwbcgn885ikq6ba1yb4w6p78rw9nzkhgp"))))
1455 (build-system python-build-system)
1458 (modify-phases %standard-phases
1459 (add-after 'unpack 'patch-tests
1461 (substitute* '("tests/test-extdiff.t"
1462 "tests/test-logtoprocess.t"
1463 "tests/test-patchbomb.t"
1464 "tests/test-run-tests.t"
1465 "tests/test-transplant.t")
1470 (lambda* (#:key tests? #:allow-other-keys)
1471 (with-directory-excursion "tests"
1472 ;; The following tests are known to fail.
1473 (for-each delete-file
1474 '(;; XXX: This test calls 'run-tests.py --with-hg=
1475 ;; `which hg`' and fails because there is no hg on
1476 ;; PATH from before (that's why we are building it!)?
1479 ;; FIXME: Why does this fail in the build container, but
1480 ;; not in 'guix environment -C' (even without /bin/sh)?
1481 "test-nointerrupt.t"
1483 ;; TODO: the fqaddr() call fails in the build
1484 ;; container, causing these server tests to fail.
1486 "test-http-branchmap.t"
1487 "test-pull-bundle.t"
1490 "test-subrepo-deep-nested-change.t"
1491 "test-subrepo-recursion.t"))
1493 (invoke "./run-tests.py"
1494 ;; ‘make check’ does not respect ‘-j’.
1495 (string-append "-j" (number->string
1496 (parallel-job-count)))
1497 ;; The default time-outs are too low for many systems.
1498 ;; Raise them generously: Guix enforces its own.
1500 "--slowtimeout" "86400"
1501 ;; The test suite takes a long time and produces little
1502 ;; output by default. Prevent timeouts due to silence.
1505 ;; The following inputs are only needed to run the tests.
1507 `(("python-nose" ,python-nose)
1510 (home-page "https://www.mercurial-scm.org/")
1511 (synopsis "Decentralized version control system")
1513 "Mercurial is a free, distributed source control management tool.
1514 It efficiently handles projects of any size
1515 and offers an easy and intuitive interface.")
1516 (license license:gpl2+)))
1524 (uri (string-append "http://www.webdav.org/neon/neon-"
1528 "1jpvczcx658vimqm7c8my2q41fnmjaf1j03g7bsli6rjxk6xh2yv"))))
1529 (build-system gnu-build-system)
1532 ("pkg-config" ,pkg-config)))
1534 `(("libxml2" ,libxml2)
1535 ("openssl" ,openssl)
1538 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
1539 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
1541 #:configure-flags '("--enable-shared"
1542 ;; requires libgnutils-config, deprecated
1544 ; "--with-ssl=gnutls")))
1545 "--with-ssl=openssl")))
1546 (home-page "http://www.webdav.org/neon/")
1547 (synopsis "HTTP and WebDAV client library")
1549 "Neon is an HTTP and WebDAV client library, with a C interface and the
1552 @item High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
1554 @item low-level interface to the HTTP request/response engine, allowing the use
1555 of arbitrary HTTP methods, headers, etc.;
1556 @item authentication support including Basic and Digest support, along with
1557 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
1558 @item SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
1559 verifying server certificates, handling client certificates, and examining
1560 certificate properties, smartcard-based client certificates are also
1561 supported via a PKCS#11 wrapper interface;
1562 @item abstract interface to parsing XML using libxml2 or expat, and wrappers for
1563 simplifying handling XML HTTP response bodies;
1564 @item WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
1565 property manipulation.
1567 (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+
1569 (define-public subversion
1575 (uri (string-append "mirror://apache/subversion/"
1576 "subversion-" version ".tar.bz2"))
1579 "00i1f88snlpcnsycpn6r315h6792l5nkr2p5k6kq6yprz4cf5a3b"))))
1580 (build-system gnu-build-system)
1582 '(#:parallel-tests? #f ; TODO Seems to cause test failures on
1584 #:configure-flags '("--enable-static=no")
1586 (modify-phases %standard-phases
1587 (add-after 'configure 'patch-libtool-wrapper-ls
1588 (lambda* (#:key inputs #:allow-other-keys)
1589 ;; This substitution allows tests svnauthz_tests and svnlook_tests
1590 ;; to pass. These tests execute svnauthz and svnlook through
1591 ;; their libtool wrapper scripts from svn hooks, whose empty
1592 ;; environments cause "ls: command not found" errors. It would be
1593 ;; nice if this fix ultimately made its way into libtool.
1594 (let ((coreutils (assoc-ref inputs "coreutils")))
1595 (substitute* "libtool"
1596 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))
1598 (add-before 'build 'patch-test-sh
1600 (substitute* "subversion/tests/libsvn_repos/repos-test.c"
1601 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1603 (add-before 'check 'set-PARALLEL
1604 (lambda* (#:key parallel-tests? #:allow-other-keys)
1606 (setenv "PARALLEL" (number->string (parallel-job-count)))
1607 (simple-format #t "parallel-tests? are disabled\n"))
1609 (add-after 'install 'install-perl-bindings
1610 (lambda* (#:key outputs #:allow-other-keys)
1611 ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
1612 (let ((out (assoc-ref outputs "out")))
1613 (invoke "make" "swig-pl-lib")
1614 ;; FIXME: Test failures.
1615 ;; (invoke "make" "check-swig-pl")
1616 (invoke "make" "install-swig-pl-lib")
1618 ;; Set the right installation prefix.
1619 (with-directory-excursion
1620 "subversion/bindings/swig/perl/native"
1621 (invoke "perl" "Makefile.PL"
1623 (string-append "PREFIX=" out))
1624 (invoke "make" "install"
1625 (string-append "OTHERLDFLAGS="
1629 `(("pkg-config" ,pkg-config)
1630 ;; For the Perl bindings.
1634 ("apr-util" ,apr-util)
1638 ("python" ,python-wrapper)
1640 ("utf8proc" ,utf8proc)
1642 (home-page "https://subversion.apache.org/")
1643 (synopsis "Revision control system")
1645 "@dfn{Subversion} (svn) exists to be recognized and adopted as a
1646 centralized version control system characterized by its
1647 reliability as a safe haven for valuable data; the simplicity of its model and
1648 usage; and its ability to support the needs of a wide variety of users and
1649 projects, from individuals to large-scale enterprise operations.")
1650 (license license:asl2.0)))
1658 (uri (string-append "mirror://gnu/rcs/rcs-"
1662 "1zsx7bb0rgvvvisiy4zlixf56ay8wbd9qqqcp1a1g0m1gl6mlg86"))
1663 (patches (search-patches "rcs-5.9.4-noreturn.patch"))))
1664 (build-system gnu-build-system)
1665 (native-inputs `(("ed" ,ed)))
1667 `(#:phases (modify-phases %standard-phases
1668 (add-before 'check 'disable-t810
1669 ;; See https://savannah.gnu.org/bugs/index.php?52288
1670 ;; Back-porting the fix is non-trivial, so disable for now.
1672 (substitute* "tests/Makefile"
1673 ((" t810 \\\\\n") ""))
1675 (home-page "https://www.gnu.org/software/rcs/")
1676 (synopsis "Per-file local revision control system")
1678 "RCS is the original Revision Control System. It works on a
1679 file-by-file basis, in contrast to subsequent version control systems such as
1680 CVS, Subversion, and Git. This can make it suitable for system
1681 administration files, for example, which are often inherently local to one
1683 (license license:gpl3+)))
1692 "https://ftp.gnu.org/non-gnu/cvs/source/feature/"
1693 version "/cvs-" version ".tar.bz2"))
1694 (patches (search-patches "cvs-CVE-2017-12836.patch"))
1697 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
1698 (build-system gnu-build-system)
1700 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
1702 #:configure-flags (list "--with-external-zlib")))
1703 (inputs `(("zlib" ,zlib)
1704 ("nano" ,nano))) ; the default editor
1705 (home-page "http://cvs.nongnu.org")
1706 (synopsis "Historical centralized version control system")
1708 "CVS is a version control system, an important component of Source
1709 Configuration Management (SCM). Using it, you can record the history of
1710 sources files, and documents. It fills a similar role to the free software
1711 RCS, PRCS, and Aegis packages.")
1712 (license license:gpl1+)))
1714 (define-public cvs-fast-export
1716 (name "cvs-fast-export")
1720 (uri (string-append "http://www.catb.org/~esr/cvs-fast-export/"
1721 "cvs-fast-export-" version ".tar.gz"))
1724 "06y2myhhv2ap08bq7d7shq0b7lq6wgznwrpz6622xq66cxkf2n5g"))))
1725 (build-system gnu-build-system)
1728 (modify-phases %standard-phases
1729 (delete 'configure)) ; no configure script
1730 #:parallel-build? #f ; parallel a2x commands fail spectacularly
1732 (list "CC=gcc" (string-append "prefix?=" (assoc-ref %outputs "out")))))
1735 ("python" ,python-wrapper)))
1737 `(("asciidoc" ,asciidoc)
1738 ;; These are needed for the tests.
1741 (home-page "http://www.catb.org/esr/cvs-fast-export/")
1742 (synopsis "Export an RCS or CVS history as a fast-import stream")
1743 (description "This program analyzes a collection of RCS files in a CVS
1744 repository (or outside of one) and, when possible, emits an equivalent history
1745 in the form of a fast-import stream. Not all possible histories can be
1746 rendered this way; the program tries to emit useful warnings when it can't.
1748 The program can also produce a visualization of the resulting commit directed
1749 acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org,
1750 Graphviz}. The package also includes @command{cvssync}, a tool for mirroring
1751 masters from remote CVS hosts.")
1752 (license license:gpl2+)))
1754 (define-public vc-dwim
1760 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
1764 "0mf1dd7wdqxsm4fcfinfd7iadzarmzvg747pbsbi32qpavpk8gdf"))))
1765 (build-system gnu-build-system)
1766 (inputs `(("perl" ,perl)))
1768 `(("emacs" ,emacs-minimal) ; for `ctags'
1769 ("inetutils" ,inetutils))) ; for `hostname', used in the tests
1770 (home-page "https://www.gnu.org/software/vc-dwim/")
1771 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
1773 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
1774 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
1775 using version control at the same time, for example by printing a reminder
1776 when a file change has been described in the ChangeLog but the file has not
1777 been added to the VC. vc-chlog scans changed files and generates
1778 standards-compliant ChangeLog entries based on the changes that it detects.")
1779 (license license:gpl3+)))
1781 (define-public diffstat
1789 (string-append "ftp://invisible-island.net/diffstat/"
1790 "diffstat-" version ".tgz")
1791 (string-append "http://invisible-mirror.net/archives/diffstat/"
1792 "diffstat-" version ".tgz")))
1795 "0vyw200s5dv1257pmrh6c6fdkmw3slyz5szpqfx916xr04sdbpby"))))
1796 (build-system gnu-build-system)
1797 (home-page "https://invisible-island.net/diffstat/")
1798 (synopsis "Make histograms from the output of @command{diff}")
1800 "Diffstat reads the output of @command{diff} and displays a histogram of
1801 the insertions, deletions, and modifications per file. It is useful for
1802 reviewing large, complex patch files.")
1803 (license (license:x11-style "file://COPYING"))))
1811 (uri (string-append "mirror://gnu/" name "/CSSC-"
1815 "1vsisqq573xjr2qpn19iwmpqgl3mq03m790akpa4rvj60b4d1gni"))))
1816 (build-system gnu-build-system)
1819 (modify-phases %standard-phases
1820 (add-before 'check 'precheck
1823 (substitute* "tests/common/test-common"
1824 (("/bin/pwd") (which "pwd")))
1826 (substitute* "tests/prt/all-512.sh"
1827 (("/bin/sh") (which "sh")))
1829 ;; XXX: This test has no hope of passing until there is a "nogroup"
1830 ;; entry (or at least some group to which the guix builder does
1831 ;; not belong) in the /etc/group file of the build environment.
1832 ;; Currently we do not have such a group. Disable this test for now.
1833 (substitute* "tests/Makefile"
1834 (("test-delta ") ""))))))))
1835 ;; These are needed for the tests
1836 (native-inputs `(("git" ,git)
1838 (home-page "https://www.gnu.org/software/cssc/")
1839 (synopsis "File-based version control like SCCS")
1840 (description "GNU CSSC provides a replacement for the legacy Unix source
1841 code control system SCCS. This allows old code still under that system to be
1842 accessed and migrated on modern systems.")
1843 (license license:gpl3+)))
1845 ;; This package can unfortunately work only in -TEST mode, since Aegis
1846 ;; requires that it is installed setuid root.
1847 (define-public aegis
1853 (uri (string-append "mirror://sourceforge/aegis/aegis/" version
1854 "/aegis-" version ".tar.gz"))
1857 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
1858 (patches (search-patches "aegis-perl-tempdir1.patch"
1859 "aegis-perl-tempdir2.patch"
1860 "aegis-test-fixup-1.patch"
1861 "aegis-test-fixup-2.patch"
1862 "aegis-constness-error.patch"))))
1863 (build-system gnu-build-system)
1865 `(("e2fsprogs" ,e2fsprogs)
1868 ("libxml2" ,libxml2)
1870 ("gettext" ,gettext-minimal)))
1875 ;; Various tests require the following:
1879 ("subversion" ,subversion)
1883 `(#:configure-flags (list "--with-no-aegis-configured"
1884 "--sharedstatedir=/var/com/aegis"
1885 ;; Uses the old 'throw()' specifier with 'new'
1886 ;; which changed in C++11.
1887 "CXXFLAGS=-std=c++03")
1888 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
1890 (modify-phases %standard-phases
1891 (add-before 'configure 'pre-conf
1893 (substitute* (append '("configure"
1894 "etc/check-tar-gz.sh"
1898 "script/aebisect.in"
1899 "script/aeintegratq.in"
1901 "script/test_funcs.in"
1902 "web/eg_oss_templ.sh"
1904 "libaegis/getpw_cache.cc")
1905 (find-files "test" "\\.sh"))
1906 (("/bin/sh") (which "sh")))
1907 (setenv "SH" (which "sh"))
1911 (let ((home (string-append (getcwd) "/my-new-home")))
1912 ;; Some tests need to write to $HOME.
1914 (setenv "HOME" home)
1916 ;; This test assumes that flex has been symlinked to "lex".
1917 (substitute* "test/00/t0011a.sh"
1918 (("type lex") "type flex"))
1920 ;; XXX Disable tests that fail, for unknown reasons, ‘for now’.
1922 (lambda (test) (substitute* "Makefile"
1923 (((string-append "test/" test "\\.ES ")) "")))
1928 ;; The author decided to call the check rule "sure".
1929 (invoke "make" "sure")))))))
1930 (home-page "https://sourceforge.net/projects/aegis/")
1931 (synopsis "Project change supervisor")
1932 (description "Aegis is a project change supervisor, and performs some of
1933 the Software Configuration Management needed in a CASE environment. Aegis
1934 provides a framework within which a team of developers may work on many
1935 changes to a program independently, and Aegis coordinates integrating these
1936 changes back into the master source of the program, with as little disruption
1937 as possible. Resolution of contention for source files, a major headache for
1938 any project with more than one developer, is one of Aegis's major functions.")
1939 (license license:gpl3+)))
1941 (define-public reposurgeon
1943 (name "reposurgeon")
1947 (uri (string-append "http://www.catb.org/~esr/" name "/"
1948 name "-" version ".tar.xz"))
1951 "1af0z14wcm4bk5a9ysinbwq2fp3lf5f7i8mvwh7286hr3fnagcaz"))
1952 (patches (search-patches
1953 "reposurgeon-add-missing-docbook-files.patch"))))
1954 (build-system gnu-build-system)
1958 (string-append "target=" (assoc-ref %outputs "out")))
1960 (modify-phases %standard-phases
1961 (add-after 'unpack 'patch-inputs
1962 (lambda* (#:key inputs #:allow-other-keys)
1963 (let ((tzdata (assoc-ref inputs "tzdata")))
1964 (substitute* "reposurgeon"
1965 (("/usr/share/zoneinfo")
1966 (string-append tzdata "/share/zoneinfo")))
1967 (substitute* "test/svn-to-svn"
1968 (("/bin/echo") "echo"))
1970 (delete 'configure) ; no configure script
1971 (add-before 'build 'fix-docbook
1972 (lambda* (#:key inputs #:allow-other-keys)
1973 (substitute* (find-files "." "\\.xml$")
1974 (("docbook/docbookx.dtd")
1975 (string-append (assoc-ref inputs "docbook-xml")
1976 "/xml/dtd/docbook/docbookx.dtd")))
1978 (add-before 'check 'set-up-test-environment
1979 (lambda* (#:key inputs #:allow-other-keys)
1980 (let ((tzdata (assoc-ref inputs "tzdata")))
1981 (setenv "TZDIR" (string-append tzdata "/share/zoneinfo"))
1983 (add-after 'install 'install-emacs-data
1984 (lambda* (#:key outputs #:allow-other-keys)
1985 (install-file "reposurgeon-mode.el"
1986 (string-append (assoc-ref outputs "out")
1987 "/share/emacs/site-lisp"))
1990 `(("python" ,python-wrapper)
1991 ("tzdata" ,tzdata)))
1993 `( ;; For building documentation.
1994 ("asciidoc" ,asciidoc)
1995 ("docbook-xml" ,docbook-xml)
1996 ("docbook-xsl" ,docbook-xsl)
1997 ("libxml2" ,libxml2)
2003 ("mercurial" ,mercurial)
2004 ("subversion" ,subversion)))
2005 (home-page "http://www.catb.org/~esr/reposurgeon/")
2006 (synopsis "Edit version-control repository history")
2007 (description "Reposurgeon enables risky operations that version-control
2008 systems don't want to let you do, such as editing past comments and metadata
2009 and removing commits. It works with any version control system that can
2010 export and import Git fast-import streams, including Git, Mercurial, Fossil,
2011 Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly
2012 and can thus be used to script production of very high-quality conversions
2013 from Subversion to any supported Distributed Version Control System (DVCS).")
2014 ;; Most files are distributed under bsd-2, except 'repocutter' which is
2016 (license (list license:bsd-2 license:bsd-3))))
2025 "https://github.com/jonas/tig/releases/download/tig-"
2026 version "/tig-" version ".tar.gz"))
2029 "0r4y9hyvpkplaxrzslws3asz652d83qh3bjwvmp8assga8s5s3ah"))))
2030 (build-system gnu-build-system)
2032 `(("asciidoc" ,asciidoc)
2035 `(("ncurses" ,ncurses)
2036 ("readline" ,readline)))
2039 (modify-phases %standard-phases
2040 (add-after 'install 'install-doc
2042 (invoke "make" "install-doc"))))
2043 #:test-target "test"
2044 #:tests? #f)) ; tests require access to /dev/tty
2045 (home-page "https://jonas.github.io/tig/")
2046 (synopsis "Ncurses-based text user interface for Git")
2048 "Tig is an ncurses text user interface for Git, primarily intended as
2049 a history browser. It can also stage hunks for commit, or colorize the
2050 output of the @code{git} command.")
2051 (license license:gpl2+)))
2053 (define-public findnewest
2061 (url "https://github.com/0-wiz-0/findnewest")
2062 (commit (string-append "findnewest-" version))))
2063 (file-name (git-file-name name version))
2065 (base32 "1x1cbn2b27h5r0ah5xc06fkalfdci2ngrgd4wibxjw0h88h0nvgq"))))
2066 (build-system gnu-build-system)
2067 (native-inputs `(("autoconf" ,autoconf)
2068 ("automake" ,automake)))
2069 (home-page "https://github.com/0-wiz-0/findnewest/releases")
2070 (synopsis "Print the modification time of the latest file")
2072 "Recursively find the newest file in a file tree and print its
2073 modification time.")
2074 (license license:bsd-2)))
2076 (define-public myrepos
2079 (version "1.20180726")
2084 (url "git://myrepos.branchable.com/myrepos")
2086 (file-name (string-append name "-" version "-checkout"))
2088 (base32 "0jphw61plm8cgklja6hs639xhdvxgvjwbr6jpvjwpp7hc5gmhms5"))))
2089 (build-system gnu-build-system)
2091 '(#:test-target "test"
2092 #:make-flags (list (string-append "PREFIX=" %output))
2094 (modify-phases %standard-phases
2096 (add-after 'install 'wrap-webcheckout
2097 (lambda* (#:key inputs outputs #:allow-other-keys)
2098 (let ((out (assoc-ref outputs "out")))
2099 (wrap-program (string-append out "/bin/webcheckout")
2100 `("PERL5LIB" ":" prefix
2101 ,(map (lambda (i) (string-append (assoc-ref inputs i)
2102 "/lib/perl5/site_perl"))
2103 '("perl-encode-locale" "perl-http-date"
2104 "perl-http-message" "perl-html-parser" "perl-libwww"
2105 "perl-uri" "perl-try-tiny"))))
2109 ("perl-encode-locale" ,perl-encode-locale)
2110 ("perl-html-parser" ,perl-html-parser)
2111 ("perl-http-date" ,perl-http-date)
2112 ("perl-http-message" ,perl-http-message)
2113 ("perl-libwww" ,perl-libwww)
2114 ("perl-try-tiny" ,perl-try-tiny)
2115 ("perl-uri" ,perl-uri)))
2116 (home-page "https://myrepos.branchable.com/")
2117 (synopsis "Multiple repository management tool")
2119 "Myrepos provides the @code{mr} command, which maps an operation (e.g.,
2120 fetching updates) over a collection of version control repositories. It
2121 supports a large number of version control systems: Git, Subversion,
2122 Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
2123 (license license:gpl2+)))
2125 (define-public git-annex-remote-rclone
2127 (name "git-annex-remote-rclone")
2133 (url "https://github.com/DanielDent/git-annex-remote-rclone")
2134 (commit (string-append "v" version))))
2135 (file-name (git-file-name name version))
2138 "0j0hlxji8d974fq7zd4xc02n0jpi31ylhxc7z4zp8iiwad5mkpxp"))))
2139 (build-system trivial-build-system)
2141 `(#:modules ((guix build utils))
2144 (use-modules (guix build utils))
2145 (let ((bash (string-append (assoc-ref %build-inputs "bash")
2147 (rclone (string-append (assoc-ref %build-inputs "rclone")
2149 (copy-file (string-append (assoc-ref %build-inputs "source")
2150 "/git-annex-remote-rclone")
2151 "git-annex-remote-rclone")
2152 (substitute* "git-annex-remote-rclone"
2153 (("/bin/bash") bash)
2154 (("runcmd rclone") (string-append "runcmd " rclone)))
2155 (install-file "git-annex-remote-rclone"
2156 (string-append %output "/bin"))
2160 ("rclone" ,rclone)))
2161 (home-page "https://github.com/DanielDent/git-annex-remote-rclone")
2162 (synopsis "Use rclone-supported cloud storage providers with git-annex")
2163 (description "This wrapper around rclone makes any destination supported
2164 by rclone usable with git-annex.")
2165 (license license:gpl3+)))
2167 (define-public fossil
2175 "https://www.fossil-scm.org/index.html/uv/"
2176 "fossil-src-" version ".tar.gz"))
2178 (base32 "0c9nzx42wxfmym9vf1pnbdb1c7gp7a7zqky60izxsph7w2xh8nix"))
2179 (modules '((guix build utils)))
2182 (delete-file-recursively "compat") #t))))
2183 (build-system gnu-build-system)
2185 `(("tcl" ,tcl) ;for configuration only
2186 ("which" ,which) ;for tests only
2189 `(("openssl" ,openssl)
2191 ("sqlite" ,sqlite)))
2193 `(#:configure-flags (list "--with-openssl=auto"
2194 "--disable-internal-sqlite")
2195 #:test-target "test"
2196 #:phases (modify-phases %standard-phases
2197 (add-after 'patch-source-shebangs 'patch-sh
2199 (substitute* '("auto.def")
2200 (("/bin/sh") (which "sh")))
2203 (lambda* (#:key outputs (configure-flags '())
2205 ;; The 'configure' script is not an autoconf script and
2206 ;; chokes on unrecognized options.
2209 (string-append "--prefix="
2210 (assoc-ref outputs "out"))
2213 (add-before 'check 'test-setup
2215 (setenv "USER" "guix")
2218 (home-page "https://fossil-scm.org")
2219 (synopsis "Software configuration management system")
2221 "Fossil is a distributed source control management system which supports
2222 access and administration over HTTP CGI or via a built-in HTTP server. It has
2223 a built-in wiki, built-in file browsing, built-in tickets system, etc.")
2224 (license (list license:public-domain ;src/miniz.c, src/shell.c
2227 (define-public stagit
2233 (uri (string-append "https://dl.2f30.org/releases/"
2234 name "-" version ".tar.gz"))
2237 "1m3s9g1z9szbjrhm8sic91xh6f2bfpi56rskdkqd5wc4wdycpyi5"))))
2238 (build-system gnu-build-system)
2240 `(#:tests? #f ; No tests
2241 #:make-flags (list "CC=gcc"
2242 (string-append "PREFIX=" %output))
2244 (modify-phases %standard-phases
2245 (delete 'configure)))) ; No configure script
2247 `(("libgit2" ,libgit2)))
2248 (home-page "https://2f30.org/")
2249 (synopsis "Static git page generator")
2250 (description "Stagit creates static pages for git repositories, the results can
2251 be served with a HTTP file server of your choice.")
2252 (license license:expat)))
2254 (define-public gource
2261 "https://github.com/acaudwell/Gource/releases/download"
2262 "/gource-" version "/gource-" version ".tar.gz"))
2265 "16p7b1x4r0915w883lp374jcdqqja37fnb7m8vnsfnl2n64gi8qr"))))
2266 (build-system gnu-build-system)
2269 (list (string-append "--with-boost-libdir="
2270 (assoc-ref %build-inputs "boost")
2273 `(("pkg-config" ,pkg-config)))
2283 ("sdl-union" ,(sdl-union (list sdl2 sdl2-image)))))
2284 (home-page "https://gource.io/")
2285 (synopsis "3D visualisation tool for source control repositories")
2286 (description "@code{gource} provides a software version control
2287 visualization. The repository is displayed as a tree where the root of the
2288 repository is the centre, directories are branches and files are leaves.
2289 Contributors to the source code appear and disappear as they contribute to
2290 specific files and directories.")
2291 (license license:gpl3+)))
2300 "http://www.catb.org/~esr/src/src-" version ".tar.gz"))
2303 "0n0skhvya8w2az45h2gsafxy8m2mvqas64nrgxifcmrzfv0rf26c"))))
2304 (build-system gnu-build-system)
2307 (list (string-append "prefix=" (assoc-ref %outputs "out")))
2309 (modify-phases %standard-phases
2310 (delete 'configure) ; no 'configure' script
2311 (add-after 'install 'wrap-program
2312 (lambda* (#:key inputs outputs #:allow-other-keys)
2313 (let* ((out (assoc-ref outputs "out"))
2314 (prog (string-append out "/bin/src"))
2315 (rcs (assoc-ref inputs "rcs")))
2317 `("PATH" ":" prefix (,(string-append rcs "/bin"))))
2321 (setenv "HOME" (getenv "TMPDIR"))
2322 (invoke "git" "config" "--global" "user.name" "guix")
2323 (invoke "git" "config" "--global" "user.email" "guix")
2324 (invoke "./srctest"))))))
2330 `(("python" ,python-wrapper)
2332 (synopsis "Simple revision control")
2333 (home-page "http://www.catb.org/~esr/src/")
2335 "SRC (or src) is simple revision control, a version-control system for
2336 single-file projects by solo developers and authors. It modernizes the
2337 venerable RCS, hence the anagrammatic acronym. The design is tuned for use
2338 cases like all those little scripts in your @file{~/bin} directory, or a
2339 directory full of HOWTOs.")
2340 (license license:bsd-2)))
2342 (define-public git-when-merged
2343 ;; Use an unreleased version to get a PY3 compatibility fix.
2344 (let ((commit "ab6af7865a0ba55ba364a6c507e0be6f84f31c6d"))
2346 (name "git-when-merged")
2347 (version (string-append "1.2.0-" (string-take commit 7)))
2351 (url "https://github.com/mhagger/git-when-merged/")
2353 (file-name (git-file-name name version))
2356 "0iyk2psf97bc9h43m89p3xjmm79fsx99i7px29g4lcnmdy5kmz0p"))))
2357 (build-system gnu-build-system)
2359 `(#:tests? #f ; there are no tests
2361 (modify-phases %standard-phases
2365 (lambda* (#:key outputs #:allow-other-keys)
2366 (install-file "bin/git-when-merged"
2367 (string-append (assoc-ref outputs "out")
2370 (add-before 'install 'patch-git
2371 (lambda* (#:key inputs #:allow-other-keys)
2372 (let ((git (string-append (assoc-ref inputs "git")
2374 (substitute* "bin/git-when-merged"
2375 (("'git'") (string-append "'" git "'")))
2377 (add-after 'install 'wrap-script
2378 (lambda* (#:key outputs #:allow-other-keys)
2379 (wrap-program (string-append (assoc-ref outputs "out")
2380 "/bin/git-when-merged")
2381 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2385 ("python" ,python-wrapper)))
2386 (home-page "https://github.com/mhagger/git-when-merged")
2387 (synopsis "Determine when a commit was merged into a Git branch")
2388 (description "This Git extension defines a subcommand,
2389 @code{when-merged}, whose core operation is to find the merge that brought a
2390 given commit into the specified ref(s). It has various options that control
2391 how information about the merge is displayed.")
2392 (license license:gpl2+))))
2394 (define-public git-imerge
2402 (url "https://github.com/mhagger/git-imerge")
2403 (commit (string-append "v" version))))
2404 (file-name (git-file-name name version))
2406 (base32 "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4"))))
2407 (build-system gnu-build-system)
2409 `(#:tests? #f ; only manual test scripts
2410 #:make-flags (list (string-append "DESTDIR=" %output)
2413 (modify-phases %standard-phases
2415 (add-before 'install 'patch-git
2416 (lambda* (#:key inputs #:allow-other-keys)
2417 (let ((git (string-append (assoc-ref inputs "git")
2419 (substitute* "git-imerge"
2420 (("'git'") (string-append "'" git "'")))
2422 (add-after 'install 'wrap-script
2423 (lambda* (#:key outputs #:allow-other-keys)
2424 (wrap-program (string-append (assoc-ref outputs "out")
2426 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2430 ("python" ,python-wrapper)))
2431 (home-page "https://github.com/mhagger/git-imerge")
2432 (synopsis "Incremental merge for Git")
2433 (description "This Git extension defines a subcommand, @code{imerge},
2434 which performs an incremental merge between two branches. Its two primary
2435 design goals are to reduce the pain of resolving merge conflicts by finding
2436 the smallest possible conflicts and to allow a merge to be saved, tested,
2437 interrupted, published, and collaborated on while in progress.")
2438 (license license:gpl2+)))
2440 (define-public git-lfs
2447 (url "https://github.com/git-lfs/git-lfs")
2448 (commit (string-append "v" version))))
2449 (file-name (git-file-name name version))
2452 "1nf40rbdz901vsahg5cm09pznpina6wimmxl0lmh8pn0mi51yzvc"))))
2453 (build-system go-build-system)
2455 '(#:import-path "github.com/git-lfs/git-lfs"))
2456 (home-page "https://git-lfs.github.com/")
2457 (synopsis "Git extension for versioning large files")
2459 "Git Large File Storage (LFS) replaces large files such as audio samples,
2460 videos, datasets, and graphics with text pointers inside Git, while storing the
2461 file contents on a remote server.")
2462 (license license:expat)))
2470 (uri (string-append "https://ftp.gnu.org/old-gnu/gnu-arch/"
2471 "tla-" version ".tar.gz"))
2474 "01mfzj1i6p4s8191cgd5850hds1zls88hkf9rb6qx1vqjv585aj0"))
2475 (modules '((guix build utils)))
2478 ;; In tar 1.32, '--preserve' is ambiguous and leads to an
2479 ;; error, so address that.
2480 (substitute* "src/tla/libarch/archive.c"
2482 "\"--preserve-permissions\""))
2484 (build-system gnu-build-system)
2486 '(#:phases (modify-phases %standard-phases
2488 (lambda* (#:key inputs outputs #:allow-other-keys)
2489 (let ((out (assoc-ref outputs "out")))
2495 ;; For libneon's 'configure' script.
2496 ;; XXX: There's a bundled copy of neon.
2497 (setenv "CONFIG_SHELL" (which "sh"))
2499 (invoke "../configure" "--prefix" out
2500 "--config-shell" (which "sh")
2501 "--with-posix-shell" (which "sh")
2502 "--with-cc" "gcc")))))
2505 ;; There are build failures when building in parallel.
2506 #:parallel-build? #f
2507 #:parallel-tests? #f
2509 #:test-target "test"))
2511 `(("which" ,which)))
2512 (synopsis "Historical distributed version-control system")
2514 "GNU Arch, aka. @code{tla}, was one of the first free distributed
2515 version-control systems (DVCS). It saw its last release in 2006. This
2516 package is provided for users who need to recover @code{tla} repositories and
2518 (home-page "https://www.gnu.org/software/gnu-arch/")
2519 (license license:gpl2))) ;version 2 only