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-2022 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, 2021 Eric Bavier <bavier@posteo.net>
9 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
10 ;;; Copyright © 2015, 2018, 2020, 2021, 2022 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–2022 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, 2020 EuAndreh <eu@euandre.org>
18 ;;; Copyright © 2017, 2018, 2020, 2022 Marius Bakke <marius@gnu.org>
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, 2021 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, 2021, 2022 Vinicius Monego <monego@posteo.net>
33 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
34 ;;; Copyright © 2020, 2021, 2022 Michael Rohleder <mike@rohleder.de>
35 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
36 ;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
37 ;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
38 ;;; Copyright © 2021 Léo Le Bouter <lle-bout@zaclys.net>
39 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
40 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
41 ;;; Copyright © 2021 François J. <francois-oss@avalenn.eu>
42 ;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
43 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
44 ;;; Copyright © 2021 jgart <jgart@dismail.de>
45 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
46 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
47 ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
48 ;;; Copyright © 2022 Dhruvin Gandhi <contact@dhruvin.dev>
49 ;;; Copyright © 2015, 2022 David Thompson <davet@gnu.org>
51 ;;; This file is part of GNU Guix.
53 ;;; GNU Guix is free software; you can redistribute it and/or modify it
54 ;;; under the terms of the GNU General Public License as published by
55 ;;; the Free Software Foundation; either version 3 of the License, or (at
56 ;;; your option) any later version.
58 ;;; GNU Guix is distributed in the hope that it will be useful, but
59 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
60 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
61 ;;; GNU General Public License for more details.
63 ;;; You should have received a copy of the GNU General Public License
64 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
66 (define-module (gnu packages version-control)
67 #:use-module ((guix licenses) #:prefix license:)
68 #:use-module (guix utils)
69 #:use-module (guix packages)
70 #:use-module (guix gexp)
71 #:use-module (guix download)
72 #:use-module (guix git-download)
73 #:use-module (guix hg-download)
74 #:use-module (guix build python-build-system)
75 #:use-module (guix build-system cmake)
76 #:use-module (guix build-system copy)
77 #:use-module (guix build-system gnu)
78 #:use-module (guix build-system go)
79 #:use-module (guix build-system perl)
80 #:use-module (guix build-system python)
81 #:use-module (guix build-system trivial)
82 #:use-module (gnu packages apr)
83 #:use-module (gnu packages autotools)
84 #:use-module (gnu packages documentation)
85 #:use-module (gnu packages base)
86 #:use-module (gnu packages bash)
87 #:use-module (gnu packages bison)
88 #:use-module (gnu packages boost)
89 #:use-module (gnu packages check)
90 #:use-module (gnu packages cook)
91 #:use-module (gnu packages curl)
92 #:use-module (gnu packages docbook)
93 #:use-module (gnu packages ed)
94 #:use-module (gnu packages file)
95 #:use-module (gnu packages flex)
96 #:use-module (gnu packages freedesktop)
97 #:use-module (gnu packages gettext)
98 #:use-module (gnu packages gl)
99 #:use-module (gnu packages glib)
100 #:use-module (gnu packages gnome)
101 #:use-module (gnu packages gnupg)
102 #:use-module (gnu packages golang)
103 #:use-module (gnu packages groff)
104 #:use-module (gnu packages guile)
105 #:use-module (gnu packages guile-xyz)
106 #:use-module (gnu packages image)
107 #:use-module (gnu packages linux)
108 #:use-module (gnu packages mail)
109 #:use-module (gnu packages man)
110 #:use-module (gnu packages maths)
111 #:use-module (gnu packages nano)
112 #:use-module (gnu packages ncurses)
113 #:use-module (gnu packages ssh)
114 #:use-module (gnu packages web)
115 #:use-module (gnu packages openstack)
116 #:use-module (gnu packages pcre)
117 #:use-module (gnu packages perl)
118 #:use-module (gnu packages perl-check)
119 #:use-module (gnu packages pkg-config)
120 #:use-module (gnu packages python)
121 #:use-module (gnu packages python-build)
122 #:use-module (gnu packages python-check)
123 #:use-module (gnu packages python-crypto)
124 #:use-module (gnu packages python-web)
125 #:use-module (gnu packages python-xyz)
126 #:use-module (gnu packages readline)
127 #:use-module (gnu packages rsync)
128 #:use-module (gnu packages sqlite)
129 #:use-module (gnu packages texinfo)
130 #:use-module (gnu packages admin)
131 #:use-module (gnu packages xml)
132 #:use-module (gnu packages emacs)
133 #:use-module (gnu packages compression)
134 #:use-module (gnu packages sdl)
135 #:use-module (gnu packages swig)
136 #:use-module (gnu packages sync)
137 #:use-module (gnu packages tcl)
138 #:use-module (gnu packages textutils)
139 #:use-module (gnu packages time)
140 #:use-module (gnu packages tls)
141 #:use-module (gnu packages)
142 #:use-module (ice-9 match)
143 #:use-module (srfi srfi-1)
144 #:export (make-gitolite))
146 (define-public breezy
153 (uri (string-append "https://launchpad.net/brz/"
154 (version-major+minor version) "/" version
155 "/+download/breezy-" version ".tar.gz"))
156 (modules '((guix build utils)))
157 ;; Delete pre-generated Cython C files.
158 (snippet '(for-each delete-file (find-files "." "\\pyx.c$")))
161 "1md4b6ajawf5h50fqizmjj0g833ihc674dh7fn0mvl4d412nwyhq"))
162 (patches (search-patches "breezy-fix-gio.patch"))))
163 (build-system python-build-system)
166 #:tests? #f ;FIXME: the test suite hangs
168 #~(modify-phases %standard-phases
169 (add-after 'unpack 'patch-test-shebangs
171 (substitute* (append (find-files "breezy/bzr/tests")
172 (find-files "breezy/tests"))
174 (format #f "#!~a" (which "sh"))))))
176 (lambda* (#:key tests? #:allow-other-keys)
178 ;; The test_read_bundle tests fails with "TypeError: a
179 ;; bytes-like object is required, not '_ResultTuple'" (see:
180 ;; https://bugs.launchpad.net/brz/+bug/1968415/comments/4).
181 (substitute* "breezy/bzr/tests/__init__.py"
182 (("'test_read_bundle'," all)
183 (string-append "# " all)))
184 (setenv "BZR_EDITOR" "nano")
185 (setenv "HOME" "/tmp")
186 (invoke "testr" "init")
187 (invoke "testr" "run")))))))
189 (list nano ;for tests
193 python-testrepository))
195 (list gettext-minimal
206 (home-page "https://www.breezy-vcs.org/")
207 (synopsis "Decentralized revision control system")
209 "Breezy (@command{brz}) is a decentralized revision control system. By
210 default, Breezy provides support for both the
211 @uref{https://bazaar.canonical.com/, Bazaar} and @uref{https://www.git-scm.com,
212 Git} file formats. Breezy is backwabrds compatible with Bazaar's disk format
213 and protocols. One of the key differences with Bazaar is that Breezy runs on
214 Python 3.3 and later, rather than on Python 2.")
215 (license license:gpl2+)))
217 (define-public bazaar
218 (deprecated-package "bazaar" breezy))
220 (define git-cross-configure-flags
221 '("ac_cv_fread_reads_directories=yes"
222 "ac_cv_snprintf_returns_bogus=no"
223 "ac_cv_iconv_omits_bom=no"))
231 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
235 "02ij201lyipv1w2zkcq4ng2bga2xkw58xnkbs1wdw50qdgiasglj"))))
236 (build-system gnu-build-system)
238 `(("native-perl" ,perl)
239 ;; Add bash-minimal explicitly to ensure it comes before bash-for-tests,
240 ;; see <https://bugs.gnu.org/39513>.
241 ("bash" ,bash-minimal)
242 ("bash-for-tests" ,bash)
243 ("gettext" ,gettext-minimal)
244 ;; To build the man pages from the git sources, we would need a dependency
245 ;; on a full XML tool chain, and building it actually takes ages. So we
246 ;; use this lazy approach and use released tarball.
251 "mirror://kernel.org/software/scm/git/git-manpages-"
255 "1qyn6rhwblshz0hp0kdc8lk22c1fv8avfr44sia0vzlbd82xj828"))))
256 ;; For subtree documentation.
257 ("asciidoc" ,asciidoc)
258 ("docbook-xsl" ,docbook-xsl)
260 ("pkg-config" ,pkg-config)))
266 ("python" ,python) ; for git-p4
269 ;; For PCRE support in git grep (USE_LIBPCRE2).
273 ("perl-cgi" ,perl-cgi)
276 ("subversion" ,subversion)
277 ("perl-term-readkey" ,perl-term-readkey)
279 ;; For 'git-send-email'.
280 ("perl-authen-sasl" ,perl-authen-sasl)
281 ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
282 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
284 ;; For 'git gui', 'gitk', and 'git citool'.
288 ;; For 'git-credential-libsecret'
290 ("libsecret" ,libsecret)))
291 (outputs '("out" ; the core
292 "send-email" ; for git-send-email
294 "credential-netrc" ; git-credential-netrc
295 "credential-libsecret" ; git-credential-libsecret
296 "subtree" ; git-subtree
297 "gui")) ; gitk, git gui
299 `(#:make-flags `("V=1" ;more verbose compilation
301 ,(string-append "SHELL_PATH="
302 (assoc-ref %build-inputs "bash")
305 ;; Tests require a bash with completion support.
306 ,(string-append "TEST_SHELL_PATH="
307 (assoc-ref %build-inputs "bash-for-tests")
312 ;; By default 'make install' creates hard links for
313 ;; things in 'libexec/git-core', which leads to huge
314 ;; nars; see <https://bugs.gnu.org/21949>.
315 "NO_INSTALL_HARDLINKS=indeed")
317 ;; Make sure the full bash does not end up in the final closure.
318 #:disallowed-references (,bash)
322 ;; The explicit --with-tcltk forces the build system to hardcode the
323 ;; absolute file name to 'wish'.
324 #:configure-flags (list (string-append "--with-tcltk="
325 (assoc-ref %build-inputs "tk")
326 "/bin/wish8.6") ; XXX
327 ,@(if (%current-target-system)
328 git-cross-configure-flags
331 #:modules ((srfi srfi-1)
333 ((guix build gnu-build-system) #:prefix gnu:)
334 ,@%gnu-build-system-modules)
336 (modify-phases %standard-phases
337 ,@(if (%current-target-system)
338 ;; The git build system assumes build == host
339 `((add-after 'unpack 'use-host-uname_S
341 (substitute* "config.mak.uname"
342 (("uname_S := .*" all)
343 (if (equal? ,(%current-target-system) "i586-pc-gnu")
347 ;; We do not have bash-for-tests when cross-compiling.
348 `((add-after 'unpack 'modify-PATH
349 (lambda* (#:key inputs #:allow-other-keys)
350 (let ((path (string-split (getenv "PATH") #\:))
351 (bash-full (assoc-ref inputs "bash-for-tests")))
352 ;; Drop the test bash from PATH so that (which "sh") and
353 ;; similar does the right thing.
354 (setenv "PATH" (string-join
355 (remove (cut string-prefix? bash-full <>) path)
358 ;; Add cross curl-config script to PATH when cross-compiling.
359 ,@(if (%current-target-system)
360 '((add-before 'configure 'add-cross-curl-config
361 (lambda* (#:key inputs #:allow-other-keys)
363 (string-append (assoc-ref inputs "curl") "/bin:"
367 (add-after 'configure 'patch-makefiles
369 (substitute* "Makefile"
370 (("/usr/bin/perl") (which "perl"))
371 (("/usr/bin/python") (which "python3")))
373 (add-after 'configure 'add-PM.stamp
375 ;; Add the "PM.stamp" to avoid "no rule to make target".
376 (call-with-output-file "perl/PM.stamp" (const #t))
378 (add-after 'build 'build-subtree
379 (lambda* (#:key inputs #:allow-other-keys)
380 (with-directory-excursion "contrib/subtree"
381 (substitute* "Makefile"
382 ;; Apparently `xmlto' does not bother to looks up the stylesheets
383 ;; specified in the XML, unlike the above substitution. Instead it
384 ;; uses a hard-coded URL. Work around it here, but if this is
385 ;; common perhaps we should hardcode this path in xmlto itself.
386 (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
387 (string-append "$(XMLTO) -x "
388 (string-append (assoc-ref inputs "docbook-xsl")
389 "/xml/xsl/docbook-xsl-"
390 ,(package-version docbook-xsl))
391 "/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
393 (invoke "make" "install")
394 (invoke "make" "install-doc")
395 (substitute* "git-subtree"
396 (("/bin/sh") (which "sh"))))
398 (add-before 'check 'patch-tests
400 (let ((store-directory (%store-directory)))
401 ;; These files contain some funny bytes that Guile is unable
402 ;; to decode for shebang patching. Just delete them.
403 (for-each delete-file '("t/t4201-shortlog.sh"
404 "t/t7813-grep-icase-iso.sh"))
405 ;; Many tests contain inline shell scripts (hooks etc).
406 (substitute* (find-files "t" "\\.sh$")
407 (("#!/bin/sh") (string-append "#!" (which "sh"))))
408 ;; Un-do shebang patching here to prevent checksum mismatch.
409 (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
410 (("^#!.*/bin/perl") "#!/usr/bin/perl"))
411 (substitute* "t/t5003-archive-zip.sh"
412 (("cp /bin/sh") (string-append "cp " (which "sh"))))
413 (substitute* "t/t6030-bisect-porcelain.sh"
414 (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
415 ;; FIXME: This test runs `git commit` with a bogus EDITOR
416 ;; and empty commit message, but does not fail the way it's
417 ;; expected to. The test passes when invoked interactively.
418 (substitute* "t/t7508-status.sh"
419 (("\tcommit_template_commented") "\ttrue"))
420 ;; More checksum mismatches due to odd shebangs.
421 (substitute* "t/t9100-git-svn-basic.sh"
422 (((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") )
423 (substitute* "t/t9300-fast-import.sh"
424 (((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh")
425 (((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh"))
426 ;; FIXME: Some hooks fail with "basename: command not found".
427 ;; See 't/trash directory.t9164.../svn-hook.log'.
428 (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
430 ;; XXX: These tests fail intermittently for unknown reasons:
431 ;; <https://bugs.gnu.org/29546>.
432 (for-each delete-file
433 '("t/t9128-git-svn-cmd-branch.sh"
434 "t/t9167-git-svn-cmd-branch-subproject.sh"
435 "t/t9141-git-svn-multiple-branches.sh"))
437 (add-after 'install 'install-shell-completion
438 (lambda* (#:key outputs #:allow-other-keys)
439 (let* ((out (assoc-ref outputs "out"))
440 (completions (string-append out "/etc/bash_completion.d")))
441 ;; TODO: Install the tcsh and zsh completions in the right place.
442 (mkdir-p completions)
443 (copy-file "contrib/completion/git-completion.bash"
444 (string-append completions "/git"))
446 (add-after 'install 'install-credential-netrc
447 (lambda* (#:key outputs #:allow-other-keys)
448 (let* ((netrc (assoc-ref outputs "credential-netrc")))
449 (install-file "contrib/credential/netrc/git-credential-netrc.perl"
450 (string-append netrc "/bin"))
451 (rename-file (string-append netrc "/bin/git-credential-netrc.perl")
452 (string-append netrc "/bin/git-credential-netrc"))
453 ;; Previously, Git.pm was automatically found by netrc.
454 ;; Perl 5.26 changed how it locates modules so that @INC no
455 ;; longer includes the current working directory (the Perl
456 ;; community calls this "dotless @INC").
457 (wrap-program (string-append netrc "/bin/git-credential-netrc")
458 `("PERL5LIB" ":" prefix
459 (,(string-append (assoc-ref outputs "out") "/share/perl5"))))
461 (add-after 'install 'install-credential-libsecret
462 (lambda* (#:key outputs #:allow-other-keys)
463 (let* ((libsecret (assoc-ref outputs "credential-libsecret")))
464 (with-directory-excursion "contrib/credential/libsecret"
465 ((assoc-ref gnu:%standard-phases 'build))
466 (install-file "git-credential-libsecret"
467 (string-append libsecret "/bin"))
469 (add-after 'install 'install-subtree
470 (lambda* (#:key outputs #:allow-other-keys)
471 (let ((subtree (assoc-ref outputs "subtree")))
472 (install-file "contrib/subtree/git-subtree"
473 (string-append subtree "/bin"))
474 (install-file "contrib/subtree/git-subtree.1"
475 (string-append subtree "/share/man/man1"))
477 (add-after 'install 'restore-sample-hooks-shebang
478 (lambda* (#:key outputs #:allow-other-keys)
479 (let* ((out (assoc-ref outputs "out"))
480 (dir (string-append out "/share/git-core/templates/hooks")))
481 (for-each (lambda (file)
482 (format #t "restoring shebang on `~a'~%" file)
484 (("^#!.*/bin/sh") "#!/bin/sh")))
485 (find-files dir ".*"))
487 (add-after 'install 'split
488 (lambda* (#:key inputs outputs #:allow-other-keys)
489 ;; Split the binaries to the various outputs.
490 (let* ((out (assoc-ref outputs "out"))
491 (se (assoc-ref outputs "send-email"))
492 (svn (assoc-ref outputs "svn"))
493 (gui (assoc-ref outputs "gui"))
494 (gitk (string-append out "/bin/gitk"))
495 (gitk* (string-append gui "/bin/gitk"))
496 (git-gui (string-append out "/libexec/git-core/git-gui"))
497 (git-gui* (string-append gui "/libexec/git-core/git-gui"))
498 (git-cit (string-append out "/libexec/git-core/git-citool"))
499 (git-cit* (string-append gui "/libexec/git-core/git-citool"))
500 (git-se (string-append out "/libexec/git-core/git-send-email"))
501 (git-se* (string-append se "/libexec/git-core/git-send-email"))
502 (git-svn (string-append out "/libexec/git-core/git-svn"))
503 (git-svn* (string-append svn "/libexec/git-core/git-svn"))
504 (git-sm (string-append out
505 "/libexec/git-core/git-submodule")))
506 (mkdir-p (string-append gui "/bin"))
507 (mkdir-p (string-append gui "/libexec/git-core"))
508 (mkdir-p (string-append se "/libexec/git-core"))
509 (mkdir-p (string-append svn "/libexec/git-core"))
511 (for-each (lambda (old new)
515 (list gitk git-gui git-cit git-se git-svn)
516 (list gitk* git-gui* git-cit* git-se* git-svn*))
518 ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
519 (wrap-program git-svn*
521 (,(string-append (assoc-ref inputs "subversion")
523 `("PERL5LIB" ":" prefix
524 ,(map (lambda (i) (string-append (assoc-ref inputs i)
525 "/lib/perl5/site_perl"))
526 '("subversion" "perl-term-readkey")))
528 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
529 ;; help it find 'libsvn_client-1.so'.
530 `("LD_LIBRARY_PATH" ":" prefix
531 (,(string-append (assoc-ref inputs "subversion")
534 ;; Tell 'git-send-email' where perl modules are.
535 (wrap-program git-se*
536 `("PERL5LIB" ":" prefix
537 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
539 ,@(transitive-input-references
542 (assoc l (package-inputs this-package)))
545 "perl-io-socket-ssl")))))))
547 ;; Tell 'gitweb.cgi' where perl modules are.
548 (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
549 `("PERL5LIB" ":" prefix
550 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
552 ,@(transitive-input-references
555 (assoc l (package-inputs this-package)))
558 ;; Tell 'git-submodule' where Perl is.
561 (,(string-append (assoc-ref inputs "perl")
565 (add-after 'split 'install-man-pages
566 (lambda* (#:key inputs outputs #:allow-other-keys)
567 (let* ((out (assoc-ref outputs "out"))
568 (man (string-append out "/share/man"))
569 (manpages (assoc-ref inputs "git-manpages")))
571 (with-directory-excursion man
572 (invoke "tar" "xvf" manpages))))))))
575 ;; For HTTPS access, Git needs a single-file certificate bundle, specified
576 ;; with $GIT_SSL_CAINFO.
577 (list (search-path-specification
578 (variable "GIT_SSL_CAINFO")
580 (separator #f) ;single entry
581 (files '("etc/ssl/certs/ca-certificates.crt")))
582 (search-path-specification
583 (variable "GIT_EXEC_PATH")
584 (separator #f) ;single entry
585 (files '("libexec/git-core")))))
587 (synopsis "Distributed version control system")
589 "Git is a free distributed version control system designed to handle
590 everything from small to very large projects with speed and efficiency.")
591 ;; XXX: Ignore this CVE to work around a name clash with the unrelated
592 ;; "cpe:2.3:a:jenkins:git" package. The proper fix is for (guix cve) to
593 ;; account for "vendor names".
594 (properties '((lint-hidden-cve . ("CVE-2018-1000182"
605 (license license:gpl2)
606 (home-page "https://git-scm.com/")))
608 (define-public git-minimal
609 ;; The size of the closure of 'git-minimal' is two thirds that of 'git'.
610 ;; Its test suite runs slightly faster and most importantly it doesn't
611 ;; depend on packages that are expensive to build such as Subversion.
616 (substitute-keyword-arguments (package-arguments git)
618 `(modify-phases ,phases
619 (replace 'patch-makefiles
621 (substitute* "Makefile"
622 (("/usr/bin/perl") (which "perl")))
624 (delete 'build-subtree)
626 (delete 'install-man-pages)
627 (delete 'install-subtree)
628 (delete 'install-credential-netrc)
629 (delete 'install-credential-libsecret)
630 (add-after 'install 'remove-unusable-perl-commands
631 (lambda* (#:key outputs #:allow-other-keys)
632 (let* ((out (assoc-ref outputs "out"))
633 (bin (string-append out "/bin"))
634 (libexec (string-append out "/libexec")))
635 (for-each (lambda (file)
636 (delete-file (string-append libexec
638 '("git-svn" "git-cvsimport" "git-archimport"
639 "git-cvsserver" "git-request-pull"
640 "git-add--interactive" "git-cvsexportcommit"
641 "git-instaweb" "git-send-email"))
642 (delete-file (string-append bin "/git-cvsserver"))
644 ;; These templates typically depend on Perl. Remove them.
645 (delete-file-recursively
646 (string-append out "/share/git-core/templates/hooks"))
648 ;; Gitweb depends on Perl as well.
649 (delete-file-recursively
650 (string-append out "/share/gitweb"))
652 ((#:make-flags flags)
653 `(delete "USE_LIBPCRE2=yes" ,flags))
654 ((#:configure-flags flags)
656 ,@(if (%current-target-system)
657 git-cross-configure-flags
659 ((#:disallowed-references lst '())
663 `(("bash" ,bash-minimal)
664 ("bash-for-tests" ,bash)
665 ("native-perl" ,perl)
666 ("gettext" ,gettext-minimal)))
668 (list curl ;for HTTP(S) access
669 expat ;for 'git push' over HTTP(S)
674 (define-public git-minimal/fixed
675 ;; Version that rarely changes, depended on by Graphene/GTK+.
676 (package/inherit git-minimal
680 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
684 "0bqz401dyp8wnjj3k5ahrniwk4dalndysqazzwdvv25hqbkacm70"))))))
686 (define-public git2cl
687 (let ((commit "1d74d4c0d933fc69ed5cec838c73502584dead05"))
690 (version (string-append "20120919." (string-take commit 7)))
694 (url "https://git.savannah.nongnu.org/git/git2cl.git")
696 (file-name (git-file-name name version))
699 "0wnnbm2sjvfj0qrksj89jlnl69miwl0vk3wrrvgvpclgys3na2g1"))))
700 (build-system copy-build-system)
704 `(#:install-plan '(("git2cl" "bin/git2cl"))))
705 (home-page "https://savannah.nongnu.org/projects/git2cl")
706 (synopsis "Convert Git logs to GNU ChangeLog format")
707 (description "@code{git2cl} is a command line tool for converting Git
708 logs to GNU ChangeLog format.")
709 (license license:gpl2+))))
711 (define-public gitless
717 ;; The PyPI package lacks a test suite. Build directly from git.
720 (url "https://github.com/gitless-vcs/gitless")
721 (commit (string-append "v" version))))
723 (base32 "048kl27zjr68hgs70g3l98ci9765wxva6azzrhcdys7nsdd493n6"))
724 (file-name (git-file-name name version))))
725 (build-system python-build-system)
728 (modify-phases %standard-phases
729 (add-before 'build 'loosen-requirements
731 (substitute* "setup.py"
732 ;; Using Guix's python-pygit2 1.1.0 appears to work fine…
733 (("pygit2==") "pygit2>="))
735 (add-before 'check 'prepare-for-tests
737 ;; Find the 'gl' command.
738 (rename-file "gl.py" "gl")
739 (setenv "PATH" (string-append (getcwd) ":" (getenv "PATH")))
741 ;; The tests try to run git as if it were already set up.
742 (setenv "HOME" (getcwd))
743 (invoke "git" "config" "--global" "user.email" "git@example.com")
744 (invoke "git" "config" "--global" "user.name" "Guix")))
746 (lambda* (#:key inputs outputs #:allow-other-keys)
747 (let ((out (assoc-ref outputs "out"))
748 (git (assoc-ref inputs "git")))
749 (wrap-program (string-append out "/bin/gl")
750 `("PATH" ":" prefix (,(string-append git "/bin")))
751 `("GUIX_PYTHONPATH" ":" =
752 (,(string-append out "/lib/python"
753 ,(version-major+minor
754 (package-version python))
756 ,(getenv "GUIX_PYTHONPATH"))))
759 `(("git-for-tests" ,git-minimal)))
761 `(("git" ,git-minimal)
762 ("python-clint" ,python-clint)
763 ("python-pygit2" ,python-pygit2)
764 ("python-sh" ,python-sh)))
765 (home-page "https://gitless.com")
766 (synopsis "Simple version control system built on top of Git")
768 "Gitless is a Git-compatible version control system that aims to be easy to
769 learn and use. It simplifies the common workflow by committing changes to
770 tracked files by default and saving any uncommitted changes as part of a branch.
772 The friendly @command{gl} command-line interface gives feedback and helps you
773 figure out what to do next.
775 Gitless is implemented on top of Git and its commits and repositories are
776 indistinguishable from Git's. You (or other contributors) can always fall back
777 on @command{git}, and use any regular Git hosting service.")
778 (license license:expat)))
780 (define-public git-cal
787 (url "https://github.com/k4rthik/git-cal")
788 (commit (string-append "v" version))))
789 (file-name (git-file-name name version))
792 "08s9sif3qlk5n2dqpzq5yjczggnqlnxldljspjdqgpfydb2dqg3z"))))
793 (build-system perl-build-system)
794 (home-page "https://github.com/k4rthik/git-cal/")
795 (synopsis "GitHub like contributions calendar for terminal")
796 (description "@code{git-cal} is a script to view commits calendar similar
797 to GitHub contributions calendar.")
798 (license license:expat)))
800 (define-public libgit2
805 ;; Since v1.1.1, release artifacts are no longer offered (see:
806 ;; https://github.com/libgit2/libgit2/discussions/5932#discussioncomment-1682729).
809 (url "https://github.com/libgit2/libgit2")
810 (commit (string-append "v" version))))
811 (file-name (git-file-name name version))
814 "02x1a4zrzpzjd0yxnsi8njh5hgihc1iy1v4r0fnl8m4ckcgp6x2s"))
815 (modules '((guix build utils)))
818 (delete-file-recursively "deps")
820 ;; The "refs:revparse::date" test is time-dependent: it
821 ;; assumes "HEAD@{10 years ago}" matches a specific commit.
822 ;; See <https://github.com/libgit2/libgit2/pull/6299>.
823 (substitute* "tests/refs/revparse.c"
824 (("test_object.*10 years ago.*" all)
825 (string-append "// " all "\n")))))))
826 (build-system cmake-build-system)
827 (outputs '("out" "debug"))
830 (list "-DUSE_NTLMCLIENT=OFF" ;TODO: package this
831 "-DREGEX_BACKEND=pcre2"
832 "-DUSE_HTTP_PARSER=system"
833 "-DUSE_SSH=ON" ; cmake fails to find libssh if this is missing
834 ,@(if (%current-target-system)
836 "-DPKG_CONFIG_EXECUTABLE="
839 (string-append "/bin/" ,(%current-target-system)
843 (modify-phases %standard-phases
844 ;; Run checks more verbosely, unless we are cross-compiling.
846 (lambda* (#:key (tests? #t) #:allow-other-keys)
848 (invoke "./libgit2_tests" "-v" "-Q")
849 ;; Tests may be disabled if cross-compiling.
850 (format #t "Test suite not run.~%")))))))
852 (list libssh2 http-parser))
854 (list pkg-config python))
856 ;; These libraries are in 'Requires.private' in libgit2.pc.
857 (list openssl pcre2 zlib))
858 (home-page "https://libgit2.org/")
859 (synopsis "Library providing Git core methods")
861 "Libgit2 is a portable, pure C implementation of the Git core methods
862 provided as a re-entrant linkable library with a solid API, allowing you to
863 write native speed custom Git applications in any language with bindings.")
864 ;; GPLv2 with linking exception
865 (license license:gpl2)))
867 (define-public libgit2-1.3
872 (inherit (package-source libgit2))
875 (url "https://github.com/libgit2/libgit2")
876 (commit (string-append "v" version))))
877 (file-name (git-file-name "libgit2" version))
880 "0vgpb2175a5dhqiy1iwywwppahgqhi340i8bsvafjpvkw284vazd"))))
882 (substitute-keyword-arguments (package-arguments libgit2)
883 ((#:phases _ '%standard-phases)
884 `(modify-phases %standard-phases
885 ;; Run checks more verbosely, unless we are cross-compiling.
887 (lambda* (#:key (tests? #t) #:allow-other-keys)
889 (invoke "./libgit2_clar" "-v" "-Q")
890 ;; Tests may be disabled if cross-compiling.
891 (format #t "Test suite not run.~%"))))))))))
893 (define-public libgit2-1.1
895 (inherit libgit2-1.3)
898 (inherit (package-source libgit2-1.3))
899 (file-name #f) ;use the default name
901 (uri (string-append "https://github.com/libgit2/libgit2/"
902 "releases/download/v" version
903 "/libgit2-" version ".tar.gz"))
906 "1fjdglkh04qv3b4alg621pxa689i0wlf8m7nf2755zawjr2zhwxd"))
907 (patches (search-patches "libgit2-mtime-0.patch"))))))
909 (define-public git-crypt
917 (url "https://github.com/AGWA/git-crypt")
919 (file-name (git-file-name name version))
921 (base32 "0ymk2z0jfyhycia8hg6wbj2g06m163yzqzanfk172cxb13fa8c26"))))
922 (build-system gnu-build-system)
926 (list docbook-xsl libxslt))
928 `(#:tests? #f ; No tests.
930 (modify-phases %standard-phases
932 (add-after 'unpack 'patch-makefile
933 (lambda* (#:key inputs #:allow-other-keys)
934 (substitute* "Makefile"
935 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
936 (string-append (assoc-ref inputs "docbook-xsl")
937 "/xml/xsl/docbook-xsl-"
938 ,(package-version docbook-xsl)
939 "/manpages/docbook.xsl")))
943 (invoke "make" "ENABLE_MAN=yes")))
945 (lambda* (#:key outputs #:allow-other-keys)
946 (let ((out (assoc-ref outputs "out")))
947 (invoke "make" "install"
949 (string-append "PREFIX=" out))))))))
950 (home-page "https://www.agwa.name/projects/git-crypt/")
951 (synopsis "Transparent encryption of files in a git repository")
952 (description "git-crypt enables transparent encryption and decryption of
953 files in a git repository. Files which you choose to protect are encrypted when
954 committed, and decrypted when checked out. git-crypt lets you freely share a
955 repository containing a mix of public and private content. git-crypt gracefully
956 degrades, so developers without the secret key can still clone and commit to a
957 repository with encrypted files. This lets you store your secret material (such
958 as keys or passwords) in the same repository as your code, without requiring you
959 to lock down your entire repository.")
960 (license license:gpl3+)))
962 (define-public git-remote-gcrypt
964 (name "git-remote-gcrypt")
969 (url "https://git.spwhitton.name/git-remote-gcrypt")
971 (file-name (git-file-name name version))
974 "1m1wlbqpqyhh2z0ka3gjs5yabd32nnkzw5hak6czcqrhhkfsqbmv"))))
975 (build-system trivial-build-system)
977 `(#:modules ((guix build utils))
979 (use-modules (guix build utils))
980 (let* ((source (assoc-ref %build-inputs "source"))
981 (output (assoc-ref %outputs "out"))
982 (bindir (string-append output "/bin")))
983 (install-file (string-append source "/git-remote-gcrypt")
985 (home-page "https://spwhitton.name/tech/code/git-remote-gcrypt/")
986 (synopsis "Whole remote repository encryption")
987 (description "git-remote-gcrypt is a Git remote helper to push and pull from
988 repositories encrypted with GnuPG. It works with the standard Git transports,
989 including repository hosting services like GitLab.
991 Remote helper programs are invoked by Git to handle network transport. This
992 helper handles @code{gcrypt:} URLs that access a remote repository encrypted
993 with GPG, using our custom format.
995 Supported locations are local, @code{rsync://} and @code{sftp://}, where the
996 repository is stored as a set of files, or instead any Git URL where gcrypt
997 will store the same representation in a Git repository, bridged over arbitrary
1000 The aim is to provide confidential, authenticated Git storage and
1001 collaboration using typical untrusted file hosts or services.")
1002 (license license:gpl3+)))
1007 ;; Update the ‘git-source’ input as well.
1012 "https://git.zx2c4.com/cgit/snapshot/cgit-"
1016 "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss"))))
1017 (build-system gnu-build-system)
1019 '(#:tests? #f ; XXX: fail to build the in-source git.
1020 #:test-target "test"
1021 #:make-flags '("CC=gcc" "SHELL_PATH=sh")
1023 (modify-phases %standard-phases
1024 (add-after 'unpack 'unpack-git
1025 (lambda* (#:key inputs #:allow-other-keys)
1026 ;; Unpack the source of git into the 'git' directory.
1027 (invoke "tar" "--strip-components=1" "-C" "git" "-xf"
1028 (assoc-ref inputs "git-source"))))
1029 (add-after 'unpack 'patch-absolute-file-names
1030 (lambda* (#:key inputs #:allow-other-keys)
1031 (define (quoted-file-name input path)
1032 (string-append "\"" input path "\""))
1033 (substitute* "ui-snapshot.c"
1035 (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
1037 (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
1039 (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
1041 (substitute* "filters/about-formatting.sh"
1042 (("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out")
1043 "/lib/cgit/filters"))
1044 (("\\| tr") (string-append "| " (which "tr"))))
1046 (substitute* "filters/html-converters/txt2html"
1047 (("sed") (which "sed")))
1049 (substitute* "filters/html-converters/man2html"
1050 (("groff") (which "groff")))
1052 (substitute* "filters/html-converters/rst2html"
1053 (("rst2html\\.py") (which "rst2html.py")))
1056 (delete 'configure) ; no configure script
1057 (add-after 'build 'build-man
1058 (lambda* (#:key make-flags #:allow-other-keys)
1059 (apply invoke "make" "doc-man" make-flags)))
1061 (lambda* (#:key make-flags outputs #:allow-other-keys)
1062 (let ((out (assoc-ref outputs "out")))
1064 "make" "install" "install-man"
1065 (string-append "prefix=" out)
1066 (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
1068 ;; Move the platform-dependent 'cgit.cgi' into lib to get it
1070 (rename-file (string-append out "/share/cgit/cgit.cgi")
1071 (string-append out "/lib/cgit/cgit.cgi"))
1073 (add-after 'install 'wrap-python-scripts
1074 (lambda* (#:key outputs #:allow-other-keys)
1077 (wrap-program (string-append (assoc-ref outputs "out")
1078 "/lib/cgit/filters/" file)
1079 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
1080 '("syntax-highlighting.py"
1081 "html-converters/md2html"))
1084 ;; For building manpage.
1085 (list asciidoc gzip bzip2 xz))
1087 `(;; Building cgit requires a Git source tree.
1091 ;; cgit is tightly bound to git. Use GIT_VER from the Makefile,
1092 ;; which may not match the current (package-version git).
1093 (uri "mirror://kernel.org/software/scm/git/git-2.25.4.tar.xz")
1095 (base32 "11am6s46wmn1yll5614smjhzlghbqq6gysgcs64igjr9y5wzpdxq"))))
1096 ("openssl" ,openssl)
1099 ("python-docutils" ,python-docutils)
1100 ("python-markdown" ,python-markdown)
1101 ("python-pygments" ,python-pygments)
1103 (home-page "https://git.zx2c4.com/cgit/")
1104 (synopsis "Web frontend for git repositories")
1106 "CGit is an attempt to create a fast web interface for the Git SCM, using
1107 a built-in cache to decrease server I/O pressure.")
1108 (license license:gpl2)))
1110 (define-public python-git-multimail
1112 (name "python-git-multimail")
1113 (version "1.5.0.post1")
1117 (uri (pypi-uri "git-multimail" version))
1120 "1zkrbsa70anwpw86ysfwalrb7nsr064kygfiyikyq1pl9pcl969y"))))
1121 (build-system python-build-system)
1124 (modify-phases %standard-phases
1125 (add-after 'unpack 'patch
1126 (lambda* (#:key inputs #:allow-other-keys)
1127 (substitute* "git-multimail/git_multimail.py"
1128 (("GIT_EXECUTABLE = 'git'")
1129 (string-append "GIT_EXECUTABLE = '"
1130 (assoc-ref inputs "git") "/bin/git"
1132 (("/usr/sbin/sendmail")
1133 (search-input-file inputs
1134 "/sbin/sendmail"))))))))
1136 (list git sendmail))
1137 (home-page "https://github.com/git-multimail/git-multimail")
1138 (synopsis "Send notification emails for Git pushes")
1140 "This hook sends emails describing changes introduced by pushes to a Git
1141 repository. For each reference that was changed, it emits one ReferenceChange
1142 email summarizing how the reference was changed, followed by one Revision
1143 email for each new commit that was introduced by the reference change.
1145 This script is designed to be used as a post-receive hook in a Git
1147 (license license:gpl2)))
1149 (define-public python-ghp-import
1151 (name "python-ghp-import")
1157 (url "https://github.com/davisp/ghp-import")
1159 (file-name (git-file-name name version))
1161 (base32 "0i4lxsgqri1y8sw4k44bkwbzmdmk4vpmdi882mw148j8gk4i7vvj"))))
1162 (build-system python-build-system)
1164 `(#:phases (modify-phases %standard-phases
1165 (add-after 'install 'install-documentation
1166 (lambda* (#:key outputs #:allow-other-keys)
1167 (let* ((out (assoc-ref outputs "out"))
1168 (doc (string-append out "/share/doc"))
1169 (licenses (string-append out "/share/licenses")))
1170 (install-file "README.md" doc)
1171 (install-file "LICENSE" licenses)))))))
1172 (propagated-inputs (list python-dateutil))
1173 (home-page "https://github.com/davisp/ghp-import")
1174 (synopsis "Copy directory to the gh-pages branch")
1175 (description "Script that copies a directory to the gh-pages branch (by
1176 default) of the repository.")
1178 ;; See <https://bugs.gnu.org/27913>.
1179 (license (license:non-copyleft
1180 "https://raw.githubusercontent.com/davisp/ghp-import/master/LICENSE"
1181 "Tumbolia Public License"))))
1183 (define-public python-gitdb
1185 (name "python-gitdb")
1189 (uri (pypi-uri "gitdb" version))
1192 "0l113fphn6msjl3cl3kyf332b6lal7daxdd0nfma0x9ipfb013jr"))))
1193 (build-system python-build-system)
1195 `(#:phases (modify-phases %standard-phases
1196 (add-before 'check 'create-test-repository
1198 (mkdir "/tmp/testrepo")
1199 ;; Some tests require a git repository, so create one.
1200 (with-directory-excursion "/tmp/testrepo"
1201 (do ((filecount 1 (1+ filecount)))
1202 ((> filecount 1000))
1203 (call-with-output-file (string-append
1204 "file" (number->string filecount))
1206 (format port "~a" filecount))))
1208 (invoke "git" "init")
1209 (invoke "git" "config" "user.name" "Total Git")
1210 (invoke "git" "config" "user.email" "git@localhost")
1211 (invoke "git" "add" "-A")
1212 (invoke "git" "commit" "-q" "-m" "dummy commit")))
1214 ;; The repository checkout must be a "bare" clone.
1215 (invoke "git" "clone" "--bare" "/tmp/testrepo"
1216 "/tmp/testrepo.git")))
1219 (setenv "GITDB_TEST_GIT_REPO_BASE" "/tmp/testrepo.git")
1220 ;; Skip tests that must be run from the gitdb repository.
1221 (setenv "TRAVIS" "1")
1222 (invoke "nosetests" "-v"))))))
1224 (list python-smmap))
1226 (list git python-nose))
1227 (home-page "https://github.com/gitpython-developers/gitdb")
1228 (synopsis "Python implementation of the Git object database")
1230 "GitDB allows you to access @dfn{bare} Git repositories for reading and
1231 writing. It aims at allowing full access to loose objects as well as packs
1232 with performance and scalability in mind. It operates exclusively on streams,
1233 allowing to handle large objects with a small memory footprint.")
1234 (license license:bsd-3)))
1236 (define-public python-gitpython
1238 (name "python-gitpython")
1242 (uri (pypi-uri "GitPython" version))
1245 "1rarp97cpjnhi106k2yhb7kygdyflmlgq0icxv3ggzl4wvszv0yz"))))
1246 (build-system python-build-system)
1248 `(#:tests? #f ;XXX: Tests can only be run within the GitPython repository.
1249 #:phases (modify-phases %standard-phases
1250 (add-after 'unpack 'embed-git-reference
1251 (lambda* (#:key inputs #:allow-other-keys)
1252 (substitute* "git/cmd.py"
1253 (("git_exec_name = \"git\"")
1254 (string-append "git_exec_name = \""
1255 (assoc-ref inputs "git")
1256 "/bin/git\""))))))))
1260 (list python-gitdb python-typing-extensions))
1262 (list python-ddt python-nose))
1263 (home-page "https://github.com/gitpython-developers/GitPython")
1264 (synopsis "Python library for interacting with Git repositories")
1266 "GitPython is a python library used to interact with Git repositories,
1267 high-level like git-porcelain, or low-level like git-plumbing.
1269 It provides abstractions of Git objects for easy access of repository data,
1270 and additionally allows you to access the Git repository more directly using
1271 either a pure Python implementation, or the faster, but more resource intensive
1272 @command{git} command implementation.")
1273 (license license:bsd-3)))
1275 (define-public shflags
1282 (url "https://github.com/kward/shflags")
1283 (commit (string-append "v" version))))
1284 (file-name (git-file-name name version))
1287 "1ydx0sb6vz9s2dgp5bd64y7fpzh9qvmlfjxrbmzac8saknijrlly"))))
1288 (build-system gnu-build-system)
1290 `(#:tests? #f ; no tests
1292 (modify-phases %standard-phases
1293 (delete 'configure) ; nothing to configure
1294 (delete 'build) ; nothing to build
1296 (lambda* (#:key outputs #:allow-other-keys)
1297 (let* ((out (assoc-ref outputs "out"))
1298 (src (string-append out "/src")))
1299 (install-file "shflags" src)
1301 (home-page "https://github.com/kward/shflags")
1302 (synopsis "Command-line flags library for shell scripts")
1304 "Shell Flags (shFlags) is a library written to greatly simplify the
1305 handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
1306 ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
1307 different versions of getopt on various OSes make writing portable shell
1308 scripts difficult. shFlags instead provides an API that doesn't change across
1309 shell and OS versions so the script writer can be confident that the script
1311 (license license:lgpl2.1)))
1313 (define-public git-flow
1316 ;; This version has not be officially released yet, so we build it
1317 ;; directly from the git repository.
1322 (url "https://github.com/petervanderdoes/gitflow-avh/")
1324 (file-name (git-file-name name version))
1327 "13q4mnrxr03wz2dkhzy73j384g299m4d545cnhxcaznvdwfany4h"))))
1328 (build-system gnu-build-system)
1329 (inputs (list shflags))
1331 '(#:tests? #f ; no tests
1332 #:make-flags (list (string-append "prefix="
1333 (assoc-ref %outputs "out")))
1335 (modify-phases %standard-phases
1336 (add-after 'unpack 'reset-shFlags-link
1337 (lambda* (#:key inputs #:allow-other-keys)
1338 ;; The link points to a file in the shFlags submodule.
1339 ;; Redirect it to point to our system shFlags.
1340 (let ((shflags (assoc-ref inputs "shflags")))
1342 (delete-file "gitflow-shFlags")
1343 (symlink (string-append shflags "/src/shflags")
1344 "gitflow-shFlags")))))
1347 (home-page "https://nvie.com/posts/a-successful-git-branching-model/")
1348 (synopsis "Git extensions for Vincent Driessen's branching model")
1350 "Vincent Driessen's branching model is a git branching and release
1351 management strategy that helps developers keep track of features, hotfixes,
1352 and releases in bigger software projects. The git-flow library of git
1353 subcommands helps automate some parts of the flow to make working with it a
1355 (license license:bsd-2)))
1357 (define-public stgit
1365 (url "https://github.com/ctmarinas/stgit")
1366 (commit (string-append "v" version))))
1367 (file-name (git-file-name name version))
1369 (base32 "1igljjpdgl4na1a5hi0nmg36ph0hw6hw8hhq5436fgcl8yjimyz3"))))
1370 (build-system python-build-system)
1377 (modify-phases %standard-phases
1378 (add-after 'unpack 'hard-code-version
1380 ;; setup.py tries to cleverly extract the version number from the
1381 ;; git history, which the source checkout lacks. Hard-code one.
1382 (substitute* "setup.py"
1384 (format #f "'~a'" ,version)))
1386 (add-before 'check 'patch-tests
1388 (substitute* (list "t/t1900-mail.sh"
1389 "t/t7504-commit-msg-hook.sh")
1397 (string-append "SHELL_PATH=" (which "bash"))
1399 (home-page "https://stacked-git.github.io/")
1400 (synopsis "Stacked Git")
1402 "StGit is a command-line application that provides functionality similar
1403 to Quilt (i.e., pushing/popping patches to/from a stack), but using Git
1404 instead of @command{diff} and @command{patch}. StGit stores its patches in a
1405 Git repository as normal Git commits, and provides a number of commands to
1406 manipulate them in various ways.")
1407 (license license:gpl2)))
1412 (version "1.20190621-4")
1417 (url "https://github.com/RichiH/vcsh")
1418 (commit (string-append "v" version))))
1419 (file-name (git-file-name name version))
1421 (base32 "1gx5nbqyprgy6picns5hxky3lyzkqfq3xhm614f0wcdi58xrsdh0"))))
1422 (build-system gnu-build-system)
1426 (list git perl perl-test-harness perl-shell-command perl-test-most))
1429 (modify-phases %standard-phases
1432 (add-after 'install 'install-bash-completion
1433 ;; As of 1.20190621, zsh completion is installed by default but bash
1434 ;; completion is not. Do so manually.
1435 (lambda* (#:key outputs #:allow-other-keys)
1436 (let* ((out (assoc-ref outputs "out"))
1437 (completions (string-append out "/etc/bash_completion.d")))
1438 (mkdir-p completions)
1439 (copy-file "_vcsh_bash" (string-append completions "/vcsh"))))))
1440 #:make-flags (list (string-append "PREFIX="
1441 (assoc-ref %outputs "out")))
1442 #:test-target "test"))
1443 (home-page "https://github.com/RichiH/vcsh")
1444 (synopsis "Version control system for @code{$HOME}")
1446 "vcsh version-controls configuration files in several Git repositories,
1447 all in one single directory. They all maintain their working trees without
1448 clobbering each other or interfering otherwise. By default, all Git
1449 repositories maintained via vcsh store the actual files in @code{$HOME},
1450 though this can be overridden.")
1451 (license license:gpl2+)))
1453 (define-public git-test-sequence
1454 (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76"))
1456 (name "git-test-sequence")
1457 (version (string-append "20140312." (string-take commit 7)))
1461 ;; There are many other scripts in this directory; we
1462 ;; are interested in just one for this package.
1463 (url "https://github.com/dustin/bindir")
1465 (file-name (git-file-name name version))
1468 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
1469 (build-system trivial-build-system)
1471 `(#:modules ((guix build utils))
1473 (use-modules (guix build utils))
1474 (let* ((source (assoc-ref %build-inputs "source"))
1475 (output (assoc-ref %outputs "out"))
1476 (bindir (string-append output "/bin"))
1477 (script "git-test-sequence"))
1478 (install-file (string-append source "/" script)
1481 (home-page "https://dustin.sallings.org/2010/03/28/git-test-sequence.html")
1482 (synopsis "Run a command over a sequence of commits")
1484 "git-test-sequence is similar to an automated git bisect except it’s
1485 linear. It will test every change between two points in the DAG. It will
1486 also walk each side of a merge and test those changes individually.")
1487 (license (license:x11-style "file://LICENSE")))))
1489 (define* (make-gitolite #:optional (extra-inputs '()))
1490 "Make a gitolite package object with EXTRA-INPUTS added to the binary
1491 wrappers, to be used for optional gitolite extensions."
1499 (url "https://github.com/sitaramc/gitolite")
1500 (commit (string-append "v" version))))
1501 (file-name (git-file-name name version))
1503 (base32 "05xw1pmagvkrbzga5pgl3xk9qyc6b5x73f842454f3w9ijspa8zy"))))
1504 (build-system gnu-build-system)
1506 (list #:tests? #f ; no tests
1508 #~(modify-phases %standard-phases
1511 (add-before 'install 'patch-scripts
1513 ;; This seems to take care of every shell script that
1515 (substitute* (find-files ".")
1517 (string-append " " #$perl "/bin/perl" " -")))
1519 (substitute* (find-files "src/triggers" ".*")
1521 (string-append " " #$sed "/bin/sed" " ")))
1524 '("src/triggers/post-compile/update-gitweb-access-list"
1525 "src/triggers/post-compile/ssh-authkeys-split"
1526 "src/triggers/upstream")
1528 (string-append " " #$grep "/bin/grep" " ")))
1530 ;; Avoid references to the store in authorized_keys.
1531 ;; This works because gitolite-shell is in the PATH.
1532 (substitute* "src/triggers/post-compile/ssh-authkeys"
1533 (("\\$glshell \\$user")
1534 "gitolite-shell $user"))))
1535 (add-before 'install 'patch-source
1537 ;; Gitolite uses cat to test the readability of the
1539 (substitute* "src/lib/Gitolite/Setup.pm"
1541 (string-append "\"" #$coreutils "/bin/cat" " "))
1543 (string-append "\"" #$openssh "/bin/ssh-keygen")))
1545 (substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
1546 "src/lib/Gitolite/Hooks/Update.pm")
1548 (string-append #$perl "/bin/perl")))
1550 (substitute* "src/lib/Gitolite/Common.pm"
1552 (string-append "\"" #$openssh "/bin/ssh-keygen"))
1554 (string-append "\"" #$inetutils "/bin/logger\"")))
1556 (substitute* "src/lib/Gitolite/Cache.pm"
1557 (("/usr/sbin/redis-server") "redis-server"))
1559 (substitute* "src/commands/svnserve"
1560 (("/usr/bin/svnserve") "svnserve"))))
1563 (let* ((sharedir (string-append #$output "/share/gitolite"))
1564 (bindir (string-append #$output "/bin")))
1567 (invoke "./install" "-to" sharedir)
1568 ;; Create symlinks for executable scripts in /bin.
1569 (for-each (lambda (script)
1570 (symlink (string-append sharedir "/" script)
1571 (string-append bindir "/" script)))
1572 '("gitolite" "gitolite-shell")))))
1573 (add-after 'install 'wrap-scripts
1575 (for-each (lambda (file-name)
1576 (wrap-program (string-append #$output file-name)
1579 (string-append dir "/bin"))
1584 #$@extra-inputs)))))
1585 '("/bin/gitolite" "/bin/gitolite-shell")))))))
1587 (append (list bash-minimal coreutils findutils git inetutils openssh perl)
1589 (home-page "https://gitolite.com")
1590 (synopsis "Git access control layer")
1592 "Gitolite is an access control layer on top of Git, providing fine access
1593 control to Git repositories.")
1594 (license license:gpl2)))
1596 (define-public gitolite (make-gitolite))
1598 (define-public gitile
1606 (url "https://git.lepiller.eu/git/gitile")
1608 (file-name (git-file-name name version))
1610 (base32 "1wb1rajcrzdqjncv40s7hjsnvlh1gq4z9pn9gf210g1iy35vimmz"))))
1611 (build-system gnu-build-system)
1613 `(#:imported-modules ((guix build guile-build-system)
1614 ,@%gnu-build-system-modules)
1615 #:make-flags (list "GUILE_AUTO_COMPILE=0")
1617 (modify-phases %standard-phases
1618 (add-after 'install-bin 'wrap-program
1619 (lambda* (#:key inputs outputs #:allow-other-keys)
1620 (use-modules (guix build guile-build-system))
1621 ;; Wrap the 'gitile' command to refer to the right modules.
1622 (let* ((out (assoc-ref outputs "out"))
1623 (commonmark (assoc-ref inputs "guile-commonmark"))
1624 (git (assoc-ref inputs "guile-git"))
1625 (bytes (assoc-ref inputs "guile-bytestructures"))
1626 (fibers (assoc-ref inputs "guile-fibers"))
1627 (gcrypt (assoc-ref inputs "guile-gcrypt"))
1628 (syntax-highlight (assoc-ref inputs "guile-syntax-highlight"))
1629 (deps (list out commonmark git bytes fibers gcrypt
1631 (guile (assoc-ref inputs "guile"))
1632 (effective (target-guile-effective-version))
1633 (mods (string-drop-right ;drop trailing colon
1635 (string-append "/share/guile/site/"
1639 (objs (string-drop-right
1641 (string-append "/lib/guile/" effective
1645 (wrap-program (string-append out "/bin/gitile")
1646 `("GUILE_LOAD_PATH" ":" prefix (,mods))
1647 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,objs)))))))))
1649 (list autoconf automake guile-3.0 pkg-config))
1656 guile-syntax-highlight-for-gitile
1658 (home-page "https://git.lepiller.eu/gitile")
1659 (synopsis "Simple Git forge written in Guile")
1660 (description "Gitile is a Git forge written in Guile that lets you
1661 visualize your public Git repositories on a web interface.")
1662 (license license:agpl3+)))
1664 (define-public pre-commit
1670 (method git-fetch) ; no tests in PyPI release
1672 (url "https://github.com/pre-commit/pre-commit")
1673 (commit (string-append "v" version))))
1674 (file-name (git-file-name name version))
1676 (base32 "19jcg6nfnscp87h4wmbpw6r3lc8c75zkvb6wqgavq5dh7wkyg6pq"))))
1677 (build-system python-build-system)
1680 (modify-phases %standard-phases
1681 (add-before 'check 'prepare-check-env
1683 ;; Change from /homeless-shelter to /tmp for write permission.
1684 (setenv "HOME" "/tmp")
1685 ;; Environment variables used in the tests.
1686 (setenv "GIT_AUTHOR_NAME" "Your Name")
1687 (setenv "GIT_COMMITTER_NAME" "Your Name")
1688 (setenv "GIT_AUTHOR_EMAIL" "you@example.com")
1689 (setenv "GIT_COMMITTER_EMAIL" "you@example.com")
1690 ;; Some tests still fail with PermissionError. Make the source
1692 (for-each make-file-writable (find-files "."))
1693 ;; Some tests will need a working git repository.
1694 (invoke "git" "init")
1695 (invoke "git" "config" "--global" "user.name" "Your Name")
1696 (invoke "git" "config" "--global" "user.email" "you@example.com")))
1698 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1699 (add-installed-pythonpath inputs outputs)
1701 ;; The file below contains 30+ tests that fail because they
1702 ;; depend on tools from multiple languages (cargo, npm, cpan,
1703 ;; Rscript, etc). Other tests are passing, but it's more
1704 ;; convenient to skip the file than list 30 tests to skip.
1705 (invoke "pytest" "--ignore=tests/repository_test.py"
1706 ;; Ruby and Node tests require node and gem.
1707 "--ignore=tests/languages/node_test.py"
1708 "--ignore=tests/languages/ruby_test.py"
1711 ;; TODO: these tests fail with AssertionError. It may
1712 ;; be possible to fix them.
1713 "not test_install_existing_hooks_no_overwrite"
1714 " and not test_uninstall_restores_legacy_hooks"
1715 " and not test_installed_from_venv"
1716 " and not test_healthy_venv_creator"))))))))
1718 `(("git" ,git-minimal)
1719 ("python-covdefaults" ,python-covdefaults)
1720 ("python-coverage" ,python-coverage)
1721 ("python-distlib" ,python-distlib)
1722 ("python-pytest" ,python-pytest)
1723 ("python-pytest-env" ,python-pytest-env)
1724 ("python-re-assert" ,python-re-assert)
1726 ;; Propagate because pre-commit is also used as a module.
1734 (home-page "https://pre-commit.com/")
1735 (synopsis "Framework for managing and maintaining pre-commit hooks")
1737 "Pre-commit is a multi-language package manager for pre-commit hooks. You
1738 specify a list of hooks you want and pre-commit manages the installation and
1739 execution of any hook written in any language before every commit.")
1740 (license license:expat)))
1742 (define-public mercurial
1748 (uri (string-append "https://www.mercurial-scm.org/"
1749 "release/mercurial-" version ".tar.gz"))
1750 (patches (search-patches "mercurial-hg-extension-path.patch"
1751 "mercurial-openssl-compat.patch"))
1754 "1pr00hdk3l9095fhq6302fgj0wmbqhqs93y4r457ba4pyjjrvyly"))
1755 (modules '((guix build utils)))
1757 '(substitute* (find-files "tests" "\\.(t|sh)$")
1758 ;; grep 3.8 emits deprecation warnings for 'egrep' and
1759 ;; 'fgrep' which breaks expected test output.
1760 (("egrep") "grep -E")
1761 (("fgrep") "grep -F")))))
1762 (build-system gnu-build-system)
1765 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1767 (modify-phases %standard-phases
1769 (add-after 'unpack 'patch-tests
1771 (substitute* (find-files "tests" "\\.(t|py)$")
1777 (lambda* (#:key tests? #:allow-other-keys)
1778 (with-directory-excursion "tests"
1779 ;; The following tests are known to fail.
1780 (for-each delete-file
1781 '(;; XXX: This test calls 'run-tests.py --with-hg=
1782 ;; `which hg`' and fails because there is no hg on
1783 ;; PATH from before (that's why we are building it!)?
1786 ;; This test creates a shebang spanning multiple
1787 ;; lines which is difficult to substitute. It
1788 ;; only tests the test runner itself, which gets
1789 ;; thoroughly tested during the check phase anyway.
1792 ;; These tests fail because the program is not
1793 ;; connected to a TTY in the build container.
1794 "test-nointerrupt.t"
1795 "test-transaction-rollback-on-sigpipe.t"
1797 ;; FIXME: This gets killed but does not receive an interrupt.
1798 "test-commandserver.t"
1800 ;; These tests get unexpected warnings about using
1801 ;; deprecated functionality in Python, but otherwise
1802 ;; succeed; try enabling for later Mercurial versions.
1803 "test-demandimport.py"
1804 "test-patchbomb-tls.t"
1805 ;; Similarly, this gets a more informative error
1806 ;; message from Python 3.10 than it expects.
1807 "test-http-bad-server.t"
1809 ;; Only works when run in a hg-repo, not in an
1810 ;; extracted tarball
1813 ;; TODO: the fqaddr() call fails in the build
1814 ;; container, causing these server tests to fail.
1816 "test-http-branchmap.t"
1817 "test-pull-bundle.t"
1820 "test-subrepo-deep-nested-change.t"
1821 "test-subrepo-recursion.t"))
1823 (invoke "./run-tests.py"
1824 ;; ‘make check’ does not respect ‘-j’.
1825 (string-append "-j" (number->string
1826 (parallel-job-count)))
1827 ;; The default time-outs are too low for many systems.
1828 ;; Raise them generously: Guix enforces its own.
1830 "--slowtimeout" "86400"
1831 ;; The test suite takes a long time and produces little
1832 ;; output by default. Prevent timeouts due to silence.
1835 (list python-docutils
1836 ;; The following inputs are only needed to run the tests.
1837 python-nose unzip which))
1839 (list python-wrapper))
1840 ;; Find third-party extensions.
1841 (native-search-paths
1842 (list (search-path-specification
1843 (variable "HGEXTENSIONPATH")
1844 (files '("lib/python3.9/site-packages/hgext3rd")))))
1845 (home-page "https://www.mercurial-scm.org/")
1846 (synopsis "Decentralized version control system")
1848 "Mercurial is a free, distributed source control management tool. It
1849 efficiently handles projects of any size and offers an easy and intuitive
1851 (license license:gpl2+)))
1853 (define-public python-hg-evolve
1855 (name "python-hg-evolve")
1861 (url "https://www.mercurial-scm.org/repo/evolve")
1862 (changeset version)))
1863 (file-name (hg-file-name name version))
1866 "0qgk39s5pwxbshfa6x1f1ccxahja3fs265dddxy6q99spy3b3x5h"))))
1867 (build-system python-build-system)
1869 ;; Tests need mercurial source code.
1873 (home-page "https://www.mercurial-scm.org/doc/evolution/")
1874 (synopsis "Flexible evolution of Mercurial history")
1875 (description "Evolve is a Mercurial extension for faster and safer mutable
1876 history. It implements the changeset evolution concept for Mercurial.")
1877 (license license:gpl2)))
1879 (define-public hg-commitsigs
1880 ;; Latest tag is 11 years old.
1881 (let ((changeset "b53eb6862bff")
1884 (name "hg-commitsigs")
1885 (version (git-version "0.1.0" revision changeset))
1889 (url "https://foss.heptapod.net/mercurial/commitsigs")
1890 (changeset changeset)))
1891 (file-name (git-file-name name version))
1894 "059gm66q06m6ayl4brsc517zkw3ahmz249b6xm1m32ac5y24wb9x"))))
1895 (build-system copy-build-system)
1897 `(#:imported-modules ((guix build python-build-system)
1898 ,@%copy-build-system-modules)
1899 #:modules ((srfi srfi-1)
1900 (guix build python-build-system)
1901 ;; Don't use `%copy-build-system-modules' because
1902 ;; `standard-phases' from (guix build gnu-build-system)
1903 ;; shadows the one from (guix build copy-build-system),
1904 ;; which is the one we actually want.
1905 (guix build copy-build-system)
1906 ((guix build gnu-build-system) #:prefix gnu)
1908 (guix build gremlin)
1912 (modify-phases %standard-phases
1913 (add-after 'unpack 'patch-paths
1914 (lambda* (#:key inputs #:allow-other-keys)
1915 (let ((gpg (search-input-file inputs "/bin/gpg"))
1916 (openssl (search-input-file inputs "/bin/openssl")))
1917 (substitute* "commitsigs.py"
1918 (("b'gpg',") (string-append "b'" gpg "',"))
1919 (("b'openssl',") (string-append "b'" openssl "',")))))))
1921 `(("commitsigs.py" ,(string-append "lib/python"
1923 (assoc-ref %build-inputs "python"))
1924 "/site-packages/hgext3rd/commitsigs.py")))))
1928 (list gnupg openssl))
1929 (home-page "https://foss.heptapod.net/mercurial/commitsigs")
1930 (synopsis "Automatic signing of changeset hashes")
1931 (description "This package provides a Mercurial extension for signing
1932 the changeset hash of commits. The signure is embedded directly in the
1933 changeset itself; there won't be any extra commits. Either GnuPG or OpenSSL
1934 can be used for signing.")
1935 (license license:gpl2)))) ;per commitsigs.py
1943 (uri (string-append "https://notroj.github.io/neon/neon-"
1947 "11mj5zpp317dmds874wfwcpgij9i3scaahdi1xfzr5b2ii36crcq"))))
1948 (build-system gnu-build-system)
1950 (list perl pkg-config))
1952 (list libxml2 openssl zlib))
1954 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
1955 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
1957 #:configure-flags '("--enable-shared"
1959 ;; requires libgnutils-config, deprecated
1961 ; "--with-ssl=gnutls")))
1962 "--with-ssl=openssl")))
1963 (home-page "https://notroj.github.io/neon/")
1964 (synopsis "HTTP and WebDAV client library")
1966 "Neon is an HTTP and WebDAV client library, with a C interface and the
1969 @item High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
1971 @item low-level interface to the HTTP request/response engine, allowing the use
1972 of arbitrary HTTP methods, headers, etc.;
1973 @item authentication support including Basic and Digest support, along with
1974 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
1975 @item SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
1976 verifying server certificates, handling client certificates, and examining
1977 certificate properties, smartcard-based client certificates are also
1978 supported via a PKCS#11 wrapper interface;
1979 @item abstract interface to parsing XML using libxml2 or expat, and wrappers for
1980 simplifying handling XML HTTP response bodies;
1981 @item WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
1982 property manipulation.
1984 (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+
1986 (define-public subversion
1992 (uri (string-append "mirror://apache/subversion/"
1993 "subversion-" version ".tar.bz2"))
1996 "1ag1hvcm9q92kgalzbbgcsq9clxnzmbj9nciz9lmabjx4lyajp9c"))))
1997 (build-system gnu-build-system)
1999 '(#:parallel-tests? #f ; TODO Seems to cause test failures on
2001 #:configure-flags '("--enable-static=no")
2003 (modify-phases %standard-phases
2004 (add-after 'configure 'patch-libtool-wrapper-ls
2005 (lambda* (#:key inputs #:allow-other-keys)
2006 ;; This substitution allows tests svnauthz_tests and svnlook_tests
2007 ;; to pass. These tests execute svnauthz and svnlook through
2008 ;; their libtool wrapper scripts from svn hooks, whose empty
2009 ;; environments cause "ls: command not found" errors. It would be
2010 ;; nice if this fix ultimately made its way into libtool.
2011 (let ((coreutils (assoc-ref inputs "coreutils")))
2012 (substitute* "libtool"
2013 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))
2015 (add-before 'build 'patch-test-sh
2017 (substitute* "subversion/tests/libsvn_repos/repos-test.c"
2018 (("#!/bin/sh") (string-append "#!" (which "sh"))))
2020 (add-before 'check 'set-PARALLEL
2021 (lambda* (#:key parallel-tests? #:allow-other-keys)
2023 (setenv "PARALLEL" (number->string (parallel-job-count)))
2024 (simple-format #t "parallel-tests? are disabled\n"))
2026 (add-after 'install 'install-perl-bindings
2027 (lambda* (#:key outputs #:allow-other-keys)
2028 ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
2029 (let ((out (assoc-ref outputs "out")))
2030 (invoke "make" "swig-pl-lib")
2031 ;; FIXME: Test failures.
2032 ;; (invoke "make" "check-swig-pl")
2033 (invoke "make" "install-swig-pl-lib")
2035 ;; Set the right installation prefix.
2036 (with-directory-excursion
2037 "subversion/bindings/swig/perl/native"
2038 (invoke "perl" "Makefile.PL"
2040 (string-append "PREFIX=" out))
2041 (invoke "make" "install"
2042 (string-append "OTHERLDFLAGS="
2047 ;; For the Perl bindings.
2051 ("apr-util" ,apr-util)
2055 ("python" ,python-wrapper)
2057 ("utf8proc" ,utf8proc)
2059 (home-page "https://subversion.apache.org/")
2060 (synopsis "Revision control system")
2062 "@dfn{Subversion} (svn) exists to be recognized and adopted as a
2063 centralized version control system characterized by its
2064 reliability as a safe haven for valuable data; the simplicity of its model and
2065 usage; and its ability to support the needs of a wide variety of users and
2066 projects, from individuals to large-scale enterprise operations.")
2067 (license license:asl2.0)))
2075 (uri (string-append "mirror://gnu/rcs/rcs-"
2079 "1iac4d1dhsfy5zb0n3p605pihdq702v06r4g8vi8b2saf88gxpa3"))))
2080 (build-system gnu-build-system)
2081 (arguments `(#:phases
2082 (modify-phases %standard-phases
2083 (add-after 'install 'install-rcsfreeze
2084 (lambda* (#:key outputs #:allow-other-keys)
2085 (let* ((out (assoc-ref outputs "out"))
2086 (bin (string-append out "/bin"))
2087 (man1 (string-append out "/share/man/man1")))
2088 (chmod "src/rcsfreeze" #o755)
2089 (install-file "src/rcsfreeze" bin)
2090 (install-file "man/rcsfreeze.1" man1)))))))
2091 (native-inputs (list ed lzip))
2092 (home-page "https://www.gnu.org/software/rcs/")
2093 (synopsis "Per-file local revision control system")
2095 "RCS is the original Revision Control System. It works on a
2096 file-by-file basis, in contrast to subsequent version control systems such as
2097 CVS, Subversion, and Git. This can make it suitable for system
2098 administration files, for example, which are often inherently local to one
2100 (license license:gpl3+)))
2102 (define-public rcs-blame
2105 (version "1.3.1-20210207")
2109 "https://invisible-mirror.net/archives/rcs-blame/blame-"
2113 "1j0brsvdx3hlbwchddafh8r2xmxv5vg4ahpd68v4bb9xhcq6pcih"))))
2114 (build-system gnu-build-system)
2115 (home-page "https://invisible-island.net/rcs-blame/rcs-blame.html")
2116 (synopsis "Display the last modification for each line in an RCS file")
2118 "@code{blame} outputs an annotated revision from each RCS file. An
2119 annotated RCS file describes the revision and date in which each line was
2120 added to the file, and the author of each line.")
2121 (license license:gpl2+)))
2123 (define-public rcshist
2126 (version "1.04-20190106")
2130 "https://invisible-mirror.net/archives/rcshist/rcshist-"
2134 "01ab3xwgm934lxr8bm758am3vxwx4hxx7cc9prbgqj5nh30vdg1n"))))
2135 (build-system gnu-build-system)
2136 (home-page "https://invisible-island.net/rcshist/rcshist.html")
2137 (synopsis "Display RCS change history")
2139 "The @code{rcshist} utility displays the complete revision history of a
2140 set of RCS files including log messages and patches. It can also display the
2141 patch associated with a particular revision of an RCS file.")
2142 (license (list license:bsd-2
2143 license:bsd-3)))) ; bsd_queue.h
2152 "https://ftp.gnu.org/non-gnu/cvs/source/feature/"
2153 version "/cvs-" version ".tar.bz2"))
2154 (patches (search-patches "cvs-CVE-2017-12836.patch"))
2157 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
2158 (build-system gnu-build-system)
2160 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
2162 #:configure-flags (list "--with-external-zlib")))
2163 (inputs (list zlib nano)) ; the default editor
2164 (home-page "http://cvs.nongnu.org")
2165 (synopsis "Historical centralized version control system")
2167 "CVS is a version control system, an important component of Source
2168 Configuration Management (SCM). Using it, you can record the history of
2169 sources files, and documents. It fills a similar role to the free software
2170 RCS, PRCS, and Aegis packages.")
2171 (license license:gpl1+)))
2173 (define-public cvs-fast-export
2175 (name "cvs-fast-export")
2179 (uri (string-append "http://www.catb.org/~esr/cvs-fast-export/"
2180 "cvs-fast-export-" version ".tar.gz"))
2183 "058bzp3npng48ascls943m16kgvrl0h197a10brf7mvx8zpfc7sc"))))
2184 (build-system gnu-build-system)
2187 (modify-phases %standard-phases
2188 (delete 'configure)) ; no configure script
2189 #:parallel-build? #f ; parallel a2x commands fail spectacularly
2191 (list "CC=gcc" (string-append "prefix?=" (assoc-ref %outputs "out")))))
2194 ("python" ,python-wrapper)))
2197 ;; These are needed for the tests.
2199 (home-page "http://www.catb.org/esr/cvs-fast-export/")
2200 (synopsis "Export an RCS or CVS history as a fast-import stream")
2201 (description "This program analyzes a collection of RCS files in a CVS
2202 repository (or outside of one) and, when possible, emits an equivalent history
2203 in the form of a fast-import stream. Not all possible histories can be
2204 rendered this way; the program tries to emit useful warnings when it can't.
2206 The program can also produce a visualization of the resulting commit directed
2207 acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org,
2208 Graphviz}. The package also includes @command{cvssync}, a tool for mirroring
2209 masters from remote CVS hosts.")
2210 (license license:gpl2+)))
2212 (define-public vc-dwim
2218 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
2222 "0am6axxdvkm2vwgg0gjrd930yv4dlsdbf0rdv0zh5bhy1ir64rph"))))
2223 (build-system gnu-build-system)
2224 (inputs (list perl))
2226 (list emacs-minimal ; for `ctags'
2227 inetutils)) ; for `hostname', used in the tests
2228 (home-page "https://www.gnu.org/software/vc-dwim/")
2229 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
2231 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
2232 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
2233 using version control at the same time, for example by printing a reminder
2234 when a file change has been described in the ChangeLog but the file has not
2235 been added to the VC. vc-chlog scans changed files and generates
2236 standards-compliant ChangeLog entries based on the changes that it detects.")
2237 (license license:gpl3+)))
2239 (define-public diffstat
2247 (string-append "ftp://invisible-island.net/diffstat/"
2248 "diffstat-" version ".tgz")
2249 (string-append "http://invisible-mirror.net/archives/diffstat/"
2250 "diffstat-" version ".tgz")))
2253 "1z7pwcv48fjnhxrjcsjdy83x8b9ckl582mbbds90a79fkn6y7bmq"))))
2254 (build-system gnu-build-system)
2255 (home-page "https://invisible-island.net/diffstat/")
2256 (synopsis "Make histograms from the output of @command{diff}")
2258 "Diffstat reads the output of @command{diff} and displays a histogram of
2259 the insertions, deletions, and modifications per file. It is useful for
2260 reviewing large, complex patch files.")
2261 (license (license:x11-style "file://COPYING"))))
2269 (uri (string-append "mirror://gnu/" name "/CSSC-"
2273 "1vsisqq573xjr2qpn19iwmpqgl3mq03m790akpa4rvj60b4d1gni"))))
2274 (build-system gnu-build-system)
2277 (modify-phases %standard-phases
2278 (add-before 'check 'precheck
2281 (substitute* "tests/common/test-common"
2282 (("/bin/pwd") (which "pwd")))
2284 (substitute* "tests/prt/all-512.sh"
2285 (("/bin/sh") (which "sh")))
2287 ;; XXX: This test has no hope of passing until there is a "nogroup"
2288 ;; entry (or at least some group to which the guix builder does
2289 ;; not belong) in the /etc/group file of the build environment.
2290 ;; Currently we do not have such a group. Disable this test for now.
2291 (substitute* "tests/Makefile"
2292 (("test-delta ") ""))))))))
2293 ;; These are needed for the tests
2294 (native-inputs (list git cvs))
2295 (home-page "https://www.gnu.org/software/cssc/")
2296 (synopsis "File-based version control like SCCS")
2297 (description "GNU CSSC provides a replacement for the legacy Unix source
2298 code control system SCCS. This allows old code still under that system to be
2299 accessed and migrated on modern systems.")
2300 (license license:gpl3+)))
2302 ;; This package can unfortunately work only in -TEST mode, since Aegis
2303 ;; requires that it is installed setuid root.
2304 (define-public aegis
2310 (uri (string-append "mirror://sourceforge/aegis/aegis/" version
2311 "/aegis-" version ".tar.gz"))
2314 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
2315 (patches (search-patches "aegis-perl-tempdir1.patch"
2316 "aegis-perl-tempdir2.patch"
2317 "aegis-test-fixup-1.patch"
2318 "aegis-test-fixup-2.patch"
2319 "aegis-constness-error.patch"))))
2320 (build-system gnu-build-system)
2322 `(("e2fsprogs" ,e2fsprogs)
2325 ("libxml2" ,libxml2)
2327 ("gettext" ,gettext-minimal)))
2332 ;; Various tests require the following:
2340 `(#:configure-flags (list "--with-no-aegis-configured"
2341 "--sharedstatedir=/var/com/aegis"
2342 ;; Uses the old 'throw()' specifier with 'new'
2343 ;; which changed in C++11.
2344 "CXXFLAGS=-std=c++03")
2345 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
2347 (modify-phases %standard-phases
2348 (add-before 'configure 'pre-conf
2350 (substitute* (append '("configure"
2351 "etc/check-tar-gz.sh"
2355 "script/aebisect.in"
2356 "script/aeintegratq.in"
2358 "script/test_funcs.in"
2359 "web/eg_oss_templ.sh"
2361 "libaegis/getpw_cache.cc")
2362 (find-files "test" "\\.sh"))
2363 (("/bin/sh") (which "sh")))
2364 (setenv "SH" (which "sh"))
2368 (let ((home (string-append (getcwd) "/my-new-home")))
2369 ;; Some tests need to write to $HOME.
2371 (setenv "HOME" home)
2373 ;; This test assumes that flex has been symlinked to "lex".
2374 (substitute* "test/00/t0011a.sh"
2375 (("type lex") "type flex"))
2377 ;; XXX Disable tests that fail, for unknown reasons, ‘for now’.
2379 (lambda (test) (substitute* "Makefile"
2380 (((string-append "test/" test "\\.ES ")) "")))
2385 ;; The author decided to call the check rule "sure".
2386 (invoke "make" "sure")))))))
2387 (home-page "https://sourceforge.net/projects/aegis/")
2388 (synopsis "Project change supervisor")
2389 (description "Aegis is a project change supervisor, and performs some of
2390 the Software Configuration Management needed in a CASE environment. Aegis
2391 provides a framework within which a team of developers may work on many
2392 changes to a program independently, and Aegis coordinates integrating these
2393 changes back into the master source of the program, with as little disruption
2394 as possible. Resolution of contention for source files, a major headache for
2395 any project with more than one developer, is one of Aegis's major functions.")
2396 (license license:gpl3+)))
2398 (define-public reposurgeon
2400 (name "reposurgeon")
2404 (uri (string-append "http://www.catb.org/~esr/" name "/"
2405 name "-" version ".tar.xz"))
2408 "1af0z14wcm4bk5a9ysinbwq2fp3lf5f7i8mvwh7286hr3fnagcaz"))
2409 (patches (search-patches
2410 "reposurgeon-add-missing-docbook-files.patch"))))
2411 (build-system gnu-build-system)
2415 (string-append "target=" (assoc-ref %outputs "out")))
2417 (modify-phases %standard-phases
2418 (add-after 'unpack 'patch-inputs
2419 (lambda* (#:key inputs #:allow-other-keys)
2420 (let ((tzdata (assoc-ref inputs "tzdata")))
2421 (substitute* "reposurgeon"
2422 (("/usr/share/zoneinfo")
2423 (string-append tzdata "/share/zoneinfo")))
2424 (substitute* "test/svn-to-svn"
2425 (("/bin/echo") "echo"))
2427 (delete 'configure) ; no configure script
2428 (add-before 'build 'fix-docbook
2429 (lambda* (#:key inputs #:allow-other-keys)
2430 (substitute* (find-files "." "\\.xml$")
2431 (("docbook/docbookx.dtd")
2432 (string-append (assoc-ref inputs "docbook-xml")
2433 "/xml/dtd/docbook/docbookx.dtd")))
2435 (add-before 'check 'set-up-test-environment
2436 (lambda* (#:key inputs #:allow-other-keys)
2437 (let ((tzdata (assoc-ref inputs "tzdata")))
2438 (setenv "TZDIR" (string-append tzdata "/share/zoneinfo"))
2440 (add-after 'install 'install-emacs-data
2441 (lambda* (#:key outputs #:allow-other-keys)
2442 (install-file "reposurgeon-mode.el"
2443 (string-append (assoc-ref outputs "out")
2444 "/share/emacs/site-lisp"))
2447 `(("python" ,python-wrapper)
2448 ("tzdata" ,tzdata)))
2450 (list ;; For building documentation.
2461 (home-page "http://www.catb.org/~esr/reposurgeon/")
2462 (synopsis "Edit version-control repository history")
2463 (description "Reposurgeon enables risky operations that version-control
2464 systems don't want to let you do, such as editing past comments and metadata
2465 and removing commits. It works with any version control system that can
2466 export and import Git fast-import streams, including Git, Mercurial, Fossil,
2467 Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly
2468 and can thus be used to script production of very high-quality conversions
2469 from Subversion to any supported Distributed Version Control System (DVCS).")
2470 ;; Most files are distributed under bsd-2, except 'repocutter' which is
2472 (license (list license:bsd-2 license:bsd-3))))
2481 "https://github.com/jonas/tig/releases/download/tig-"
2482 version "/tig-" version ".tar.gz"))
2485 "0xna55y1r1jssdmrzpinv96p7w00w9hn39q5l3d8l299dg4bmiyv"))
2486 (modules '((guix build utils)))
2489 ;; TODO: Delete and rebuild doc/*.(1|5|7).
2490 (for-each delete-file (find-files "doc" "\\.html$"))))))
2491 (build-system gnu-build-system)
2493 (list asciidoc xmlto))
2495 (list ncurses readline))
2498 (modify-phases %standard-phases
2499 (add-after 'install 'install-doc
2501 (invoke "make" "install-doc")))
2502 (add-after 'install 'install-completions
2503 (lambda* (#:key outputs #:allow-other-keys)
2504 (let* ((out (assoc-ref outputs "out"))
2505 (share (string-append out "/share")))
2506 (mkdir-p (string-append share "/bash-completion/completions"))
2507 (mkdir-p (string-append share "/zsh/site-functions"))
2508 (copy-file "contrib/tig-completion.bash"
2509 (string-append share "/bash-completion/completions/tig"))
2510 (copy-file "contrib/tig-completion.zsh"
2511 (string-append share "/zsh/site-functions/_tig"))))))
2512 #:test-target "test"
2513 #:tests? #f)) ; tests require access to /dev/tty
2514 (home-page "https://jonas.github.io/tig/")
2515 (synopsis "Ncurses-based text user interface for Git")
2517 "Tig is an ncurses text user interface for Git, primarily intended as
2518 a history browser. It can also stage hunks for commit, or colorize the
2519 output of the @code{git} command.")
2520 (license license:gpl2+)))
2522 (define-public findnewest
2530 (url "https://github.com/0-wiz-0/findnewest")
2531 (commit (string-append "findnewest-" version))))
2532 (file-name (git-file-name name version))
2534 (base32 "1x1cbn2b27h5r0ah5xc06fkalfdci2ngrgd4wibxjw0h88h0nvgq"))))
2535 (build-system gnu-build-system)
2536 (native-inputs (list autoconf automake))
2537 (home-page "https://github.com/0-wiz-0/findnewest/releases")
2538 (synopsis "Print the modification time of the latest file")
2540 "Recursively find the newest file in a file tree and print its
2541 modification time.")
2542 (license license:bsd-2)))
2544 (define-public myrepos
2547 (version "1.20180726")
2552 (url "git://myrepos.branchable.com/myrepos")
2554 (file-name (string-append name "-" version "-checkout"))
2556 (base32 "0jphw61plm8cgklja6hs639xhdvxgvjwbr6jpvjwpp7hc5gmhms5"))))
2557 (build-system gnu-build-system)
2559 '(#:test-target "test"
2560 #:make-flags (list (string-append "PREFIX=" %output))
2562 (modify-phases %standard-phases
2564 (add-after 'install 'wrap-webcheckout
2565 (lambda* (#:key inputs outputs #:allow-other-keys)
2566 (let ((out (assoc-ref outputs "out")))
2567 (wrap-program (string-append out "/bin/webcheckout")
2568 `("PERL5LIB" ":" prefix
2569 ,(map (lambda (i) (string-append (assoc-ref inputs i)
2570 "/lib/perl5/site_perl"))
2571 '("perl-encode-locale" "perl-http-date"
2572 "perl-http-message" "perl-html-parser" "perl-libwww"
2573 "perl-uri" "perl-try-tiny"))))
2584 (home-page "https://myrepos.branchable.com/")
2585 (synopsis "Multiple repository management tool")
2587 "Myrepos provides the @code{mr} command, which maps an operation (e.g.,
2588 fetching updates) over a collection of version control repositories. It
2589 supports a large number of version control systems: Git, Subversion,
2590 Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
2591 (license license:gpl2+)))
2593 (define-public grokmirror
2601 (url (string-append "https://git.kernel.org/pub/scm/"
2602 "utils/grokmirror/grokmirror.git"))
2603 (commit (string-append "v" version))))
2604 (file-name (string-append name "-" version "-checkout"))
2606 (base32 "0c6nnfzzyl247r1dcjnsyx16d34nyra9ikjjhi0xzlrbiwnb0w32"))))
2607 (build-system python-build-system)
2609 `(#:tests? #f ; no test suite
2611 (modify-phases %standard-phases
2612 (add-after 'install 'install-manpages
2613 (lambda* (#:key outputs #:allow-other-keys)
2614 (let* ((man (string-append (assoc-ref outputs "out")
2617 (for-each (lambda (file) (install-file file man))
2618 (find-files "." "\\.1$"))))))))
2620 (list python-packaging python-requests))
2622 "https://git.kernel.org/pub/scm/utils/grokmirror/grokmirror.git")
2623 (synopsis "Framework to smartly mirror git repositories")
2624 (description "Grokmirror enables replicating large git repository
2625 collections efficiently. Mirrors decide to clone and update repositories
2626 based on a manifest file published by servers.")
2627 (license license:gpl3+)))
2629 (define-public patatt
2636 (uri (pypi-uri "patatt" version))
2638 (base32 "0fpbkmdlnz9s1lakw11jlrzpz4mb6f4dksdiir9g1ppq0g34sy58"))))
2639 (build-system python-build-system)
2640 (arguments '(#:tests? #f)) ; No tests.
2642 (list python-pynacl))
2643 (home-page "https://git.kernel.org/pub/scm/utils/patatt/patatt.git")
2644 (synopsis "Tool for cryptographic patch attestation")
2645 (description "This utility provides end-to-end cryptographic attestation
2646 of patches sent via mail. It does so by adapting the DKIM email signature
2647 standard to include cryptographic signatures via the X-Developer-Signature
2649 (license license:expat-0)))
2658 (uri (pypi-uri "b4" version))
2660 (base32 "115ysciq15sxc8fd9hf7p0f4wnd5xapcfkmq8g33y1c8nbdxclbx"))))
2661 (build-system python-build-system)
2663 (list #:tests? #f ;no tests
2665 #~(modify-phases %standard-phases
2666 ;; XXX: dnspython attempts to read /etc/resolv.conf when loading
2667 ;; resolver.py, which breaks the sanity check in dependent
2668 ;; packages. This should rather be fixed in dnspython.
2669 (delete 'sanity-check))))
2671 (list python-dkimpy python-dnspython python-requests))
2674 (home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git")
2675 (synopsis "Tool for working with patches in public-inbox archives")
2677 "The @code{b4} command is designed to make it easier to participate in
2678 patch-based workflows for projects that have public-inbox archives.
2682 @item downloading a thread's mbox given a message ID
2683 @item processing an mbox so that is ready to be fed to @code{git-am}
2684 @item creating templated replies for processed patches and pull requests
2685 @item submitting cryptographic attestation for patches.
2687 (license license:gpl2+)))
2689 (define-public git-annex-remote-rclone
2691 (name "git-annex-remote-rclone")
2697 (url "https://github.com/DanielDent/git-annex-remote-rclone")
2698 (commit (string-append "v" version))))
2699 (file-name (git-file-name name version))
2702 "0j0hlxji8d974fq7zd4xc02n0jpi31ylhxc7z4zp8iiwad5mkpxp"))))
2703 (build-system trivial-build-system)
2705 `(#:modules ((guix build utils))
2708 (use-modules (guix build utils))
2709 (let ((bash (search-input-file %build-inputs "/bin/bash"))
2710 (rclone (search-input-file %build-inputs "/bin/rclone")))
2711 (copy-file (string-append (assoc-ref %build-inputs "source")
2712 "/git-annex-remote-rclone")
2713 "git-annex-remote-rclone")
2714 (substitute* "git-annex-remote-rclone"
2715 (("/bin/bash") bash)
2716 (("runcmd rclone") (string-append "runcmd " rclone)))
2717 (install-file "git-annex-remote-rclone"
2718 (string-append %output "/bin"))
2722 (home-page "https://github.com/DanielDent/git-annex-remote-rclone")
2723 (synopsis "Use rclone-supported cloud storage providers with git-annex")
2724 (description "This wrapper around rclone makes any destination supported
2725 by rclone usable with git-annex.")
2726 (license license:gpl3+)))
2728 (define-public fossil
2736 "https://www.fossil-scm.org/home/tarball/"
2737 "84f25d7eb10c0714109d69bb2809abfa8b4b5c3d73b151a5b10df724dacd46d8"
2738 "/fossil-src-" version ".tar.gz"))
2739 ;; XXX: Currently the above hash must be manually updated.
2741 (base32 "0cq7677p84nnbfvk2dsh3c3y900gslw3zaw8iipfq932vmf1s31h"))
2742 (modules '((guix build utils)))
2745 (delete-file-recursively "compat")
2746 ;; Disable obsolete SQLite feature check; remove for 2.19.
2747 (substitute* "tools/sqlcompattest.c"
2748 ((".*\"ENABLE_JSON1\".*")
2750 (build-system gnu-build-system)
2752 (list tcl ;for configuration only
2753 which ;for tests only
2756 (list openssl zlib sqlite-next)) ;SQLite 3.37 or later
2758 `(#:configure-flags (list "--with-openssl=auto"
2759 "--disable-internal-sqlite")
2760 #:test-target "test"
2761 #:phases (modify-phases %standard-phases
2762 (add-after 'patch-source-shebangs 'patch-sh
2764 (substitute* '("auto.def")
2765 (("/bin/sh") (which "sh")))))
2767 (lambda* (#:key outputs (configure-flags '())
2769 ;; The 'configure' script is not an autoconf script and
2770 ;; chokes on unrecognized options.
2773 (string-append "--prefix="
2774 (assoc-ref outputs "out"))
2776 (add-before 'check 'test-setup
2778 (setenv "USER" "guix")
2779 (setenv "TZ" "UTC"))))))
2780 (home-page "https://fossil-scm.org")
2781 (synopsis "Software configuration management system")
2783 "Fossil is a distributed source control management system which supports
2784 access and administration over HTTP CGI or via a built-in HTTP server. It has
2785 a built-in wiki, built-in file browsing, built-in tickets system, etc.")
2787 '((release-monitoring-url
2788 . "https://fossil-scm.org/home/uv/latest-release.md")))
2789 (license (list license:public-domain ;src/miniz.c, src/shell.c
2792 (define-public stagit
2799 (url "git://git.codemadness.org/stagit")
2801 (file-name (git-file-name name version))
2804 "0j2242vx5pbwdv79gcjxdbrwii48qphr8gk1lk7szj2irxdql171"))))
2805 (build-system gnu-build-system)
2807 `(#:tests? #f ; No tests
2808 #:make-flags (list (string-append "CC=" ,(cc-for-target))
2809 (string-append "PREFIX=" %output))
2811 (modify-phases %standard-phases
2812 (delete 'configure)))) ; No configure script
2815 (home-page "https://git.codemadness.org/stagit/")
2816 (synopsis "Static git page generator")
2817 (description "Stagit creates static pages for git repositories, the results can
2818 be served with a HTTP file server of your choice.")
2819 (license license:expat)))
2821 (define-public gource
2828 "https://github.com/acaudwell/Gource/releases/download"
2829 "/gource-" version "/gource-" version ".tar.gz"))
2832 "16p7b1x4r0915w883lp374jcdqqja37fnb7m8vnsfnl2n64gi8qr"))))
2833 (build-system gnu-build-system)
2836 (list (string-append "--with-boost-libdir="
2837 (assoc-ref %build-inputs "boost")
2850 (sdl-union (list sdl2 sdl2-image))))
2851 (home-page "https://gource.io/")
2852 (synopsis "3D visualisation tool for source control repositories")
2853 (description "@code{gource} provides a software version control
2854 visualization. The repository is displayed as a tree where the root of the
2855 repository is the centre, directories are branches and files are leaves.
2856 Contributors to the source code appear and disappear as they contribute to
2857 specific files and directories.")
2858 (license license:gpl3+)))
2867 "http://www.catb.org/~esr/src/src-" version ".tar.gz"))
2870 "0ha287gc95vz6bdvn42pi3qibc56h1w5dshsvjvdn2zd283amksd"))))
2871 (build-system gnu-build-system)
2874 (list (string-append "prefix=" (assoc-ref %outputs "out")))
2876 (modify-phases %standard-phases
2877 (delete 'configure) ; no 'configure' script
2878 (add-after 'install 'wrap-program
2879 (lambda* (#:key inputs outputs #:allow-other-keys)
2880 (let* ((out (assoc-ref outputs "out"))
2881 (prog (string-append out "/bin/src"))
2882 (rcs (assoc-ref inputs "rcs")))
2884 `("PATH" ":" prefix (,(string-append rcs "/bin"))))
2888 (setenv "HOME" (getenv "TMPDIR"))
2889 (invoke "git" "config" "--global" "user.name" "guix")
2890 (invoke "git" "config" "--global" "user.email" "guix")
2891 (invoke "./srctest"))))))
2897 ("python" ,python-wrapper)
2899 (synopsis "Simple revision control")
2900 (home-page "http://www.catb.org/~esr/src/")
2902 "SRC (or src) is simple revision control, a version-control system for
2903 single-file projects by solo developers and authors. It modernizes the
2904 venerable RCS, hence the anagrammatic acronym. The design is tuned for use
2905 cases like all those little scripts in your @file{~/bin} directory, or a
2906 directory full of HOWTOs.")
2907 (license license:bsd-2)))
2909 (define-public git-when-merged
2910 ;; Use an unreleased version to get a PY3 compatibility fix.
2911 (let ((commit "ab6af7865a0ba55ba364a6c507e0be6f84f31c6d"))
2913 (name "git-when-merged")
2914 (version (string-append "1.2.0-" (string-take commit 7)))
2918 (url "https://github.com/mhagger/git-when-merged/")
2920 (file-name (git-file-name name version))
2923 "0iyk2psf97bc9h43m89p3xjmm79fsx99i7px29g4lcnmdy5kmz0p"))))
2924 (build-system gnu-build-system)
2926 `(#:tests? #f ; there are no tests
2928 (modify-phases %standard-phases
2932 (lambda* (#:key outputs #:allow-other-keys)
2933 (install-file "bin/git-when-merged"
2934 (string-append (assoc-ref outputs "out")
2937 (add-before 'install 'patch-git
2938 (lambda* (#:key inputs #:allow-other-keys)
2939 (let ((git (search-input-file inputs "/bin/git")))
2940 (substitute* "bin/git-when-merged"
2941 (("'git'") (string-append "'" git "'")))
2943 (add-after 'install 'wrap-script
2944 (lambda* (#:key outputs #:allow-other-keys)
2945 (wrap-program (string-append (assoc-ref outputs "out")
2946 "/bin/git-when-merged")
2947 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
2951 ("python" ,python-wrapper)))
2952 (home-page "https://github.com/mhagger/git-when-merged")
2953 (synopsis "Determine when a commit was merged into a Git branch")
2954 (description "This Git extension defines a subcommand,
2955 @code{when-merged}, whose core operation is to find the merge that brought a
2956 given commit into the specified ref(s). It has various options that control
2957 how information about the merge is displayed.")
2958 (license license:gpl2+))))
2960 (define-public git-imerge
2968 (url "https://github.com/mhagger/git-imerge")
2969 (commit (string-append "v" version))))
2970 (file-name (git-file-name name version))
2972 (base32 "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4"))))
2973 (build-system gnu-build-system)
2975 `(#:tests? #f ; only manual test scripts
2976 #:make-flags (list (string-append "DESTDIR=" %output)
2979 (modify-phases %standard-phases
2981 (add-before 'install 'patch-git
2982 (lambda* (#:key inputs #:allow-other-keys)
2983 (let ((git (search-input-file inputs "/bin/git")))
2984 (substitute* "git-imerge"
2985 (("'git'") (string-append "'" git "'")))
2987 (add-after 'install 'wrap-script
2988 (lambda* (#:key outputs #:allow-other-keys)
2989 (wrap-program (string-append (assoc-ref outputs "out")
2991 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
2995 ("python" ,python-wrapper)))
2996 (home-page "https://github.com/mhagger/git-imerge")
2997 (synopsis "Incremental merge for Git")
2998 (description "This Git extension defines a subcommand, @code{imerge},
2999 which performs an incremental merge between two branches. Its two primary
3000 design goals are to reduce the pain of resolving merge conflicts by finding
3001 the smallest possible conflicts and to allow a merge to be saved, tested,
3002 interrupted, published, and collaborated on while in progress.")
3003 (license license:gpl2+)))
3005 (define-public git-lfs
3012 (url "https://github.com/git-lfs/git-lfs")
3013 (commit (string-append "v" version))))
3014 (file-name (git-file-name name version))
3017 "0r7dmqhkhz91d3n7qfpny483x8f1n88yya22j2fvx75rgg33z2sg"))))
3018 (build-system go-build-system)
3020 `(#:import-path "github.com/git-lfs/git-lfs"
3021 #:install-source? #f
3023 (modify-phases %standard-phases
3024 (add-before 'build 'man-gen
3025 ;; Without this, the binary generated in 'build
3026 ;; phase won't have any embedded usage-text.
3028 (with-directory-excursion "src/github.com/git-lfs/git-lfs"
3029 (invoke "make" "mangen"))))
3030 (add-after 'build 'build-man-pages
3032 (with-directory-excursion "src/github.com/git-lfs/git-lfs"
3033 (invoke "make" "man"))
3035 (add-after 'install 'install-man-pages
3036 (lambda* (#:key outputs #:allow-other-keys)
3037 (with-directory-excursion "src/github.com/git-lfs/git-lfs/man"
3038 (let ((out (assoc-ref outputs "out")))
3041 (install-file manpage (string-append out "/share/man/man1")))
3042 (find-files "." "^git-lfs.*\\.1$"))))
3044 ;; make `ronn` available during build for man page generation
3045 (native-inputs (list ronn-ng))
3046 (home-page "https://git-lfs.github.com/")
3047 (synopsis "Git extension for versioning large files")
3049 "Git Large File Storage (LFS) replaces large files such as audio samples,
3050 videos, datasets, and graphics with text pointers inside Git, while storing the
3051 file contents on a remote server.")
3052 (license license:expat)))
3054 (define-public git-open
3062 (url "https://github.com/paulirish/git-open")
3063 (commit (string-append "v" version))))
3064 (file-name (git-file-name name version))
3066 (base32 "11n46bngvca5wbdbfcxzjhjbfdbad7sgf7h9gf956cb1q8swsdm0"))))
3067 (build-system copy-build-system)
3072 (modify-phases %standard-phases
3073 (add-after 'install 'wrap-program
3074 (lambda* (#:key outputs inputs #:allow-other-keys)
3075 (let ((out (assoc-ref outputs "out"))
3076 (xdg-utils (assoc-ref inputs "xdg-utils")))
3077 (wrap-program (string-append out "/bin/git-open")
3078 `("PATH" ":" prefix (,(string-append xdg-utils "/bin"))))))))
3080 '(("git-open" "bin/git-open"))))
3081 (home-page "https://github.com/paulirish/git-open")
3082 (synopsis "Open a Git repository's homepage from the command-line")
3084 "@code{git open} opens the repository's website from the command-line,
3085 guessing the URL pattern from the @code{origin} remote.")
3086 (license license:expat)))
3094 (uri (string-append "https://ftp.gnu.org/old-gnu/gnu-arch/"
3095 "tla-" version ".tar.gz"))
3098 "01mfzj1i6p4s8191cgd5850hds1zls88hkf9rb6qx1vqjv585aj0"))
3099 (modules '((guix build utils)))
3102 ;; In tar 1.32, '--preserve' is ambiguous and leads to an
3103 ;; error, so address that.
3104 (substitute* "src/tla/libarch/archive.c"
3106 "\"--preserve-permissions\""))
3108 (build-system gnu-build-system)
3110 '(#:phases (modify-phases %standard-phases
3112 (lambda* (#:key inputs outputs #:allow-other-keys)
3113 (let ((out (assoc-ref outputs "out")))
3119 ;; For libneon's 'configure' script.
3120 ;; XXX: There's a bundled copy of neon.
3121 (setenv "CONFIG_SHELL" (which "sh"))
3123 (invoke "../configure" "--prefix" out
3124 "--config-shell" (which "sh")
3125 "--with-posix-shell" (which "sh")
3126 "--with-cc" "gcc")))))
3129 ;; There are build failures when building in parallel.
3130 #:parallel-build? #f
3131 #:parallel-tests? #f
3133 #:test-target "test"))
3136 (synopsis "Historical distributed version-control system")
3138 "GNU Arch, aka. @code{tla}, was one of the first free distributed
3139 version-control systems (DVCS). It saw its last release in 2006. This
3140 package is provided for users who need to recover @code{tla} repositories and
3142 (home-page "https://www.gnu.org/software/gnu-arch/")
3143 (license license:gpl2))) ;version 2 only
3145 (define-public diff-so-fancy
3147 (name "diff-so-fancy")
3152 (url "https://github.com/so-fancy/diff-so-fancy")
3153 (commit (string-append "v" version))))
3154 (file-name (git-file-name name version))
3157 "11vkq5njjlvjipic7db44ga875n61drszw1qrdzwxmmfmnz425zz"))))
3159 (list perl ncurses))
3160 (build-system copy-build-system)
3163 (modify-phases %standard-phases
3164 (add-after 'unpack 'patch-lib-path
3165 (lambda* (#:key outputs #:allow-other-keys)
3166 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3167 (substitute* "diff-so-fancy"
3169 (string-append "use lib '" lib "';\n"))))))
3170 (add-after 'install 'symlink-executable
3171 (lambda* (#:key outputs inputs #:allow-other-keys)
3172 (let ((out (assoc-ref outputs "out"))
3173 (ncurses (assoc-ref inputs "ncurses"))
3174 (perl (assoc-ref inputs "perl")))
3175 (wrap-program (string-append out "/bin/diff-so-fancy")
3176 `("PATH" ":" prefix (,(string-append ncurses "/bin")
3177 ,(string-append perl "/bin"))))))))
3180 ("diff-so-fancy" "bin/"))))
3181 (home-page "https://github.com/so-fancy/diff-so-fancy")
3182 (synopsis "Makes diffs more human friendly and readable")
3184 "@code{diff-so-fancy} strives to make your diffs human readable instead
3185 of machine readable. This helps improve code quality and helps you spot
3187 (license license:expat)))
3189 (define-public go-github-go-git
3191 (name "go-github-go-git")
3196 (url "https://github.com/go-git/go-git")
3197 (commit (string-append "v" version))))
3198 (file-name (git-file-name name version))
3201 "1vkcmhh2qq8c38sjbnzf0wvg2rzr19wssaq177bsvrjwj1xz1qbs"))))
3202 (build-system go-build-system)
3204 `(#:tests? #f ;requires network connection
3205 #:import-path "github.com/go-git/go-git/v5"
3207 (modify-phases %standard-phases
3208 (add-before 'build 'setup
3209 (lambda* (#:key inputs #:allow-other-keys)
3210 (let* ((git (assoc-ref inputs "git"))
3211 (git-bin (string-append (assoc-ref inputs "git") "/bin"))
3212 (git-exe (string-append git-bin "/git")))
3213 (setenv "GIT_DIST_PATH=" git)
3214 (setenv "GIT_EXEC_PATH=" git-bin)
3215 (setenv "HOME" (getcwd))
3216 (invoke git-exe "config" "--global" "user.email" "gha@example.com")
3217 (invoke git-exe "config" "--global" "user.name" "GitHub Actions")
3221 `(("go-github-com-emirpasic-gods" ,go-github-com-emirpasic-gods)
3222 ("go-github-com-go-git-gcfg" ,go-github-com-go-git-gcfg)
3223 ("go-github-com-go-git-go-billy" ,go-github-com-go-git-go-billy)
3224 ("go-github-com-imdario-mergo" ,go-github-com-imdario-mergo)
3225 ("go-github-com-jbenet-go-context" ,go-github-com-jbenet-go-context)
3226 ("go-github-com-kevinburke-ssh-config" ,go-github-com-kevinburke-ssh-config)
3227 ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
3228 ("go-github-com-sergi-go-diff" ,go-github-com-sergi-go-diff)
3229 ("go-github-com-xanzy-ssh-agentf" ,go-github-com-xanzy-ssh-agent)
3230 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
3231 ("go-golang-org-x-net" ,go-golang-org-x-net)
3232 ("go-gopkg-in-warnings" ,go-gopkg-in-warnings)
3233 ("go-github-com-go-git-go-git-fixtures" ,go-github-com-go-git-go-git-fixtures)
3234 ("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)
3235 ("go-github-com-alcortesm-tgz" ,go-github-com-alcortesm-tgz)
3236 ("go-golang-org-x-text" ,go-golang-org-x-text)
3238 (home-page "https://github.com/go-git/")
3239 (synopsis "Git implementation library")
3240 (description "This package provides a Git implementation library.")
3241 (license license:asl2.0)))
3244 (let ((commit "e41b504dca90a25e9be27f296da7ce22e5782893")
3248 (version (git-version "0.12.9" revision commit))
3252 (url "https://github.com/nosarthur/gita")
3254 (file-name (git-file-name name version))
3257 "1k03zgcbhl91cgyh4k7ywyjp00y63q4bqbimncqh5b3lni8l8j5l"))))
3258 (build-system python-build-system)
3260 (list git ;for tests
3263 (list python-pyyaml))
3266 (modify-phases %standard-phases
3268 (lambda* (#:key inputs outputs #:allow-other-keys)
3269 (substitute* "tests/test_main.py"
3270 (("'gita\\\\n'") "'source\\n'")
3271 (("'gita'") "'source'"))
3272 (invoke (search-input-file inputs "/bin/git")
3274 (add-installed-pythonpath inputs outputs)
3275 (invoke (search-input-file inputs "/bin/pytest")
3277 (add-after 'install 'install-shell-completions
3278 (lambda* (#:key outputs #:allow-other-keys)
3279 (let* ((out (assoc-ref outputs "out"))
3280 (bash-completion (string-append out "/etc/bash_completion.d"))
3281 (zsh-completion (string-append out "/etc/zsh/site-functions")))
3282 (mkdir-p bash-completion)
3283 (copy-file ".gita-completion.bash"
3284 (string-append bash-completion "/gita"))
3285 (mkdir-p zsh-completion)
3286 (copy-file ".gita-completion.zsh"
3287 (string-append zsh-completion "/_gita"))))))))
3288 (home-page "https://github.com/nosarthur/gita")
3289 (synopsis "Command-line tool to manage multiple Git repos")
3290 (description "This package provides a command-line tool to manage
3293 This tool does two things:
3295 @item display the status of multiple Git repos such as branch, modification,
3296 commit message side by side
3297 @item (batch) delegate Git commands/aliases from any working directory
3300 If several repos are related, it helps to see their status together.")
3301 (license license:expat))))
3307 (home-page "https://github.com/x-motemen/ghq")
3312 (commit (string-append "v" version))))
3313 (file-name (git-file-name name version))
3316 "155sfmhmh4ia3iinm1s8fk7fxyn5dxdryad9xkbg7mr3i3ikqjwh"))))
3317 (build-system go-build-system)
3319 '(#:install-source? #f
3320 #:import-path "github.com/x-motemen/ghq"
3322 (modify-phases %standard-phases
3323 (add-after 'install 'install-completions
3324 (lambda* (#:key outputs import-path #:allow-other-keys)
3325 (let* ((out (assoc-ref outputs "out"))
3326 (bash-completion (string-append out "/etc/bash_completion.d"))
3327 (zsh-completion (string-append out "/share/zsh/site-functions")))
3328 (with-directory-excursion (string-append "src/" import-path)
3329 (mkdir-p bash-completion)
3330 (copy-file "misc/bash/_ghq"
3331 (string-append bash-completion "/ghq"))
3332 (mkdir-p zsh-completion)
3333 (copy-file "misc/zsh/_ghq"
3334 (string-append zsh-completion "/_ghq"))))
3337 `(("git" ,git-minimal)))
3339 `(("github.com/songmu/gitconfig" ,go-github-com-songmu-gitconfig)
3340 ("github.com/mattn/go-isatty" ,go-github-com-mattn-go-isatty)
3341 ("github.com/motemen/go-colorine" ,go-github-com-motemen-go-colorine)
3342 ("github.com/saracen/walker" ,go-github-com-saracen-walker)
3343 ("github.com/urfave/cli/v2" ,go-github-com-urfave-cli-v2)
3344 ("golang.org/x/net/html" ,go-golang-org-x-net-html)
3345 ("golang.org/x/sync/errgroup" ,go-golang.org-x-sync-errgroup)))
3346 (synopsis "Manage remote repository clones")
3348 "@code{ghq} provides a way to organize remote repository clones, like
3349 @code{go get} does. When you clone a remote repository by @code{ghq get}, ghq
3350 makes a directory under a specific root directory (by default @file{~/ghq})
3351 using the remote repository URL's host and path.")
3352 (license license:expat)))
3354 (define-public tkrev
3362 "mirror://sourceforge/tkcvs/tkrev_" version ".tar.gz"))
3364 (base32 "0bpfbhkngzmwy476mfc69mkd94l0m2wxznrn0qzd81s450yxjw2q"))))
3365 (build-system gnu-build-system)
3368 (modify-phases %standard-phases
3372 (lambda* (#:key outputs #:allow-other-keys)
3373 (let* ((out (assoc-ref outputs "out"))
3374 (bin (string-append out "/bin")))
3375 (invoke "wish" "doinstall.tcl" "-nox" out)
3376 (install-file "contrib/tkdirdiff" bin))))
3377 (add-after 'install 'wrap-programs
3378 (lambda* (#:key outputs #:allow-other-keys)
3381 (wrap-program (string-append (assoc-ref outputs "out")
3383 `("PATH" ":" prefix (,(dirname (which "wish"))))))
3390 (home-page "https://tkcvs.sourceforge.io")
3391 (synopsis "Graphical interface to CVS, Subversion, Git, and RCS")
3393 "TkRev (formerly TkCVS) is a Tcl/Tk-based graphical interface to the CVS,
3394 Subversion and Git configuration management systems. It will also help with
3395 RCS. It shows the status of the files in the current working directory, and
3396 has tools for tagging, merging, checking in/out, and other user operations.
3397 TkDiff is included for browsing and merging your changes.")
3398 (license license:gpl2+)))
3400 (define-public git-filter-repo
3402 (name "git-filter-repo")
3406 ;; Use a release tarball instead of 'git-fetch' because it contains
3407 ;; pre-compiled man-pages which are too hard to build in this context
3408 ;; as it depends on Git's Makefile.
3410 (uri (string-append "https://github.com/newren/git-filter-repo/releases/"
3411 "download/v" version
3412 "/git-filter-repo-" version ".tar.xz"))
3415 "00nn7k9jqrybb762486fmigsnbcn9lbvimgpfvvarz4ikdp9y9pb"))))
3416 (build-system copy-build-system)
3419 '(("git-filter-repo" "libexec/git-core/")
3420 ("Documentation/man1/" "share/man/man1")
3421 ("/" "" #:include ()))))
3422 (inputs (list python)) ;for the shebang
3423 (home-page "https://github.com/newren/git-filter-repo")
3424 (synopsis "Quickly rewrite Git repository history")
3426 "@command{git filter-repo} is a versatile tool for rewriting history,
3427 which roughly falls into the same space of tool like git filter-branch but
3428 with more capabilities. @command{git filter-repo} is now recommended by the
3429 Git project instead of @command{git filter-branch}.")
3430 (license (list license:expat ;; Main license.
3431 license:gpl2)))) ;; For test harness.
3433 (define-public gitlint
3439 ;; the gitlint-core pypi package contains the actual gitlint
3440 ;; code; the gitlint package only pulls in gitlint-core with
3441 ;; stricter dependency versioning
3442 (uri (pypi-uri "gitlint-core" version))
3445 "14cn89biys8r7mwcdgllv371k34km9k1941ylxf53a7sxwrzsbbp"))))
3446 (build-system python-build-system)
3450 #~(modify-phases %standard-phases
3451 (add-before 'build 'loosen-requirements
3452 (lambda* (#:key inputs #:allow-other-keys)
3453 (substitute* "gitlint/shell.py"
3454 (("'git'") (string-append
3456 (search-input-file inputs "bin/git")
3458 ;; force using subprocess instead of sh so git does not need
3459 ;; to be a propagated input
3460 (("if USE_SH_LIB") "if False")))))))
3462 (list git python-arrow python-click python-sh))
3463 (home-page "https://jorisroovers.com/gitlint/")
3464 (synopsis "Linting Git commit messages")
3466 "Gitlint is a Git commit message linter written in Python: it checks your
3467 commit messages for style.")
3468 (license license:expat)))
3478 (url "https://git.sr.ht/~emersion/hut")
3479 (commit (string-append "v" version))))
3480 (file-name (git-file-name name version))
3482 (base32 "0ybngrwwmkm00dlkdhvkfcvcjhp5xzs8fh90zqr0h12ssqx9pll3"))))
3483 (build-system go-build-system)
3486 #:import-path "git.sr.ht/~emersion/hut"
3488 #~(modify-phases %standard-phases
3490 (lambda* (#:key import-path #:allow-other-keys)
3491 (with-directory-excursion (string-append "src/" import-path)
3492 ;; The flags are copied from (guix build go-build-system).
3493 (setenv "CGO_LDFLAGS" "-s -w")
3494 (invoke "make" "all" "GOFLAGS=-v -x"))))
3496 (lambda* (#:key import-path #:allow-other-keys)
3497 (with-directory-excursion (string-append "src/" import-path)
3498 (invoke "make" "install"
3499 (string-append "PREFIX=" #$output))))))))
3503 (list go-git-sr-ht-emersion-go-scfg
3504 go-git-sr-ht-emersion-gqlclient
3505 go-github-com-juju-ansiterm
3506 go-github-com-spf13-cobra
3507 go-golang-org-x-oauth2
3508 go-golang-org-x-term))
3509 (home-page "https://git.sr.ht/~emersion/hut")
3510 (synopsis "CLI tool for sr.ht")
3511 (description "@command{hut} is a CLI tool for
3512 @uref{https://sr.ht/~sircmpwn/sourcehut/, sr.ht}. It helps you interact with
3513 sr.ht's public services:
3516 submit and manage build jobs
3518 create, and manage git repositories and artifacts
3520 list Mercurial repositories
3522 manage mailing lists and patches
3524 manage PGP, and SSH keys
3526 publish and manage hosted websites
3528 create and manage pastes
3530 create and manage trackers, tickets
3532 interact with GraphQL APIs directly
3534 (license license:agpl3)))