gnu: git: Update to 2.30.0.
[jackhill/guix/guix.git] / gnu / packages / version-control.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
6 ;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
7 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
8 ;;; Copyright © 2014, 2016, 2019 Eric Bavier <bavier@member.fsf.org>
9 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
10 ;;; Copyright © 2015, 2018, 2020 Kyle Meyer <kyle@kyleam.com>
11 ;;; Copyright © 2015, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
13 ;;; Copyright © 2016, 2017, 2018 Nikita <nikita@n0.is>
14 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
15 ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
16 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
17 ;;; Copyright © 2017, 2020 EuAndreh <eu@euandre.org>
18 ;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
20 ;;; Copyright © 2017, 2020 Oleg Pykhalov <go.wigust@gmail.com>
21 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
22 ;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
23 ;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com>
24 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
25 ;;; Copyright © 2019 Jovany Leandro G.C <bit4bit@riseup.net>
26 ;;; Copyright © 2019 Kei Kebreau <kkebreau@posteo.net>
27 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
28 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
29 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
30 ;;; Copyright © 2020 John D. Boy <jboy@bius.moe>
31 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
32 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
33 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
34 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
35 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
36 ;;;
37 ;;; This file is part of GNU Guix.
38 ;;;
39 ;;; GNU Guix is free software; you can redistribute it and/or modify it
40 ;;; under the terms of the GNU General Public License as published by
41 ;;; the Free Software Foundation; either version 3 of the License, or (at
42 ;;; your option) any later version.
43 ;;;
44 ;;; GNU Guix is distributed in the hope that it will be useful, but
45 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47 ;;; GNU General Public License for more details.
48 ;;;
49 ;;; You should have received a copy of the GNU General Public License
50 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51
52 (define-module (gnu packages version-control)
53 #:use-module ((guix licenses) #:prefix license:)
54 #:use-module (guix utils)
55 #:use-module (guix packages)
56 #:use-module (guix download)
57 #:use-module (guix git-download)
58 #:use-module (guix hg-download)
59 #:use-module (guix build-system cmake)
60 #:use-module (guix build-system copy)
61 #:use-module (guix build-system gnu)
62 #:use-module (guix build-system go)
63 #:use-module (guix build-system perl)
64 #:use-module (guix build-system python)
65 #:use-module (guix build-system trivial)
66 #:use-module (gnu packages apr)
67 #:use-module (gnu packages autotools)
68 #:use-module (gnu packages documentation)
69 #:use-module (gnu packages base)
70 #:use-module (gnu packages bash)
71 #:use-module (gnu packages bison)
72 #:use-module (gnu packages boost)
73 #:use-module (gnu packages check)
74 #:use-module (gnu packages cook)
75 #:use-module (gnu packages curl)
76 #:use-module (gnu packages docbook)
77 #:use-module (gnu packages ed)
78 #:use-module (gnu packages file)
79 #:use-module (gnu packages flex)
80 #:use-module (gnu packages freedesktop)
81 #:use-module (gnu packages gettext)
82 #:use-module (gnu packages gl)
83 #:use-module (gnu packages golang)
84 #:use-module (gnu packages groff)
85 #:use-module (gnu packages guile)
86 #:use-module (gnu packages image)
87 #:use-module (gnu packages linux)
88 #:use-module (gnu packages mail)
89 #:use-module (gnu packages maths)
90 #:use-module (gnu packages nano)
91 #:use-module (gnu packages ncurses)
92 #:use-module (gnu packages ssh)
93 #:use-module (gnu packages web)
94 #:use-module (gnu packages openstack)
95 #:use-module (gnu packages pcre)
96 #:use-module (gnu packages perl)
97 #:use-module (gnu packages perl-check)
98 #:use-module (gnu packages pkg-config)
99 #:use-module (gnu packages python)
100 #:use-module (gnu packages python-check)
101 #:use-module (gnu packages python-web)
102 #:use-module (gnu packages python-xyz)
103 #:use-module (gnu packages readline)
104 #:use-module (gnu packages rsync)
105 #:use-module (gnu packages sqlite)
106 #:use-module (gnu packages admin)
107 #:use-module (gnu packages xml)
108 #:use-module (gnu packages emacs)
109 #:use-module (gnu packages compression)
110 #:use-module (gnu packages sdl)
111 #:use-module (gnu packages swig)
112 #:use-module (gnu packages sync)
113 #:use-module (gnu packages tcl)
114 #:use-module (gnu packages textutils)
115 #:use-module (gnu packages time)
116 #:use-module (gnu packages tls)
117 #:use-module (gnu packages)
118 #:use-module (ice-9 match)
119 #:use-module (srfi srfi-1))
120
121 (define-public bazaar
122 (package
123 (name "bazaar")
124 (version "2.7.0")
125 (source
126 (origin
127 (method url-fetch)
128 (uri (string-append "https://launchpad.net/bzr/"
129 (version-major+minor version) "/" version
130 "/+download/bzr-" version ".tar.gz"))
131 (patches (search-patches "bazaar-CVE-2017-14176.patch"))
132 (sha256
133 (base32
134 "1cysix5k3wa6y7jjck3ckq3abls4gvz570s0v0hxv805nwki4i8d"))))
135 (build-system python-build-system)
136 (inputs
137 ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh'
138 ;; require Zsh.
139 `(("gettext" ,gettext-minimal)))
140 (arguments
141 `(#:tests? #f ; no test target
142 #:python ,python-2 ; Python 3 apparently not yet supported, see
143 ; https://answers.launchpad.net/bzr/+question/229048
144 #:phases
145 (modify-phases %standard-phases
146 (add-after 'unpack 'fix-mandir
147 (lambda _
148 (substitute* "setup.py"
149 (("man/man1") "share/man/man1"))
150 #t)))))
151 (home-page "https://gnu.org/software/bazaar")
152 (synopsis "Version control system supporting both distributed and centralized workflows")
153 (description
154 "GNU Bazaar is a version control system that allows you to record
155 changes to project files over time. It supports both a distributed workflow
156 as well as the classic centralized workflow.")
157 (license license:gpl2+)))
158
159 (define git-cross-configure-flags
160 '("ac_cv_fread_reads_directories=yes"
161 "ac_cv_snprintf_returns_bogus=no"
162 "ac_cv_iconv_omits_bom=no"))
163
164 (define-public git
165 (package
166 (name "git")
167 (version "2.30.0")
168 (source (origin
169 (method url-fetch)
170 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
171 version ".tar.xz"))
172 (sha256
173 (base32
174 "06ad6dylgla34k9am7d5z8y3rryc8ln3ibq5z0d74rcm20hm0wsm"))))
175 (build-system gnu-build-system)
176 (native-inputs
177 `(("native-perl" ,perl)
178 ;; Add bash-minimal explicitly to ensure it comes before bash-for-tests,
179 ;; see <https://bugs.gnu.org/39513>.
180 ("bash" ,bash-minimal)
181 ("bash-for-tests" ,bash)
182 ("gettext" ,gettext-minimal)
183 ("git-manpages"
184 ,(origin
185 (method url-fetch)
186 (uri (string-append
187 "mirror://kernel.org/software/scm/git/git-manpages-"
188 version ".tar.xz"))
189 (sha256
190 (base32
191 "0xngjg60rwzrb9x32d1qbdd8szkzwcyha5qni7ilkldxsl2q8avv"))))
192 ;; For subtree documentation.
193 ("asciidoc" ,asciidoc-py3)
194 ("docbook-xsl" ,docbook-xsl)
195 ("xmlto" ,xmlto)))
196 (inputs
197 `(("curl" ,curl)
198 ("expat" ,expat)
199 ("openssl" ,openssl)
200 ("perl" ,perl)
201 ("python" ,python) ; for git-p4
202 ("zlib" ,zlib)
203
204 ;; For PCRE support in git grep (USE_LIBPCRE2).
205 ("pcre" ,pcre2)
206
207 ;; For 'gitweb.cgi'.
208 ("perl-cgi" ,perl-cgi)
209
210 ;; For 'git-svn'.
211 ("subversion" ,subversion)
212 ("perl-term-readkey" ,perl-term-readkey)
213
214 ;; For 'git-send-email'.
215 ("perl-authen-sasl" ,perl-authen-sasl)
216 ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
217 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
218
219 ;; For 'git gui', 'gitk', and 'git citool'.
220 ("tcl" ,tcl)
221 ("tk" ,tk)))
222 (outputs '("out" ; the core
223 "send-email" ; for git-send-email
224 "svn" ; git-svn
225 "credential-netrc" ; git-credential-netrc
226 "subtree" ; git-subtree
227 "gui")) ; gitk, git gui
228 (arguments
229 `(#:make-flags `("V=1" ;more verbose compilation
230
231 ,(string-append "SHELL_PATH="
232 (assoc-ref %build-inputs "bash")
233 "/bin/sh")
234
235 ;; Tests require a bash with completion support.
236 ,(string-append "TEST_SHELL_PATH="
237 (assoc-ref %build-inputs "bash-for-tests")
238 "/bin/bash")
239
240 "USE_LIBPCRE2=yes"
241
242 ;; By default 'make install' creates hard links for
243 ;; things in 'libexec/git-core', which leads to huge
244 ;; nars; see <https://bugs.gnu.org/21949>.
245 "NO_INSTALL_HARDLINKS=indeed")
246
247 ;; Make sure the full bash does not end up in the final closure.
248 #:disallowed-references (,bash)
249
250 #:test-target "test"
251
252 ;; The explicit --with-tcltk forces the build system to hardcode the
253 ;; absolute file name to 'wish'.
254 #:configure-flags (list (string-append "--with-tcltk="
255 (assoc-ref %build-inputs "tk")
256 "/bin/wish8.6") ; XXX
257 ,@(if (%current-target-system)
258 git-cross-configure-flags
259 '()))
260
261 #:modules ((srfi srfi-1)
262 (srfi srfi-26)
263 ,@%gnu-build-system-modules)
264 #:phases
265 (modify-phases %standard-phases
266 ,@(if (%current-target-system)
267 ;; The git build system assumes build == host
268 `((add-after 'unpack 'use-host-uname_S
269 (lambda _
270 (substitute* "config.mak.uname"
271 (("uname_S := .*" all)
272 (if (equal? ,(%current-target-system) "i586-pc-gnu")
273 "uname_S := GNU\n"
274 all)))
275 #t)))
276 ;; We do not have bash-for-tests when cross-compiling.
277 `((add-after 'unpack 'modify-PATH
278 (lambda* (#:key inputs #:allow-other-keys)
279 (let ((path (string-split (getenv "PATH") #\:))
280 (bash-full (assoc-ref inputs "bash-for-tests")))
281 ;; Drop the test bash from PATH so that (which "sh") and
282 ;; similar does the right thing.
283 (setenv "PATH" (string-join
284 (remove (cut string-prefix? bash-full <>) path)
285 ":"))
286 #t)))))
287 ;; Add cross curl-config script to PATH when cross-compiling.
288 ,@(if (%current-target-system)
289 '((add-before 'configure 'add-cross-curl-config
290 (lambda* (#:key inputs #:allow-other-keys)
291 (setenv "PATH"
292 (string-append (assoc-ref inputs "curl") "/bin:"
293 (getenv "PATH")))
294 #t)))
295 '())
296 (add-after 'configure 'patch-makefiles
297 (lambda _
298 (substitute* "Makefile"
299 (("/usr/bin/perl") (which "perl"))
300 (("/usr/bin/python") (which "python3")))
301 #t))
302 (add-after 'configure 'add-PM.stamp
303 (lambda _
304 ;; Add the "PM.stamp" to avoid "no rule to make target".
305 (call-with-output-file "perl/PM.stamp" (const #t))
306 #t))
307 (add-after 'build 'build-subtree
308 (lambda* (#:key inputs #:allow-other-keys)
309 (with-directory-excursion "contrib/subtree"
310 (substitute* "Makefile"
311 ;; Apparently `xmlto' does not bother to looks up the stylesheets
312 ;; specified in the XML, unlike the above substitution. Instead it
313 ;; uses a hard-coded URL. Work around it here, but if this is
314 ;; common perhaps we should hardcode this path in xmlto itself.
315 (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
316 (string-append "$(XMLTO) -x "
317 (string-append (assoc-ref inputs "docbook-xsl")
318 "/xml/xsl/docbook-xsl-"
319 ,(package-version docbook-xsl))
320 "/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
321 (invoke "make")
322 (invoke "make" "install")
323 (invoke "make" "install-doc")
324 (substitute* "git-subtree"
325 (("/bin/sh") (which "sh"))))
326 #t))
327 (add-before 'check 'patch-tests
328 (lambda _
329 (let ((store-directory (%store-directory)))
330 ;; These files contain some funny bytes that Guile is unable
331 ;; to decode for shebang patching. Just delete them.
332 (for-each delete-file '("t/t4201-shortlog.sh"
333 "t/t7813-grep-icase-iso.sh"))
334 ;; Many tests contain inline shell scripts (hooks etc).
335 (substitute* (find-files "t" "\\.sh$")
336 (("#!/bin/sh") (string-append "#!" (which "sh"))))
337 ;; Un-do shebang patching here to prevent checksum mismatch.
338 (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
339 (("^#!.*/bin/perl") "#!/usr/bin/perl"))
340 (substitute* "t/t5003-archive-zip.sh"
341 (("cp /bin/sh") (string-append "cp " (which "sh"))))
342 (substitute* "t/t6030-bisect-porcelain.sh"
343 (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
344 ;; FIXME: This test runs `git commit` with a bogus EDITOR
345 ;; and empty commit message, but does not fail the way it's
346 ;; expected to. The test passes when invoked interactively.
347 (substitute* "t/t7508-status.sh"
348 (("\tcommit_template_commented") "\ttrue"))
349 ;; More checksum mismatches due to odd shebangs.
350 (substitute* "t/t9100-git-svn-basic.sh"
351 (((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") )
352 (substitute* "t/t9300-fast-import.sh"
353 (((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh")
354 (((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh"))
355 ;; FIXME: Some hooks fail with "basename: command not found".
356 ;; See 't/trash directory.t9164.../svn-hook.log'.
357 (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
358
359 ;; XXX: These tests fail intermittently for unknown reasons:
360 ;; <https://bugs.gnu.org/29546>.
361 (for-each delete-file
362 '("t/t9128-git-svn-cmd-branch.sh"
363 "t/t9167-git-svn-cmd-branch-subproject.sh"
364 "t/t9141-git-svn-multiple-branches.sh"))
365 #t)))
366 (add-after 'install 'install-shell-completion
367 (lambda* (#:key outputs #:allow-other-keys)
368 (let* ((out (assoc-ref outputs "out"))
369 (completions (string-append out "/etc/bash_completion.d")))
370 ;; TODO: Install the tcsh and zsh completions in the right place.
371 (mkdir-p completions)
372 (copy-file "contrib/completion/git-completion.bash"
373 (string-append completions "/git"))
374 #t)))
375 (add-after 'install 'install-credential-netrc
376 (lambda* (#:key outputs #:allow-other-keys)
377 (let* ((netrc (assoc-ref outputs "credential-netrc")))
378 (install-file "contrib/credential/netrc/git-credential-netrc.perl"
379 (string-append netrc "/bin"))
380 (rename-file (string-append netrc "/bin/git-credential-netrc.perl")
381 (string-append netrc "/bin/git-credential-netrc"))
382 ;; Previously, Git.pm was automatically found by netrc.
383 ;; Perl 5.26 changed how it locates modules so that @INC no
384 ;; longer includes the current working directory (the Perl
385 ;; community calls this "dotless @INC").
386 (wrap-program (string-append netrc "/bin/git-credential-netrc")
387 `("PERL5LIB" ":" prefix
388 (,(string-append (assoc-ref outputs "out") "/share/perl5"))))
389 #t)))
390 (add-after 'install 'install-subtree
391 (lambda* (#:key outputs #:allow-other-keys)
392 (let ((subtree (assoc-ref outputs "subtree")))
393 (install-file "contrib/subtree/git-subtree"
394 (string-append subtree "/bin"))
395 (install-file "contrib/subtree/git-subtree.1"
396 (string-append subtree "/share/man/man1"))
397 #t)))
398 (add-after 'install 'restore-sample-hooks-shebang
399 (lambda* (#:key outputs #:allow-other-keys)
400 (let* ((out (assoc-ref outputs "out"))
401 (dir (string-append out "/share/git-core/templates/hooks")))
402 (for-each (lambda (file)
403 (format #t "restoring shebang on `~a'~%" file)
404 (substitute* file
405 (("^#!.*/bin/sh") "#!/bin/sh")))
406 (find-files dir ".*"))
407 #t)))
408 (add-after 'install 'split
409 (lambda* (#:key inputs outputs #:allow-other-keys)
410 ;; Split the binaries to the various outputs.
411 (let* ((out (assoc-ref outputs "out"))
412 (se (assoc-ref outputs "send-email"))
413 (svn (assoc-ref outputs "svn"))
414 (gui (assoc-ref outputs "gui"))
415 (gitk (string-append out "/bin/gitk"))
416 (gitk* (string-append gui "/bin/gitk"))
417 (git-gui (string-append out "/libexec/git-core/git-gui"))
418 (git-gui* (string-append gui "/libexec/git-core/git-gui"))
419 (git-cit (string-append out "/libexec/git-core/git-citool"))
420 (git-cit* (string-append gui "/libexec/git-core/git-citool"))
421 (git-se (string-append out "/libexec/git-core/git-send-email"))
422 (git-se* (string-append se "/libexec/git-core/git-send-email"))
423 (git-svn (string-append out "/libexec/git-core/git-svn"))
424 (git-svn* (string-append svn "/libexec/git-core/git-svn"))
425 (git-sm (string-append out
426 "/libexec/git-core/git-submodule")))
427 (mkdir-p (string-append gui "/bin"))
428 (mkdir-p (string-append gui "/libexec/git-core"))
429 (mkdir-p (string-append se "/libexec/git-core"))
430 (mkdir-p (string-append svn "/libexec/git-core"))
431
432 (for-each (lambda (old new)
433 (copy-file old new)
434 (delete-file old)
435 (chmod new #o555))
436 (list gitk git-gui git-cit git-se git-svn)
437 (list gitk* git-gui* git-cit* git-se* git-svn*))
438
439 ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
440 (wrap-program git-svn*
441 `("PATH" ":" prefix
442 (,(string-append (assoc-ref inputs "subversion")
443 "/bin")))
444 `("PERL5LIB" ":" prefix
445 ,(map (lambda (i) (string-append (assoc-ref inputs i)
446 "/lib/perl5/site_perl"))
447 '("subversion" "perl-term-readkey")))
448
449 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
450 ;; help it find 'libsvn_client-1.so'.
451 `("LD_LIBRARY_PATH" ":" prefix
452 (,(string-append (assoc-ref inputs "subversion")
453 "/lib"))))
454
455 ;; Tell 'git-send-email' where perl modules are.
456 (wrap-program git-se*
457 `("PERL5LIB" ":" prefix
458 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
459 (list
460 ,@(transitive-input-references
461 'inputs
462 (map (lambda (l)
463 (assoc l (package-inputs this-package)))
464 '("perl-authen-sasl"
465 "perl-net-smtp-ssl"
466 "perl-io-socket-ssl")))))))
467
468 ;; Tell 'gitweb.cgi' where perl modules are.
469 (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
470 `("PERL5LIB" ":" prefix
471 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
472 (list
473 ,@(transitive-input-references
474 'inputs
475 (map (lambda (l)
476 (assoc l (package-inputs this-package)))
477 '("perl-cgi")))))))
478
479 ;; Tell 'git-submodule' where Perl is.
480 (wrap-program git-sm
481 `("PATH" ":" prefix
482 (,(string-append (assoc-ref inputs "perl")
483 "/bin"))))
484
485 #t)))
486 (add-after 'split 'install-man-pages
487 (lambda* (#:key inputs outputs #:allow-other-keys)
488 (let* ((out (assoc-ref outputs "out"))
489 (man (string-append out "/share/man"))
490 (manpages (assoc-ref inputs "git-manpages")))
491 (mkdir-p man)
492 (with-directory-excursion man
493 (invoke "tar" "xvf" manpages))))))))
494
495 (native-search-paths
496 ;; For HTTPS access, Git needs a single-file certificate bundle, specified
497 ;; with $GIT_SSL_CAINFO.
498 (list (search-path-specification
499 (variable "GIT_SSL_CAINFO")
500 (file-type 'regular)
501 (separator #f) ;single entry
502 (files '("etc/ssl/certs/ca-certificates.crt")))
503 (search-path-specification
504 (variable "GIT_EXEC_PATH")
505 (separator #f) ;single entry
506 (files '("libexec/git-core")))))
507
508 (synopsis "Distributed version control system")
509 (description
510 "Git is a free distributed version control system designed to handle
511 everything from small to very large projects with speed and efficiency.")
512 (license license:gpl2)
513 (home-page "https://git-scm.com/")))
514
515 (define-public git-minimal
516 ;; The size of the closure of 'git-minimal' is two thirds that of 'git'.
517 ;; Its test suite runs slightly faster and most importantly it doesn't
518 ;; depend on packages that are expensive to build such as Subversion.
519 (package
520 (inherit git)
521 (name "git-minimal")
522 (arguments
523 (substitute-keyword-arguments (package-arguments git)
524 ((#:phases phases)
525 `(modify-phases ,phases
526 (replace 'patch-makefiles
527 (lambda _
528 (substitute* "Makefile"
529 (("/usr/bin/perl") (which "perl")))
530 #t))
531 (delete 'build-subtree)
532 (delete 'split)
533 (delete 'install-man-pages)
534 (delete 'install-subtree)
535 (delete 'install-credential-netrc)
536 (add-after 'install 'remove-unusable-perl-commands
537 (lambda* (#:key outputs #:allow-other-keys)
538 (let* ((out (assoc-ref outputs "out"))
539 (bin (string-append out "/bin"))
540 (libexec (string-append out "/libexec")))
541 (for-each (lambda (file)
542 (delete-file (string-append libexec
543 "/git-core/" file)))
544 '("git-svn" "git-cvsimport" "git-archimport"
545 "git-cvsserver" "git-request-pull"
546 "git-add--interactive" "git-cvsexportcommit"
547 "git-instaweb" "git-send-email"))
548 (delete-file (string-append bin "/git-cvsserver"))
549
550 ;; These templates typically depend on Perl. Remove them.
551 (delete-file-recursively
552 (string-append out "/share/git-core/templates/hooks"))
553
554 ;; Gitweb depends on Perl as well.
555 (delete-file-recursively
556 (string-append out "/share/gitweb"))
557 #t)))))
558 ((#:make-flags flags)
559 `(delete "USE_LIBPCRE2=yes" ,flags))
560 ((#:configure-flags flags)
561 `(list
562 ,@(if (%current-target-system)
563 git-cross-configure-flags
564 '())))
565 ((#:disallowed-references lst '())
566 `(,perl ,@lst))))
567 (outputs '("out"))
568 (native-inputs
569 `(("bash" ,bash-minimal)
570 ("bash-for-tests" ,bash)
571 ("native-perl" ,perl)
572 ("gettext" ,gettext-minimal)))
573 (inputs
574 `(("curl" ,curl) ;for HTTP(S) access
575 ("expat" ,expat) ;for 'git push' over HTTP(S)
576 ("openssl" ,openssl)
577 ("perl" ,perl)
578 ("zlib" ,zlib)))))
579
580 (define-public gitless
581 (package
582 (name "gitless")
583 (version "0.8.8")
584 (source
585 (origin
586 ;; The PyPI package lacks a test suite. Build directly from git.
587 (method git-fetch)
588 (uri (git-reference
589 (url "https://github.com/gitless-vcs/gitless")
590 (commit (string-append "v" version))))
591 (sha256
592 (base32 "048kl27zjr68hgs70g3l98ci9765wxva6azzrhcdys7nsdd493n6"))
593 (file-name (git-file-name name version))))
594 (build-system python-build-system)
595 (arguments
596 `(#:phases
597 (modify-phases %standard-phases
598 (add-before 'build 'loosen-requirements
599 (lambda _
600 (substitute* "setup.py"
601 ;; Using Guix's python-pygit2 1.1.0 appears to work fine…
602 (("pygit2==") "pygit2>="))
603 #t))
604 (add-before 'check 'prepare-for-tests
605 (lambda _
606 ;; Find the 'gl' command.
607 (rename-file "gl.py" "gl")
608 (setenv "PATH" (string-append (getcwd) ":" (getenv "PATH")))
609
610 ;; The tests try to run git as if it were already set up.
611 (setenv "HOME" (getcwd))
612 (invoke "git" "config" "--global" "user.email" "git@example.com")
613 (invoke "git" "config" "--global" "user.name" "Guix")))
614 (replace 'wrap
615 (lambda* (#:key inputs outputs #:allow-other-keys)
616 (let ((out (assoc-ref outputs "out"))
617 (git (assoc-ref inputs "git")))
618 (wrap-program (string-append out "/bin/gl")
619 `("PATH" ":" prefix (,(string-append git "/bin")))
620 `("PYTHONPATH" ":" =
621 (,(string-append out "/lib/python"
622 ,(version-major+minor
623 (package-version python))
624 "/site-packages:")
625 ,(getenv "PYTHONPATH"))))
626 #t))))))
627 (native-inputs
628 `(("git-for-tests" ,git-minimal)))
629 (inputs
630 `(("git" ,git-minimal)
631 ("python-clint" ,python-clint)
632 ("python-pygit2" ,python-pygit2)
633 ("python-sh" ,python-sh)))
634 (home-page "https://gitless.com")
635 (synopsis "Simple version control system built on top of Git")
636 (description
637 "Gitless is a Git-compatible version control system that aims to be easy to
638 learn and use. It simplifies the common workflow by committing changes to
639 tracked files by default and saving any uncommitted changes as part of a branch.
640
641 The friendly @command{gl} command-line interface gives feedback and helps you
642 figure out what to do next.
643
644 Gitless is implemented on top of Git and its commits and repositories are
645 indistinguishable from Git's. You (or other contributors) can always fall back
646 on @command{git}, and use any regular Git hosting service.")
647 (license license:expat)))
648
649 (define-public git-cal
650 (package
651 (name "git-cal")
652 (version "0.9.1")
653 (source (origin
654 (method git-fetch)
655 (uri (git-reference
656 (url "https://github.com/k4rthik/git-cal")
657 (commit (string-append "v" version))))
658 (file-name (git-file-name name version))
659 (sha256
660 (base32
661 "08s9sif3qlk5n2dqpzq5yjczggnqlnxldljspjdqgpfydb2dqg3z"))))
662 (build-system perl-build-system)
663 (home-page "https://github.com/k4rthik/git-cal/")
664 (synopsis "GitHub like contributions calendar for terminal")
665 (description "@code{git-cal} is a script to view commits calendar similar
666 to GitHub contributions calendar.")
667 (license license:expat)))
668
669 (define-public libgit2
670 (package
671 (name "libgit2")
672 (version "1.1.0")
673 (source (origin
674 (method url-fetch)
675 (uri (string-append "https://github.com/libgit2/libgit2/"
676 "releases/download/v" version
677 "/libgit2-" version ".tar.gz"))
678 (sha256
679 (base32
680 "1fjdglkh04qv3b4alg621pxa689i0wlf8m7nf2755zawjr2zhwxd"))
681 (patches (search-patches "libgit2-mtime-0.patch"))
682 (snippet '(begin
683 (delete-file-recursively "deps") #t))
684 (modules '((guix build utils)))))
685 (build-system cmake-build-system)
686 (outputs '("out" "debug"))
687 (arguments
688 `(#:configure-flags
689 (list "-DUSE_NTLMCLIENT=OFF" ;TODO: package this
690 "-DREGEX_BACKEND=pcre2"
691 "-DUSE_HTTP_PARSER=system"
692 ,@(if (%current-target-system)
693 `((string-append
694 "-DPKG_CONFIG_EXECUTABLE="
695 (assoc-ref %build-inputs "pkg-config")
696 "/bin/" ,(%current-target-system) "-pkg-config"))
697 '()))
698 #:phases
699 (modify-phases %standard-phases
700 (add-after 'unpack 'fix-hardcoded-paths
701 (lambda _
702 (substitute* "tests/repo/init.c"
703 (("#!/bin/sh") (string-append "#!" (which "sh"))))
704 (substitute* "tests/clar/fs.h"
705 (("/bin/cp") (which "cp"))
706 (("/bin/rm") (which "rm")))
707 #t))
708 ;; Run checks more verbosely, unless we are cross-compiling.
709 (replace 'check
710 (lambda* (#:key (tests? #t) #:allow-other-keys)
711 (if tests?
712 (invoke "./libgit2_clar" "-v" "-Q")
713 ;; Tests may be disabled if cross-compiling.
714 (format #t "Test suite not run.~%")))))))
715 (inputs
716 `(("libssh2" ,libssh2)
717 ("http-parser" ,http-parser)))
718 (native-inputs
719 `(("pkg-config" ,pkg-config)
720 ("python" ,python)))
721 (propagated-inputs
722 ;; These libraries are in 'Requires.private' in libgit2.pc.
723 `(("openssl" ,openssl)
724 ("pcre2" ,pcre2)
725 ("zlib" ,zlib)))
726 (home-page "https://libgit2.org/")
727 (synopsis "Library providing Git core methods")
728 (description
729 "Libgit2 is a portable, pure C implementation of the Git core methods
730 provided as a re-entrant linkable library with a solid API, allowing you to
731 write native speed custom Git applications in any language with bindings.")
732 ;; GPLv2 with linking exception
733 (license license:gpl2)))
734
735 (define-public libgit2-0.28
736 (package
737 (inherit libgit2)
738 (version "0.28.5")
739 (source
740 (origin
741 (method url-fetch)
742 (uri (string-append "https://github.com/libgit2/libgit2/releases/"
743 "download/v" version
744 "/libgit2-" version ".tar.gz"))
745 (sha256
746 (base32
747 "0hjgpqjjmkciw1i8jqkx9q2vhdc4fc99qajhrj2bq8ziwsp6hyrb"))
748 (patches (search-patches "libgit2-mtime-0.patch"))
749 (modules '((guix build utils)))
750 (snippet '(begin
751 (delete-file-recursively "deps") #t))))))
752
753 (define-public git-crypt
754 (package
755 (name "git-crypt")
756 (version "0.6.0")
757 (source
758 (origin
759 (method git-fetch)
760 (uri (git-reference
761 (url "https://github.com/AGWA/git-crypt")
762 (commit version)))
763 (file-name (git-file-name name version))
764 (sha256
765 (base32 "1ba5s0fvmd9hhnfhfsjrm40v0qpxfnwc8vmm55m0k4dryzkzx66q"))))
766 (build-system gnu-build-system)
767 (inputs
768 `(("git" ,git)
769 ("openssl" ,openssl)))
770 (native-inputs
771 `(("docbook-xsl" ,docbook-xsl)
772 ("libxslt" ,libxslt)))
773 (arguments
774 `(#:tests? #f ; No tests.
775 #:phases
776 (modify-phases %standard-phases
777 (delete 'configure)
778 (add-after 'unpack 'patch-makefile
779 (lambda* (#:key inputs #:allow-other-keys)
780 (substitute* "Makefile"
781 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
782 (string-append (assoc-ref inputs "docbook-xsl")
783 "/xml/xsl/docbook-xsl-"
784 ,(package-version docbook-xsl)
785 "/manpages/docbook.xsl")))
786 #t))
787 (replace 'build
788 (lambda _
789 (invoke "make" "ENABLE_MAN=yes")))
790 (replace 'install
791 (lambda* (#:key outputs #:allow-other-keys)
792 (let ((out (assoc-ref outputs "out")))
793 (invoke "make" "install"
794 "ENABLE_MAN=yes"
795 (string-append "PREFIX=" out))))))))
796 (home-page "https://www.agwa.name/projects/git-crypt/")
797 (synopsis "Transparent encryption of files in a git repository")
798 (description "git-crypt enables transparent encryption and decryption of
799 files in a git repository. Files which you choose to protect are encrypted when
800 committed, and decrypted when checked out. git-crypt lets you freely share a
801 repository containing a mix of public and private content. git-crypt gracefully
802 degrades, so developers without the secret key can still clone and commit to a
803 repository with encrypted files. This lets you store your secret material (such
804 as keys or passwords) in the same repository as your code, without requiring you
805 to lock down your entire repository.")
806 (license license:gpl3+)))
807
808 (define-public git-remote-gcrypt
809 (package
810 (name "git-remote-gcrypt")
811 (version "1.3")
812 (source (origin
813 (method git-fetch)
814 (uri (git-reference
815 (url "https://git.spwhitton.name/git-remote-gcrypt")
816 (commit version)))
817 (file-name (string-append name "-" version "-checkout"))
818 (sha256
819 (base32
820 "0n8fzvr6y0pxrbvkywlky2bd8jvi0ayp4n9hwi84l1ldmv4a40dh"))))
821 (build-system trivial-build-system)
822 (arguments
823 `(#:modules ((guix build utils))
824 #:builder (begin
825 (use-modules (guix build utils))
826 (let* ((source (assoc-ref %build-inputs "source"))
827 (output (assoc-ref %outputs "out"))
828 (bindir (string-append output "/bin")))
829 (install-file (string-append source "/git-remote-gcrypt")
830 bindir)
831 #t))))
832 (home-page "https://spwhitton.name/tech/code/git-remote-gcrypt/")
833 (synopsis "Whole remote repository encryption")
834 (description "git-remote-gcrypt is a Git remote helper to push and pull from
835 repositories encrypted with GnuPG. It works with the standard Git transports,
836 including repository hosting services like GitLab.
837
838 Remote helper programs are invoked by Git to handle network transport. This
839 helper handles @code{gcrypt:} URLs that access a remote repository encrypted
840 with GPG, using our custom format.
841
842 Supported locations are local, @code{rsync://} and @code{sftp://}, where the
843 repository is stored as a set of files, or instead any Git URL where gcrypt
844 will store the same representation in a Git repository, bridged over arbitrary
845 Git transport.
846
847 The aim is to provide confidential, authenticated Git storage and
848 collaboration using typical untrusted file hosts or services.")
849 (license license:gpl3+)))
850
851 (define-public cgit
852 (package
853 (name "cgit")
854 ;; Update the ‘git-source’ input as well.
855 (version "1.2.3")
856 (source (origin
857 (method url-fetch)
858 (uri (string-append
859 "https://git.zx2c4.com/cgit/snapshot/cgit-"
860 version ".tar.xz"))
861 (sha256
862 (base32
863 "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss"))))
864 (build-system gnu-build-system)
865 (arguments
866 '(#:tests? #f ; XXX: fail to build the in-source git.
867 #:test-target "test"
868 #:make-flags '("CC=gcc" "SHELL_PATH=sh")
869 #:phases
870 (modify-phases %standard-phases
871 (add-after 'unpack 'unpack-git
872 (lambda* (#:key inputs #:allow-other-keys)
873 ;; Unpack the source of git into the 'git' directory.
874 (invoke "tar" "--strip-components=1" "-C" "git" "-xf"
875 (assoc-ref inputs "git-source"))))
876 (add-after 'unpack 'patch-absolute-file-names
877 (lambda* (#:key inputs #:allow-other-keys)
878 (define (quoted-file-name input path)
879 (string-append "\"" input path "\""))
880 (substitute* "ui-snapshot.c"
881 (("\"gzip\"")
882 (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
883 (("\"bzip2\"")
884 (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
885 (("\"xz\"")
886 (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
887
888 (substitute* "filters/about-formatting.sh"
889 (("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out")
890 "/lib/cgit/filters"))
891 (("\\| tr") (string-append "| " (which "tr"))))
892
893 (substitute* "filters/html-converters/txt2html"
894 (("sed") (which "sed")))
895
896 (substitute* "filters/html-converters/man2html"
897 (("groff") (which "groff")))
898
899 (substitute* "filters/html-converters/rst2html"
900 (("rst2html\\.py") (which "rst2html.py")))
901
902 #t))
903 (delete 'configure) ; no configure script
904 (add-after 'build 'build-man
905 (lambda* (#:key make-flags #:allow-other-keys)
906 (apply invoke "make" "doc-man" make-flags)))
907 (replace 'install
908 (lambda* (#:key make-flags outputs #:allow-other-keys)
909 (let ((out (assoc-ref outputs "out")))
910 (apply invoke
911 "make" "install" "install-man"
912 (string-append "prefix=" out)
913 (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
914 make-flags)
915 ;; Move the platform-dependent 'cgit.cgi' into lib to get it
916 ;; stripped.
917 (rename-file (string-append out "/share/cgit/cgit.cgi")
918 (string-append out "/lib/cgit/cgit.cgi"))
919 #t)))
920 (add-after 'install 'wrap-python-scripts
921 (lambda* (#:key outputs #:allow-other-keys)
922 (for-each
923 (lambda (file)
924 (wrap-program (string-append (assoc-ref outputs "out")
925 "/lib/cgit/filters/" file)
926 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
927 '("syntax-highlighting.py"
928 "html-converters/md2html"))
929 #t)))))
930 (native-inputs
931 ;; For building manpage.
932 `(("asciidoc" ,asciidoc)
933 ("gzip" ,gzip)
934 ("bzip2" ,bzip2)
935 ("xz" ,xz)))
936 (inputs
937 `(;; Building cgit requires a Git source tree.
938 ("git-source"
939 ,(origin
940 (method url-fetch)
941 ;; cgit is tightly bound to git. Use GIT_VER from the Makefile,
942 ;; which may not match the current (package-version git).
943 (uri "mirror://kernel.org/software/scm/git/git-2.25.4.tar.xz")
944 (sha256
945 (base32 "11am6s46wmn1yll5614smjhzlghbqq6gysgcs64igjr9y5wzpdxq"))))
946 ("openssl" ,openssl)
947 ("groff" ,groff)
948 ("python" ,python)
949 ("python-docutils" ,python-docutils)
950 ("python-markdown" ,python-markdown)
951 ("python-pygments" ,python-pygments)
952 ("zlib" ,zlib)))
953 (home-page "https://git.zx2c4.com/cgit/")
954 (synopsis "Web frontend for git repositories")
955 (description
956 "CGit is an attempt to create a fast web interface for the Git SCM, using
957 a built-in cache to decrease server I/O pressure.")
958 (license license:gpl2)))
959
960 (define-public python-git-multimail
961 (package
962 (name "python-git-multimail")
963 (version "1.5.0.post1")
964 (source
965 (origin
966 (method url-fetch)
967 (uri (pypi-uri "git-multimail" version))
968 (sha256
969 (base32
970 "1zkrbsa70anwpw86ysfwalrb7nsr064kygfiyikyq1pl9pcl969y"))))
971 (build-system python-build-system)
972 (arguments
973 '(#:phases
974 (modify-phases %standard-phases
975 (add-after 'unpack 'patch
976 (lambda* (#:key inputs #:allow-other-keys)
977 (substitute* "git-multimail/git_multimail.py"
978 (("GIT_EXECUTABLE = 'git'")
979 (string-append "GIT_EXECUTABLE = '"
980 (assoc-ref inputs "git") "/bin/git"
981 "'"))
982 (("/usr/sbin/sendmail")
983 (string-append (assoc-ref inputs "sendmail")
984 "/usr/sbin/sendmail")))
985 #t)))))
986 (inputs
987 `(("git" ,git)
988 ("sendmail" ,sendmail)))
989 (home-page "https://github.com/git-multimail/git-multimail")
990 (synopsis "Send notification emails for Git pushes")
991 (description
992 "This hook sends emails describing changes introduced by pushes to a Git
993 repository. For each reference that was changed, it emits one ReferenceChange
994 email summarizing how the reference was changed, followed by one Revision
995 email for each new commit that was introduced by the reference change.
996
997 This script is designed to be used as a post-receive hook in a Git
998 repository")
999 (license license:gpl2)))
1000
1001 (define-public python-ghp-import
1002 (package
1003 (name "python-ghp-import")
1004 (version "0.5.5")
1005 (source
1006 (origin
1007 (method git-fetch)
1008 (uri (git-reference
1009 (url "https://github.com/davisp/ghp-import")
1010 (commit version)))
1011 (file-name (git-file-name name version))
1012 (sha256
1013 (base32 "12pmw3zz3i57ljnm0rxdyjqdyhisbvy18mjwkb3bzp5pgzs2f45c"))))
1014 (build-system python-build-system)
1015 (arguments
1016 `(#:phases (modify-phases %standard-phases
1017 (add-after 'install 'install-documentation
1018 (lambda* (#:key outputs #:allow-other-keys)
1019 (let* ((out (assoc-ref outputs "out"))
1020 (doc (string-append out "/share/doc"))
1021 (licenses (string-append out "/share/licenses")))
1022 (install-file "README.md" doc)
1023 (install-file "LICENSE" licenses)))))))
1024 (home-page "https://github.com/davisp/ghp-import")
1025 (synopsis "Copy directory to the gh-pages branch")
1026 (description "Script that copies a directory to the gh-pages branch (by
1027 default) of the repository.")
1028
1029 ;; See <https://bugs.gnu.org/27913>.
1030 (license (license:non-copyleft
1031 "https://raw.githubusercontent.com/davisp/ghp-import/master/LICENSE"
1032 "Tumbolia Public License"))))
1033
1034 (define-public python2-ghp-import
1035 (package-with-python2
1036 (strip-python2-variant python-ghp-import)))
1037
1038 (define-public python-gitdb
1039 (package
1040 (name "python-gitdb")
1041 (version "4.0.2")
1042 (source (origin
1043 (method url-fetch)
1044 (uri (pypi-uri "gitdb" version))
1045 (sha256
1046 (base32
1047 "0l113fphn6msjl3cl3kyf332b6lal7daxdd0nfma0x9ipfb013jr"))))
1048 (build-system python-build-system)
1049 (arguments
1050 `(#:phases (modify-phases %standard-phases
1051 (add-before 'check 'create-test-repository
1052 (lambda _
1053 (mkdir "/tmp/testrepo")
1054 ;; Some tests require a git repository, so create one.
1055 (with-directory-excursion "/tmp/testrepo"
1056 (do ((filecount 1 (1+ filecount)))
1057 ((> filecount 1000))
1058 (call-with-output-file (string-append
1059 "file" (number->string filecount))
1060 (lambda (port)
1061 (format port "~a" filecount))))
1062 (begin
1063 (invoke "git" "init")
1064 (invoke "git" "config" "user.name" "Total Git")
1065 (invoke "git" "config" "user.email" "git@localhost")
1066 (invoke "git" "add" "-A")
1067 (invoke "git" "commit" "-q" "-m" "dummy commit")))
1068
1069 ;; The repository checkout must be a "bare" clone.
1070 (invoke "git" "clone" "--bare" "/tmp/testrepo"
1071 "/tmp/testrepo.git")))
1072 (replace 'check
1073 (lambda _
1074 (setenv "GITDB_TEST_GIT_REPO_BASE" "/tmp/testrepo.git")
1075 ;; Skip tests that must be run from the gitdb repository.
1076 (setenv "TRAVIS" "1")
1077 (invoke "nosetests" "-v"))))))
1078 (propagated-inputs
1079 `(("python-smmap" ,python-smmap)))
1080 (native-inputs
1081 `(("git" ,git)
1082 ("python-nose" ,python-nose)))
1083 (home-page "https://github.com/gitpython-developers/gitdb")
1084 (synopsis "Python implementation of the Git object database")
1085 (description
1086 "GitDB allows you to access @dfn{bare} Git repositories for reading and
1087 writing. It aims at allowing full access to loose objects as well as packs
1088 with performance and scalability in mind. It operates exclusively on streams,
1089 allowing to handle large objects with a small memory footprint.")
1090 (license license:bsd-3)))
1091
1092 (define-public python-gitpython
1093 (package
1094 (name "python-gitpython")
1095 (version "3.1.0")
1096 (source (origin
1097 (method url-fetch)
1098 (uri (pypi-uri "GitPython" version))
1099 (sha256
1100 (base32
1101 "1jzllsy9lwc9yibccgv7h9naxisazx2n3zmpy21c8n5xhysw69p4"))))
1102 (build-system python-build-system)
1103 (arguments
1104 `(#:tests? #f ;XXX: Tests can only be run within the GitPython repository.
1105 #:phases (modify-phases %standard-phases
1106 (add-after 'unpack 'embed-git-reference
1107 (lambda* (#:key inputs #:allow-other-keys)
1108 (substitute* "git/cmd.py"
1109 (("git_exec_name = \"git\"")
1110 (string-append "git_exec_name = \""
1111 (assoc-ref inputs "git")
1112 "/bin/git\"")))
1113 #t)))))
1114 (inputs
1115 `(("git" ,git)))
1116 (propagated-inputs
1117 `(("python-gitdb" ,python-gitdb)))
1118 (native-inputs
1119 `(("python-ddt" ,python-ddt)
1120 ("python-nose" ,python-nose)))
1121 (home-page "https://github.com/gitpython-developers/GitPython")
1122 (synopsis "Python library for interacting with Git repositories")
1123 (description
1124 "GitPython is a python library used to interact with Git repositories,
1125 high-level like git-porcelain, or low-level like git-plumbing.
1126
1127 It provides abstractions of Git objects for easy access of repository data,
1128 and additionally allows you to access the Git repository more directly using
1129 either a pure Python implementation, or the faster, but more resource intensive
1130 @command{git} command implementation.")
1131 (license license:bsd-3)))
1132
1133 (define-public shflags
1134 (package
1135 (name "shflags")
1136 (version "1.2.3")
1137 (source (origin
1138 (method git-fetch)
1139 (uri (git-reference
1140 (url "https://github.com/kward/shflags")
1141 (commit (string-append "v" version))))
1142 (file-name (git-file-name name version))
1143 (sha256
1144 (base32
1145 "1ydx0sb6vz9s2dgp5bd64y7fpzh9qvmlfjxrbmzac8saknijrlly"))))
1146 (build-system gnu-build-system)
1147 (arguments
1148 `(#:tests? #f ; no tests
1149 #:phases
1150 (modify-phases %standard-phases
1151 (delete 'configure) ; nothing to configure
1152 (delete 'build) ; nothing to build
1153 (replace 'install
1154 (lambda* (#:key outputs #:allow-other-keys)
1155 (let* ((out (assoc-ref outputs "out"))
1156 (src (string-append out "/src")))
1157 (install-file "shflags" src)
1158 #t))))))
1159 (home-page "https://github.com/kward/shflags")
1160 (synopsis "Command-line flags library for shell scripts")
1161 (description
1162 "Shell Flags (shFlags) is a library written to greatly simplify the
1163 handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
1164 ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
1165 different versions of getopt on various OSes make writing portable shell
1166 scripts difficult. shFlags instead provides an API that doesn't change across
1167 shell and OS versions so the script writer can be confident that the script
1168 will work.")
1169 (license license:lgpl2.1)))
1170
1171 (define-public git-flow
1172 (package
1173 (name "git-flow")
1174 ;; This version has not be officially released yet, so we build it
1175 ;; directly from the git repository.
1176 (version "1.12.3")
1177 (source (origin
1178 (method git-fetch)
1179 (uri (git-reference
1180 (url "https://github.com/petervanderdoes/gitflow-avh/")
1181 (commit version)))
1182 (file-name (git-file-name name version))
1183 (sha256
1184 (base32
1185 "13q4mnrxr03wz2dkhzy73j384g299m4d545cnhxcaznvdwfany4h"))))
1186 (build-system gnu-build-system)
1187 (inputs `(("shflags" ,shflags)))
1188 (arguments
1189 '(#:tests? #f ; no tests
1190 #:make-flags (list (string-append "prefix="
1191 (assoc-ref %outputs "out")))
1192 #:phases
1193 (modify-phases %standard-phases
1194 (add-after 'unpack 'reset-shFlags-link
1195 (lambda* (#:key inputs #:allow-other-keys)
1196 ;; The link points to a file in the shFlags submodule.
1197 ;; Redirect it to point to our system shFlags.
1198 (let ((shflags (assoc-ref inputs "shflags")))
1199 (begin
1200 (delete-file "gitflow-shFlags")
1201 (symlink (string-append shflags "/src/shflags")
1202 "gitflow-shFlags")))))
1203 (delete 'configure)
1204 (delete 'build))))
1205 (home-page "https://nvie.com/posts/a-successful-git-branching-model/")
1206 (synopsis "Git extensions for Vincent Driessen's branching model")
1207 (description
1208 "Vincent Driessen's branching model is a git branching and release
1209 management strategy that helps developers keep track of features, hotfixes,
1210 and releases in bigger software projects. The git-flow library of git
1211 subcommands helps automate some parts of the flow to make working with it a
1212 lot easier.")
1213 (license license:bsd-2)))
1214
1215 (define-public stgit
1216 (package
1217 (name "stgit")
1218 (version "0.23")
1219 (source
1220 (origin
1221 (method git-fetch)
1222 (uri (git-reference
1223 (url "https://github.com/ctmarinas/stgit")
1224 (commit (string-append "v" version))))
1225 (file-name (git-file-name name version))
1226 (sha256
1227 (base32 "0bgxgsd6nj6gkk74c56vrjsyr7j19jrj6cx2ma6f7b20wriznhd5"))))
1228 (build-system python-build-system)
1229 (native-inputs
1230 `(("perl" ,perl)))
1231 (inputs
1232 `(("git" ,git)))
1233 (arguments
1234 `(#:phases
1235 (modify-phases %standard-phases
1236 (add-after 'unpack 'hard-code-version
1237 (lambda _
1238 ;; setup.py tries to cleverly extract the version number from the
1239 ;; git history, which the source checkout lacks. Hard-code one.
1240 (substitute* "setup.py"
1241 (("get_ver\\(\\)")
1242 (format #f "'~a'" ,version)))
1243 #t))
1244 (add-before 'check 'patch-tests
1245 (lambda _
1246 (substitute* (list "t/t1900-mail.sh"
1247 "t/t7504-commit-msg-hook.sh")
1248 (("/bin/sh")
1249 (which "bash")))
1250 #t))
1251 (replace 'check
1252 (lambda _
1253 (invoke "make"
1254 "PERL_PATH=perl"
1255 (string-append "SHELL_PATH=" (which "bash"))
1256 "test"))))))
1257 (home-page "https://stacked-git.github.io/")
1258 (synopsis "Stacked Git")
1259 (description
1260 "StGit is a command-line application that provides functionality similar
1261 to Quilt (i.e., pushing/popping patches to/from a stack), but using Git
1262 instead of @command{diff} and @command{patch}. StGit stores its patches in a
1263 Git repository as normal Git commits, and provides a number of commands to
1264 manipulate them in various ways.")
1265 (license license:gpl2)))
1266
1267 (define-public vcsh
1268 (package
1269 (name "vcsh")
1270 (version "1.20151229")
1271 (source
1272 (origin
1273 (method git-fetch)
1274 (uri (git-reference
1275 (url "https://github.com/RichiH/vcsh")
1276 (commit (string-append "v" version))))
1277 (file-name (git-file-name name version))
1278 (sha256
1279 (base32 "1grpj45nbpv4j60vd2kg4rj53zrm0bc0h9l4pfd3c2mwbvywm6ab"))))
1280 (build-system gnu-build-system)
1281 (native-inputs
1282 `(("which" ,which)))
1283 (inputs
1284 `(("git" ,git)
1285 ("perl" ,perl)
1286 ("perl-test-harness" ,perl-test-harness)
1287 ("perl-shell-command" ,perl-shell-command)
1288 ("perl-test-most" ,perl-test-most)))
1289 (arguments
1290 '(#:phases (modify-phases %standard-phases
1291 (delete 'configure)
1292 (delete 'build))
1293 #:make-flags (list (string-append "PREFIX="
1294 (assoc-ref %outputs "out")))
1295 #:test-target "test"))
1296 (home-page "https://github.com/RichiH/vcsh")
1297 (synopsis "Version control system for @code{$HOME}")
1298 (description
1299 "vcsh version-controls configuration files in several Git repositories,
1300 all in one single directory. They all maintain their working trees without
1301 clobbering each other or interfering otherwise. By default, all Git
1302 repositories maintained via vcsh store the actual files in @code{$HOME},
1303 though this can be overridden.")
1304 (license license:gpl2+)))
1305
1306 (define-public git-test-sequence
1307 (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76"))
1308 (package
1309 (name "git-test-sequence")
1310 (version (string-append "20140312." (string-take commit 7)))
1311 (source (origin
1312 (method git-fetch)
1313 (uri (git-reference
1314 ;; There are many other scripts in this directory; we
1315 ;; are interested in just one for this package.
1316 (url "https://github.com/dustin/bindir")
1317 (commit commit)))
1318 (file-name (git-file-name name version))
1319 (sha256
1320 (base32
1321 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
1322 (build-system trivial-build-system)
1323 (arguments
1324 `(#:modules ((guix build utils))
1325 #:builder (begin
1326 (use-modules (guix build utils))
1327 (let* ((source (assoc-ref %build-inputs "source"))
1328 (output (assoc-ref %outputs "out"))
1329 (bindir (string-append output "/bin"))
1330 (script "git-test-sequence"))
1331 (install-file (string-append source "/" script)
1332 bindir)
1333 #t))))
1334 (home-page "https://dustin.sallings.org/2010/03/28/git-test-sequence.html")
1335 (synopsis "Run a command over a sequence of commits")
1336 (description
1337 "git-test-sequence is similar to an automated git bisect except it’s
1338 linear. It will test every change between two points in the DAG. It will
1339 also walk each side of a merge and test those changes individually.")
1340 (license (license:x11-style "file://LICENSE")))))
1341
1342 (define-public gitolite
1343 (package
1344 (name "gitolite")
1345 (version "3.6.12")
1346 (source
1347 (origin
1348 (method git-fetch)
1349 (uri (git-reference
1350 (url "https://github.com/sitaramc/gitolite")
1351 (commit (string-append "v" version))))
1352 (file-name (git-file-name name version))
1353 (sha256
1354 (base32 "05xw1pmagvkrbzga5pgl3xk9qyc6b5x73f842454f3w9ijspa8zy"))))
1355 (build-system gnu-build-system)
1356 (arguments
1357 '(#:tests? #f ; no tests
1358 #:phases (modify-phases %standard-phases
1359 (delete 'configure)
1360 (delete 'build)
1361 (add-before 'install 'patch-scripts
1362 (lambda* (#:key inputs #:allow-other-keys)
1363 (let ((perl (string-append (assoc-ref inputs "perl")
1364 "/bin/perl")))
1365 ;; This seems to take care of every shell script that
1366 ;; invokes Perl.
1367 (substitute* (find-files "." ".*")
1368 ((" perl -")
1369 (string-append " " perl " -")))
1370
1371 (substitute* (find-files "src/triggers" ".*")
1372 ((" sed ")
1373 (string-append " " (which "sed") " ")))
1374
1375 (substitute*
1376 '("src/triggers/post-compile/update-gitweb-access-list"
1377 "src/triggers/post-compile/ssh-authkeys-split"
1378 "src/triggers/upstream")
1379 ((" grep ")
1380 (string-append " " (which "grep") " ")))
1381
1382 ;; Avoid references to the store in authorized_keys.
1383 ;; This works because gitolite-shell is in the PATH.
1384 (substitute* "src/triggers/post-compile/ssh-authkeys"
1385 (("\\$glshell \\$user")
1386 "gitolite-shell $user"))
1387 #t)))
1388 (add-before 'install 'patch-source
1389 (lambda* (#:key inputs #:allow-other-keys)
1390 ;; Gitolite uses cat to test the readability of the
1391 ;; pubkey
1392 (substitute* "src/lib/Gitolite/Setup.pm"
1393 (("\"cat ")
1394 (string-append "\"" (which "cat") " "))
1395 (("\"ssh-keygen")
1396 (string-append "\"" (which "ssh-keygen"))))
1397
1398 (substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
1399 "src/lib/Gitolite/Hooks/Update.pm")
1400 (("/usr/bin/perl")
1401 (string-append (assoc-ref inputs "perl")
1402 "/bin/perl")))
1403
1404 (substitute* "src/lib/Gitolite/Common.pm"
1405 (("\"ssh-keygen")
1406 (string-append "\"" (which "ssh-keygen")))
1407 (("\"logger\"")
1408 (string-append "\""
1409 (assoc-ref inputs "inetutils")
1410 "/bin/logger\"")))
1411
1412 #t))
1413 (replace 'install
1414 (lambda* (#:key outputs #:allow-other-keys)
1415 (let* ((output (assoc-ref outputs "out"))
1416 (sharedir (string-append output "/share/gitolite"))
1417 (bindir (string-append output "/bin")))
1418 (mkdir-p sharedir)
1419 (mkdir-p bindir)
1420 (invoke "./install" "-to" sharedir)
1421 ;; Create symlinks for executable scripts in /bin.
1422 (for-each (lambda (script)
1423 (symlink (string-append sharedir "/" script)
1424 (string-append bindir "/" script)))
1425 '("gitolite" "gitolite-shell"))
1426 #t)))
1427 (add-after 'install 'wrap-scripts
1428 (lambda* (#:key inputs outputs #:allow-other-keys)
1429 (let ((out (assoc-ref outputs "out"))
1430 (coreutils (assoc-ref inputs "coreutils"))
1431 (findutils (assoc-ref inputs "findutils"))
1432 (git (assoc-ref inputs "git")))
1433 (wrap-program (string-append out "/bin/gitolite")
1434 `("PATH" ":" prefix
1435 ,(map (lambda (dir)
1436 (string-append dir "/bin"))
1437 (list out coreutils findutils git))))
1438 #t))))))
1439 (inputs
1440 `(("perl" ,perl)
1441 ("coreutils" ,coreutils)
1442 ("findutils" ,findutils)
1443 ("inetutils" ,inetutils)))
1444 ;; git and openssh are propagated because trying to patch the source via
1445 ;; regexp matching is too brittle and prone to false positives.
1446 (propagated-inputs
1447 `(("git" ,git)
1448 ("openssh" ,openssh)))
1449 (home-page "https://gitolite.com")
1450 (synopsis "Git access control layer")
1451 (description
1452 "Gitolite is an access control layer on top of Git, providing fine access
1453 control to Git repositories.")
1454 (license license:gpl2)))
1455
1456 (define-public pre-commit
1457 (package
1458 (name "pre-commit")
1459 (version "2.8.1")
1460 (source
1461 (origin
1462 ;; No tests in the PyPI tarball.
1463 (method git-fetch)
1464 (uri (git-reference
1465 (url "https://github.com/pre-commit/pre-commit")
1466 (commit (string-append "v" version))))
1467 (file-name (git-file-name name version))
1468 (sha256
1469 (base32 "0b3ks6viccq3n4p8i8zgfd40vp1k5nkhmmlz7p4nxcdizw8zxgn8"))))
1470 (build-system python-build-system)
1471 (arguments
1472 `(#:phases
1473 (modify-phases %standard-phases
1474 (add-before 'check 'set-up-git
1475 (lambda _
1476 ;; Change from /homeless-shelter to /tmp for write permission.
1477 (setenv "HOME" "/tmp")
1478 ;; Environment variables used in the tests.
1479 (setenv "GIT_AUTHOR_NAME" "Your Name")
1480 (setenv "GIT_COMMITTER_NAME" "Your Name")
1481 (setenv "GIT_AUTHOR_EMAIL" "you@example.com")
1482 (setenv "GIT_COMMITTER_EMAIL" "you@example.com")
1483 (invoke "git" "config" "--global" "user.name" "Your Name")
1484 (invoke "git" "config" "--global" "user.email" "you@example.com")
1485 #t))
1486 (replace 'check
1487 (lambda* (#:key inputs outputs #:allow-other-keys)
1488 (add-installed-pythonpath inputs outputs)
1489 (invoke "pytest" "tests" "-k"
1490 (string-append
1491 ;; Disable conda tests.
1492 "not test_conda_hook"
1493 " and not test_conda_with_additional_dependencies_hook"
1494 " and not test_local_conda_additional_dependencies"
1495 ;; Disable cpan tests.
1496 " and not test_local_perl_additional_dependencies"
1497 " and not test_perl_hook"
1498 ;; Disable Ruby tests.
1499 " and not test_additional_ruby_dependencies_installed"
1500 " and not test_install_rbenv"
1501 " and not test_install_rbenv_with_version"
1502 " and not test_run_a_ruby_hook"
1503 " and not test_run_ruby_hook_with_disable_shared_gems"
1504 " and not test_run_versioned_ruby_hook"
1505 ;; Disable Cargo tests.
1506 " and not test_additional_rust_cli_dependencies_installed"
1507 " and not test_additional_rust_lib_dependencies_installed"
1508 " and not test_local_rust_additional_dependencies"
1509 " and not test_rust_hook"
1510 ;; Disable dotnet tests.
1511 " and not test_dotnet_hook"
1512 ;; Disable nodejs tests.
1513 " and not test_unhealthy_if_system_node_goes_missing"
1514 " and not test_installs_without_links_outside_env"
1515 " and not test_healthy_system_node"
1516 ;; Disable python2 test.
1517 " and not test_switch_language_versions_doesnt_clobber"
1518 ;; These tests try to open a network socket.
1519 " and not test_additional_golang_dependencies_installed"
1520 " and not test_additional_node_dependencies_installed"
1521 " and not test_golang_hook"
1522 " and not test_golang_hook_still_works_when_gobin_is_set"
1523 " and not test_local_golang_additional_dependencies"
1524 " and not test_main"
1525 " and not test_node_hook_with_npm_userconfig_set"
1526 " and not test_run_a_node_hook"
1527 " and not test_run_versioned_node_hook"
1528 ;; Tests failing with a permission error.
1529 ;; They try to write to the filesystem.
1530 " and not test_autoupdate_hook_disappearing_repo"
1531 " and not test_hook_disppearing_repo_raises"
1532 " and not test_img_conflict"
1533 " and not test_img_something_unstaged"
1534 " and not test_installed_from_venv"
1535 " and not test_too_new_version"
1536 " and not test_try_repo_uncommitted_changes"
1537 " and not test_versions_ok"
1538 ;; This test tries to activate a virtualenv.
1539 " and not test_healthy_venv_creator"
1540 ;; Fatal error: Not a Git repository.
1541 " and not test_all_cmds"
1542 " and not test_try_repo"
1543 ;; No module named 'pip._internal.cli.main'.
1544 " and not test_additional_dependencies_roll_forward"
1545 ;; Assertion errors.
1546 " and not test_install_existing_hooks_no_overwrite"
1547 " and not test_uninstall_restores_legacy_hooks"))))
1548 (add-before 'reset-gzip-timestamps 'make-files-writable
1549 (lambda* (#:key outputs #:allow-other-keys)
1550 ;; Make sure .gz files are writable so that the
1551 ;; 'reset-gzip-timestamps' phase can do its work.
1552 (let ((out (assoc-ref outputs "out")))
1553 (for-each make-file-writable
1554 (find-files out "\\.gz$"))
1555 #t))))))
1556 (native-inputs
1557 `(("git" ,git-minimal)
1558 ("python-pytest" ,python-pytest)
1559 ("python-re-assert" ,python-re-assert)))
1560 ;; Propagate because pre-commit is also used as a module.
1561 (propagated-inputs
1562 `(("python-cfgv" ,python-cfgv)
1563 ("python-identify" ,python-identify)
1564 ("python-nodeenv" ,python-nodeenv)
1565 ("python-pyyaml" ,python-pyyaml)
1566 ("python-toml" ,python-toml)
1567 ("python-virtualenv" ,python-virtualenv)))
1568 (home-page "https://pre-commit.com/")
1569 (synopsis "Framework for managing and maintaining multi-language pre-commit hooks")
1570 (description
1571 "Pre-commit is a multi-language package manager for pre-commit hooks. You
1572 specify a list of hooks you want and pre-commit manages the installation and
1573 execution of any hook written in any language before every commit.")
1574 (license license:expat)))
1575
1576 (define-public mercurial
1577 (package
1578 (name "mercurial")
1579 (version "5.5.1")
1580 (source (origin
1581 (method url-fetch)
1582 (uri (string-append "https://www.mercurial-scm.org/"
1583 "release/mercurial-" version ".tar.gz"))
1584 (sha256
1585 (base32
1586 "0x08yjs26j88kh1bvl2g3r24lnfc023ry3i1cxfq6haray6sv5ag"))))
1587 (build-system python-build-system)
1588 (arguments
1589 `(#:phases
1590 (modify-phases %standard-phases
1591 (add-after 'unpack 'patch-tests
1592 (lambda _
1593 (substitute* '("tests/test-extdiff.t"
1594 "tests/test-logtoprocess.t"
1595 "tests/test-patchbomb.t"
1596 "tests/test-run-tests.t"
1597 "tests/test-transplant.t")
1598 (("/bin/sh")
1599 (which "sh")))
1600 #t))
1601 (replace 'check
1602 (lambda* (#:key tests? #:allow-other-keys)
1603 (with-directory-excursion "tests"
1604 ;; The following tests are known to fail.
1605 (for-each delete-file
1606 '(;; XXX: This test calls 'run-tests.py --with-hg=
1607 ;; `which hg`' and fails because there is no hg on
1608 ;; PATH from before (that's why we are building it!)?
1609 "test-hghave.t"
1610
1611 ;; FIXME: Why does this fail in the build container, but
1612 ;; not in 'guix environment -C' (even without /bin/sh)?
1613 "test-nointerrupt.t"
1614
1615 ;; FIXME: This gets killed but does not receive an interrupt.
1616 "test-commandserver.t"
1617
1618 ;; Only works when run in a hg-repo, not in an
1619 ;; extracted tarball
1620 "test-doctest.py"
1621
1622 ;; TODO: the fqaddr() call fails in the build
1623 ;; container, causing these server tests to fail.
1624 "test-hgwebdir.t"
1625 "test-http-branchmap.t"
1626 "test-pull-bundle.t"
1627 "test-push-http.t"
1628 "test-serve.t"
1629 "test-subrepo-deep-nested-change.t"
1630 "test-subrepo-recursion.t"))
1631 (when tests?
1632 (invoke "./run-tests.py"
1633 ;; ‘make check’ does not respect ‘-j’.
1634 (string-append "-j" (number->string
1635 (parallel-job-count)))
1636 ;; The default time-outs are too low for many systems.
1637 ;; Raise them generously: Guix enforces its own.
1638 "--timeout" "86400"
1639 "--slowtimeout" "86400"
1640 ;; The test suite takes a long time and produces little
1641 ;; output by default. Prevent timeouts due to silence.
1642 "-v"))
1643 #t))))))
1644 ;; The following inputs are only needed to run the tests.
1645 (native-inputs
1646 `(("python-nose" ,python-nose)
1647 ("unzip" ,unzip)
1648 ("which" ,which)))
1649 (home-page "https://www.mercurial-scm.org/")
1650 (synopsis "Decentralized version control system")
1651 (description
1652 "Mercurial is a free, distributed source control management tool.
1653 It efficiently handles projects of any size
1654 and offers an easy and intuitive interface.")
1655 (license license:gpl2+)))
1656
1657 (define-public python-hg-evolve
1658 (package
1659 (name "python-hg-evolve")
1660 (version "10.0.1")
1661 (source
1662 (origin
1663 (method hg-fetch)
1664 (uri (hg-reference
1665 (url "https://www.mercurial-scm.org/repo/evolve")
1666 (changeset version)))
1667 (file-name (string-append name "-" version "-checkout"))
1668 (sha256
1669 (base32
1670 "1lz407373lfam9n02gq0l0rc2sjvn0m96kbzy93ipia3ika8fa68"))))
1671 (build-system python-build-system)
1672 (arguments
1673 ;; Tests need mercurial source code.
1674 '(#:tests? #f))
1675 (propagated-inputs
1676 `(("mercurial" ,mercurial)))
1677 (home-page "https://www.mercurial-scm.org/doc/evolution/")
1678 (synopsis "Flexible evolution of Mercurial history")
1679 (description "Evolve is a Mercurial extension for faster and safer mutable
1680 history. It implements the changeset evolution concept for Mercurial.")
1681 (license license:gpl2)))
1682
1683 (define-public neon
1684 (package
1685 (name "neon")
1686 (version "0.30.2")
1687 (source (origin
1688 (method url-fetch)
1689 (uri (string-append "http://www.webdav.org/neon/neon-"
1690 version ".tar.gz"))
1691 (sha256
1692 (base32
1693 "1jpvczcx658vimqm7c8my2q41fnmjaf1j03g7bsli6rjxk6xh2yv"))))
1694 (build-system gnu-build-system)
1695 (native-inputs
1696 `(("perl" ,perl)
1697 ("pkg-config" ,pkg-config)))
1698 (inputs
1699 `(("libxml2" ,libxml2)
1700 ("openssl" ,openssl)
1701 ("zlib" ,zlib)))
1702 (arguments
1703 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
1704 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
1705 #:tests? #f
1706 #:configure-flags '("--enable-shared"
1707 ;; requires libgnutils-config, deprecated
1708 ;; in gnutls 2.8.
1709 ; "--with-ssl=gnutls")))
1710 "--with-ssl=openssl")))
1711 (home-page "http://www.webdav.org/neon/")
1712 (synopsis "HTTP and WebDAV client library")
1713 (description
1714 "Neon is an HTTP and WebDAV client library, with a C interface and the
1715 following features:
1716 @enumerate
1717 @item High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
1718 DELETE, etc.);
1719 @item low-level interface to the HTTP request/response engine, allowing the use
1720 of arbitrary HTTP methods, headers, etc.;
1721 @item authentication support including Basic and Digest support, along with
1722 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
1723 @item SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
1724 verifying server certificates, handling client certificates, and examining
1725 certificate properties, smartcard-based client certificates are also
1726 supported via a PKCS#11 wrapper interface;
1727 @item abstract interface to parsing XML using libxml2 or expat, and wrappers for
1728 simplifying handling XML HTTP response bodies;
1729 @item WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
1730 property manipulation.
1731 @end enumerate\n")
1732 (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+
1733
1734 (define-public subversion
1735 (package
1736 (name "subversion")
1737 (version "1.14.0")
1738 (source (origin
1739 (method url-fetch)
1740 (uri (string-append "mirror://apache/subversion/"
1741 "subversion-" version ".tar.bz2"))
1742 (sha256
1743 (base32
1744 "00i1f88snlpcnsycpn6r315h6792l5nkr2p5k6kq6yprz4cf5a3b"))))
1745 (build-system gnu-build-system)
1746 (arguments
1747 '(#:parallel-tests? #f ; TODO Seems to cause test failures on
1748 ; i686-linux
1749 #:configure-flags '("--enable-static=no")
1750 #:phases
1751 (modify-phases %standard-phases
1752 (add-after 'configure 'patch-libtool-wrapper-ls
1753 (lambda* (#:key inputs #:allow-other-keys)
1754 ;; This substitution allows tests svnauthz_tests and svnlook_tests
1755 ;; to pass. These tests execute svnauthz and svnlook through
1756 ;; their libtool wrapper scripts from svn hooks, whose empty
1757 ;; environments cause "ls: command not found" errors. It would be
1758 ;; nice if this fix ultimately made its way into libtool.
1759 (let ((coreutils (assoc-ref inputs "coreutils")))
1760 (substitute* "libtool"
1761 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))
1762 #t)))
1763 (add-before 'build 'patch-test-sh
1764 (lambda _
1765 (substitute* "subversion/tests/libsvn_repos/repos-test.c"
1766 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1767 #t))
1768 (add-before 'check 'set-PARALLEL
1769 (lambda* (#:key parallel-tests? #:allow-other-keys)
1770 (if parallel-tests?
1771 (setenv "PARALLEL" (number->string (parallel-job-count)))
1772 (simple-format #t "parallel-tests? are disabled\n"))
1773 #t))
1774 (add-after 'install 'install-perl-bindings
1775 (lambda* (#:key outputs #:allow-other-keys)
1776 ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
1777 (let ((out (assoc-ref outputs "out")))
1778 (invoke "make" "swig-pl-lib")
1779 ;; FIXME: Test failures.
1780 ;; (invoke "make" "check-swig-pl")
1781 (invoke "make" "install-swig-pl-lib")
1782
1783 ;; Set the right installation prefix.
1784 (with-directory-excursion
1785 "subversion/bindings/swig/perl/native"
1786 (invoke "perl" "Makefile.PL"
1787 "NO_PERLLOCAL=1"
1788 (string-append "PREFIX=" out))
1789 (invoke "make" "install"
1790 (string-append "OTHERLDFLAGS="
1791 "-Wl,-rpath="
1792 out "/lib")))))))))
1793 (native-inputs
1794 `(("pkg-config" ,pkg-config)
1795 ;; For the Perl bindings.
1796 ("swig" ,swig)))
1797 (inputs
1798 `(("apr" ,apr)
1799 ("apr-util" ,apr-util)
1800 ("lz4" ,lz4)
1801 ("serf" ,serf)
1802 ("perl" ,perl)
1803 ("python" ,python-wrapper)
1804 ("sqlite" ,sqlite)
1805 ("utf8proc" ,utf8proc)
1806 ("zlib" ,zlib)))
1807 (home-page "https://subversion.apache.org/")
1808 (synopsis "Revision control system")
1809 (description
1810 "@dfn{Subversion} (svn) exists to be recognized and adopted as a
1811 centralized version control system characterized by its
1812 reliability as a safe haven for valuable data; the simplicity of its model and
1813 usage; and its ability to support the needs of a wide variety of users and
1814 projects, from individuals to large-scale enterprise operations.")
1815 (license license:asl2.0)))
1816
1817 (define-public rcs
1818 (package
1819 (name "rcs")
1820 (version "5.10.0")
1821 (source (origin
1822 (method url-fetch)
1823 (uri (string-append "mirror://gnu/rcs/rcs-"
1824 version ".tar.xz"))
1825 (sha256
1826 (base32
1827 "1if5pa4iip2p70gljm54nggfdnsfjxa4cqz8fpj07lvsijary39s"))
1828 (patches (search-patches "rcs-5.10.0-no-stdin.patch"))))
1829 (build-system gnu-build-system)
1830 (native-inputs `(("ed" ,ed)))
1831 (home-page "https://www.gnu.org/software/rcs/")
1832 (synopsis "Per-file local revision control system")
1833 (description
1834 "RCS is the original Revision Control System. It works on a
1835 file-by-file basis, in contrast to subsequent version control systems such as
1836 CVS, Subversion, and Git. This can make it suitable for system
1837 administration files, for example, which are often inherently local to one
1838 machine.")
1839 (license license:gpl3+)))
1840
1841 (define-public cvs
1842 (package
1843 (name "cvs")
1844 (version "1.12.13")
1845 (source (origin
1846 (method url-fetch)
1847 (uri (string-append
1848 "https://ftp.gnu.org/non-gnu/cvs/source/feature/"
1849 version "/cvs-" version ".tar.bz2"))
1850 (patches (search-patches "cvs-CVE-2017-12836.patch"))
1851 (sha256
1852 (base32
1853 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
1854 (build-system gnu-build-system)
1855 (arguments
1856 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
1857 '(#:tests? #f
1858 #:configure-flags (list "--with-external-zlib")))
1859 (inputs `(("zlib" ,zlib)
1860 ("nano" ,nano))) ; the default editor
1861 (home-page "http://cvs.nongnu.org")
1862 (synopsis "Historical centralized version control system")
1863 (description
1864 "CVS is a version control system, an important component of Source
1865 Configuration Management (SCM). Using it, you can record the history of
1866 sources files, and documents. It fills a similar role to the free software
1867 RCS, PRCS, and Aegis packages.")
1868 (license license:gpl1+)))
1869
1870 (define-public cvs-fast-export
1871 (package
1872 (name "cvs-fast-export")
1873 (version "1.55")
1874 (source (origin
1875 (method url-fetch)
1876 (uri (string-append "http://www.catb.org/~esr/cvs-fast-export/"
1877 "cvs-fast-export-" version ".tar.gz"))
1878 (sha256
1879 (base32
1880 "06y2myhhv2ap08bq7d7shq0b7lq6wgznwrpz6622xq66cxkf2n5g"))))
1881 (build-system gnu-build-system)
1882 (arguments
1883 '(#:phases
1884 (modify-phases %standard-phases
1885 (delete 'configure)) ; no configure script
1886 #:parallel-build? #f ; parallel a2x commands fail spectacularly
1887 #:make-flags
1888 (list "CC=gcc" (string-append "prefix?=" (assoc-ref %outputs "out")))))
1889 (inputs
1890 `(("git" ,git)
1891 ("python" ,python-wrapper)))
1892 (native-inputs
1893 `(("asciidoc" ,asciidoc)
1894 ;; These are needed for the tests.
1895 ("cvs" ,cvs)
1896 ("rcs" ,rcs)))
1897 (home-page "http://www.catb.org/esr/cvs-fast-export/")
1898 (synopsis "Export an RCS or CVS history as a fast-import stream")
1899 (description "This program analyzes a collection of RCS files in a CVS
1900 repository (or outside of one) and, when possible, emits an equivalent history
1901 in the form of a fast-import stream. Not all possible histories can be
1902 rendered this way; the program tries to emit useful warnings when it can't.
1903
1904 The program can also produce a visualization of the resulting commit directed
1905 acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org,
1906 Graphviz}. The package also includes @command{cvssync}, a tool for mirroring
1907 masters from remote CVS hosts.")
1908 (license license:gpl2+)))
1909
1910 (define-public vc-dwim
1911 (package
1912 (name "vc-dwim")
1913 (version "1.10")
1914 (source (origin
1915 (method url-fetch)
1916 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
1917 version ".tar.xz"))
1918 (sha256
1919 (base32
1920 "0am6axxdvkm2vwgg0gjrd930yv4dlsdbf0rdv0zh5bhy1ir64rph"))))
1921 (build-system gnu-build-system)
1922 (inputs `(("perl" ,perl)))
1923 (native-inputs
1924 `(("emacs" ,emacs-minimal) ; for `ctags'
1925 ("inetutils" ,inetutils))) ; for `hostname', used in the tests
1926 (home-page "https://www.gnu.org/software/vc-dwim/")
1927 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
1928 (description
1929 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
1930 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
1931 using version control at the same time, for example by printing a reminder
1932 when a file change has been described in the ChangeLog but the file has not
1933 been added to the VC. vc-chlog scans changed files and generates
1934 standards-compliant ChangeLog entries based on the changes that it detects.")
1935 (license license:gpl3+)))
1936
1937 (define-public diffstat
1938 (package
1939 (name "diffstat")
1940 (version "1.63")
1941 (source (origin
1942 (method url-fetch)
1943 (uri
1944 (list
1945 (string-append "ftp://invisible-island.net/diffstat/"
1946 "diffstat-" version ".tgz")
1947 (string-append "http://invisible-mirror.net/archives/diffstat/"
1948 "diffstat-" version ".tgz")))
1949 (sha256
1950 (base32
1951 "0vyw200s5dv1257pmrh6c6fdkmw3slyz5szpqfx916xr04sdbpby"))))
1952 (build-system gnu-build-system)
1953 (home-page "https://invisible-island.net/diffstat/")
1954 (synopsis "Make histograms from the output of @command{diff}")
1955 (description
1956 "Diffstat reads the output of @command{diff} and displays a histogram of
1957 the insertions, deletions, and modifications per file. It is useful for
1958 reviewing large, complex patch files.")
1959 (license (license:x11-style "file://COPYING"))))
1960
1961 (define-public cssc
1962 (package
1963 (name "cssc")
1964 (version "1.4.1")
1965 (source (origin
1966 (method url-fetch)
1967 (uri (string-append "mirror://gnu/" name "/CSSC-"
1968 version ".tar.gz"))
1969 (sha256
1970 (base32
1971 "1vsisqq573xjr2qpn19iwmpqgl3mq03m790akpa4rvj60b4d1gni"))))
1972 (build-system gnu-build-system)
1973 (arguments
1974 `(#:phases
1975 (modify-phases %standard-phases
1976 (add-before 'check 'precheck
1977 (lambda _
1978 (begin
1979 (substitute* "tests/common/test-common"
1980 (("/bin/pwd") (which "pwd")))
1981
1982 (substitute* "tests/prt/all-512.sh"
1983 (("/bin/sh") (which "sh")))
1984
1985 ;; XXX: This test has no hope of passing until there is a "nogroup"
1986 ;; entry (or at least some group to which the guix builder does
1987 ;; not belong) in the /etc/group file of the build environment.
1988 ;; Currently we do not have such a group. Disable this test for now.
1989 (substitute* "tests/Makefile"
1990 (("test-delta ") ""))))))))
1991 ;; These are needed for the tests
1992 (native-inputs `(("git" ,git)
1993 ("cvs" ,cvs)))
1994 (home-page "https://www.gnu.org/software/cssc/")
1995 (synopsis "File-based version control like SCCS")
1996 (description "GNU CSSC provides a replacement for the legacy Unix source
1997 code control system SCCS. This allows old code still under that system to be
1998 accessed and migrated on modern systems.")
1999 (license license:gpl3+)))
2000
2001 ;; This package can unfortunately work only in -TEST mode, since Aegis
2002 ;; requires that it is installed setuid root.
2003 (define-public aegis
2004 (package
2005 (name "aegis")
2006 (version "4.24")
2007 (source (origin
2008 (method url-fetch)
2009 (uri (string-append "mirror://sourceforge/aegis/aegis/" version
2010 "/aegis-" version ".tar.gz"))
2011 (sha256
2012 (base32
2013 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
2014 (patches (search-patches "aegis-perl-tempdir1.patch"
2015 "aegis-perl-tempdir2.patch"
2016 "aegis-test-fixup-1.patch"
2017 "aegis-test-fixup-2.patch"
2018 "aegis-constness-error.patch"))))
2019 (build-system gnu-build-system)
2020 (inputs
2021 `(("e2fsprogs" ,e2fsprogs)
2022 ("curl" ,curl)
2023 ("file" ,file)
2024 ("libxml2" ,libxml2)
2025 ("zlib" ,zlib)
2026 ("gettext" ,gettext-minimal)))
2027 (native-inputs
2028 `(("bison" ,bison)
2029 ("groff" ,groff)
2030 ("perl" ,perl)
2031 ;; Various tests require the following:
2032 ("cvs" ,cvs)
2033 ("flex" ,flex)
2034 ("cook" ,cook)
2035 ("subversion" ,subversion)
2036 ("rcs" ,rcs)
2037 ("ed" ,ed)))
2038 (arguments
2039 `(#:configure-flags (list "--with-no-aegis-configured"
2040 "--sharedstatedir=/var/com/aegis"
2041 ;; Uses the old 'throw()' specifier with 'new'
2042 ;; which changed in C++11.
2043 "CXXFLAGS=-std=c++03")
2044 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
2045 #:phases
2046 (modify-phases %standard-phases
2047 (add-before 'configure 'pre-conf
2048 (lambda _
2049 (substitute* (append '("configure"
2050 "etc/check-tar-gz.sh"
2051 "etc/patches.sh"
2052 "etc/test.sh"
2053 "script/aexver.in"
2054 "script/aebisect.in"
2055 "script/aeintegratq.in"
2056 "script/tkaegis.in"
2057 "script/test_funcs.in"
2058 "web/eg_oss_templ.sh"
2059 "web/webiface.html"
2060 "libaegis/getpw_cache.cc")
2061 (find-files "test" "\\.sh"))
2062 (("/bin/sh") (which "sh")))
2063 (setenv "SH" (which "sh"))
2064 #t))
2065 (replace 'check
2066 (lambda _
2067 (let ((home (string-append (getcwd) "/my-new-home")))
2068 ;; Some tests need to write to $HOME.
2069 (mkdir home)
2070 (setenv "HOME" home)
2071
2072 ;; This test assumes that flex has been symlinked to "lex".
2073 (substitute* "test/00/t0011a.sh"
2074 (("type lex") "type flex"))
2075
2076 ;; XXX Disable tests that fail, for unknown reasons, ‘for now’.
2077 (for-each
2078 (lambda (test) (substitute* "Makefile"
2079 (((string-append "test/" test "\\.ES ")) "")))
2080 (list "00/t0011a"
2081 "00/t0049a"
2082 "01/t0196a"))
2083
2084 ;; The author decided to call the check rule "sure".
2085 (invoke "make" "sure")))))))
2086 (home-page "https://sourceforge.net/projects/aegis/")
2087 (synopsis "Project change supervisor")
2088 (description "Aegis is a project change supervisor, and performs some of
2089 the Software Configuration Management needed in a CASE environment. Aegis
2090 provides a framework within which a team of developers may work on many
2091 changes to a program independently, and Aegis coordinates integrating these
2092 changes back into the master source of the program, with as little disruption
2093 as possible. Resolution of contention for source files, a major headache for
2094 any project with more than one developer, is one of Aegis's major functions.")
2095 (license license:gpl3+)))
2096
2097 (define-public reposurgeon
2098 (package
2099 (name "reposurgeon")
2100 (version "3.43")
2101 (source (origin
2102 (method url-fetch)
2103 (uri (string-append "http://www.catb.org/~esr/" name "/"
2104 name "-" version ".tar.xz"))
2105 (sha256
2106 (base32
2107 "1af0z14wcm4bk5a9ysinbwq2fp3lf5f7i8mvwh7286hr3fnagcaz"))
2108 (patches (search-patches
2109 "reposurgeon-add-missing-docbook-files.patch"))))
2110 (build-system gnu-build-system)
2111 (arguments
2112 `(#:make-flags
2113 (list "ECHO=echo"
2114 (string-append "target=" (assoc-ref %outputs "out")))
2115 #:phases
2116 (modify-phases %standard-phases
2117 (add-after 'unpack 'patch-inputs
2118 (lambda* (#:key inputs #:allow-other-keys)
2119 (let ((tzdata (assoc-ref inputs "tzdata")))
2120 (substitute* "reposurgeon"
2121 (("/usr/share/zoneinfo")
2122 (string-append tzdata "/share/zoneinfo")))
2123 (substitute* "test/svn-to-svn"
2124 (("/bin/echo") "echo"))
2125 #t)))
2126 (delete 'configure) ; no configure script
2127 (add-before 'build 'fix-docbook
2128 (lambda* (#:key inputs #:allow-other-keys)
2129 (substitute* (find-files "." "\\.xml$")
2130 (("docbook/docbookx.dtd")
2131 (string-append (assoc-ref inputs "docbook-xml")
2132 "/xml/dtd/docbook/docbookx.dtd")))
2133 #t))
2134 (add-before 'check 'set-up-test-environment
2135 (lambda* (#:key inputs #:allow-other-keys)
2136 (let ((tzdata (assoc-ref inputs "tzdata")))
2137 (setenv "TZDIR" (string-append tzdata "/share/zoneinfo"))
2138 #t)))
2139 (add-after 'install 'install-emacs-data
2140 (lambda* (#:key outputs #:allow-other-keys)
2141 (install-file "reposurgeon-mode.el"
2142 (string-append (assoc-ref outputs "out")
2143 "/share/emacs/site-lisp"))
2144 #t)))))
2145 (inputs
2146 `(("python" ,python-wrapper)
2147 ("tzdata" ,tzdata)))
2148 (native-inputs
2149 `( ;; For building documentation.
2150 ("asciidoc" ,asciidoc)
2151 ("docbook-xml" ,docbook-xml)
2152 ("docbook-xsl" ,docbook-xsl)
2153 ("libxml2" ,libxml2)
2154 ("xmlto" ,xmlto)
2155
2156 ;; For tests.
2157 ("cvs" ,cvs)
2158 ("git" ,git)
2159 ("mercurial" ,mercurial)
2160 ("subversion" ,subversion)))
2161 (home-page "http://www.catb.org/~esr/reposurgeon/")
2162 (synopsis "Edit version-control repository history")
2163 (description "Reposurgeon enables risky operations that version-control
2164 systems don't want to let you do, such as editing past comments and metadata
2165 and removing commits. It works with any version control system that can
2166 export and import Git fast-import streams, including Git, Mercurial, Fossil,
2167 Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly
2168 and can thus be used to script production of very high-quality conversions
2169 from Subversion to any supported Distributed Version Control System (DVCS).")
2170 ;; Most files are distributed under bsd-2, except 'repocutter' which is
2171 ;; under bsd-3.
2172 (license (list license:bsd-2 license:bsd-3))))
2173
2174 (define-public tig
2175 (package
2176 (name "tig")
2177 (version "2.5.1")
2178 (source (origin
2179 (method url-fetch)
2180 (uri (string-append
2181 "https://github.com/jonas/tig/releases/download/tig-"
2182 version "/tig-" version ".tar.gz"))
2183 (sha256
2184 (base32
2185 "0r4y9hyvpkplaxrzslws3asz652d83qh3bjwvmp8assga8s5s3ah"))))
2186 (build-system gnu-build-system)
2187 (native-inputs
2188 `(("asciidoc" ,asciidoc)
2189 ("xmlto" ,xmlto)))
2190 (inputs
2191 `(("ncurses" ,ncurses)
2192 ("readline" ,readline)))
2193 (arguments
2194 `(#:phases
2195 (modify-phases %standard-phases
2196 (add-after 'install 'install-doc
2197 (lambda _
2198 (invoke "make" "install-doc"))))
2199 #:test-target "test"
2200 #:tests? #f)) ; tests require access to /dev/tty
2201 (home-page "https://jonas.github.io/tig/")
2202 (synopsis "Ncurses-based text user interface for Git")
2203 (description
2204 "Tig is an ncurses text user interface for Git, primarily intended as
2205 a history browser. It can also stage hunks for commit, or colorize the
2206 output of the @code{git} command.")
2207 (license license:gpl2+)))
2208
2209 (define-public findnewest
2210 (package
2211 (name "findnewest")
2212 (version "0.3")
2213 (source
2214 (origin
2215 (method git-fetch)
2216 (uri (git-reference
2217 (url "https://github.com/0-wiz-0/findnewest")
2218 (commit (string-append "findnewest-" version))))
2219 (file-name (git-file-name name version))
2220 (sha256
2221 (base32 "1x1cbn2b27h5r0ah5xc06fkalfdci2ngrgd4wibxjw0h88h0nvgq"))))
2222 (build-system gnu-build-system)
2223 (native-inputs `(("autoconf" ,autoconf)
2224 ("automake" ,automake)))
2225 (home-page "https://github.com/0-wiz-0/findnewest/releases")
2226 (synopsis "Print the modification time of the latest file")
2227 (description
2228 "Recursively find the newest file in a file tree and print its
2229 modification time.")
2230 (license license:bsd-2)))
2231
2232 (define-public myrepos
2233 (package
2234 (name "myrepos")
2235 (version "1.20180726")
2236 (source
2237 (origin
2238 (method git-fetch)
2239 (uri (git-reference
2240 (url "git://myrepos.branchable.com/myrepos")
2241 (commit version)))
2242 (file-name (string-append name "-" version "-checkout"))
2243 (sha256
2244 (base32 "0jphw61plm8cgklja6hs639xhdvxgvjwbr6jpvjwpp7hc5gmhms5"))))
2245 (build-system gnu-build-system)
2246 (arguments
2247 '(#:test-target "test"
2248 #:make-flags (list (string-append "PREFIX=" %output))
2249 #:phases
2250 (modify-phases %standard-phases
2251 (delete 'configure)
2252 (add-after 'install 'wrap-webcheckout
2253 (lambda* (#:key inputs outputs #:allow-other-keys)
2254 (let ((out (assoc-ref outputs "out")))
2255 (wrap-program (string-append out "/bin/webcheckout")
2256 `("PERL5LIB" ":" prefix
2257 ,(map (lambda (i) (string-append (assoc-ref inputs i)
2258 "/lib/perl5/site_perl"))
2259 '("perl-encode-locale" "perl-http-date"
2260 "perl-http-message" "perl-html-parser" "perl-libwww"
2261 "perl-uri" "perl-try-tiny"))))
2262 #t))))))
2263 (inputs
2264 `(("perl" ,perl)
2265 ("perl-encode-locale" ,perl-encode-locale)
2266 ("perl-html-parser" ,perl-html-parser)
2267 ("perl-http-date" ,perl-http-date)
2268 ("perl-http-message" ,perl-http-message)
2269 ("perl-libwww" ,perl-libwww)
2270 ("perl-try-tiny" ,perl-try-tiny)
2271 ("perl-uri" ,perl-uri)))
2272 (home-page "https://myrepos.branchable.com/")
2273 (synopsis "Multiple repository management tool")
2274 (description
2275 "Myrepos provides the @code{mr} command, which maps an operation (e.g.,
2276 fetching updates) over a collection of version control repositories. It
2277 supports a large number of version control systems: Git, Subversion,
2278 Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
2279 (license license:gpl2+)))
2280
2281 (define-public grokmirror
2282 (package
2283 (name "grokmirror")
2284 (version "2.0.5")
2285 (source
2286 (origin
2287 (method git-fetch)
2288 (uri (git-reference
2289 (url (string-append "https://git.kernel.org/pub/scm/"
2290 "utils/grokmirror/grokmirror.git"))
2291 (commit (string-append "v" version))))
2292 (file-name (string-append name "-" version "-checkout"))
2293 (sha256
2294 (base32 "006ar3kc6fw1sq300ar9np4a63qzzsdama6cv30wh65v5mqw1mnv"))))
2295 (build-system python-build-system)
2296 (arguments
2297 `(#:tests? #f ; no test suite
2298 #:phases
2299 (modify-phases %standard-phases
2300 (add-after 'install 'install-manpages
2301 (lambda* (#:key outputs #:allow-other-keys)
2302 (let* ((man (string-append (assoc-ref outputs "out")
2303 "/man/man1/")))
2304 (mkdir-p man)
2305 (for-each (lambda (file) (install-file file man))
2306 (find-files "." "\\.1$")))
2307 #t)))))
2308 (propagated-inputs
2309 `(("python-packaging" ,python-packaging)
2310 ("python-requests" ,python-requests)))
2311 (home-page
2312 "https://git.kernel.org/pub/scm/utils/grokmirror/grokmirror.git")
2313 (synopsis "Framework to smartly mirror git repositories")
2314 (description "Grokmirror enables replicating large git repository
2315 collections efficiently. Mirrors decide to clone and update repositories
2316 based on a manifest file published by servers.")
2317 (license license:gpl3+)))
2318
2319 (define-public b4
2320 (package
2321 (name "b4")
2322 (version "0.6.1")
2323 (source
2324 (origin
2325 (method url-fetch)
2326 (uri (pypi-uri "b4" version))
2327 (sha256
2328 (base32 "01qid6mvddikcdpf2ihsyn8x3z5j2n64g0ip9pqbx42hrc50pmcz"))))
2329 (build-system python-build-system)
2330 (arguments '(#:tests? #f)) ; No tests.
2331 (inputs
2332 `(("python-dkimpy" ,python-dkimpy)
2333 ("python-dnspython" ,python-dnspython)
2334 ("python-requests" ,python-requests)))
2335 (home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git")
2336 (synopsis "Tool for working with patches in public-inbox archives")
2337 (description
2338 "The @code{b4} command is designed to make it easier to participate in
2339 patch-based workflows for projects that have public-inbox archives.
2340
2341 Features include:
2342 @itemize
2343 @item downloading a thread's mbox given a message ID
2344 @item processing an mbox so that is ready to be fed to @code{git-am}
2345 @item creating templated replies for processed patches and pull requests
2346 @item submitting cryptographic attestation for patches.
2347 @end itemize")
2348 (license license:gpl2+)))
2349
2350 (define-public git-annex-remote-rclone
2351 (package
2352 (name "git-annex-remote-rclone")
2353 (version "0.6")
2354 (source
2355 (origin
2356 (method git-fetch)
2357 (uri (git-reference
2358 (url "https://github.com/DanielDent/git-annex-remote-rclone")
2359 (commit (string-append "v" version))))
2360 (file-name (git-file-name name version))
2361 (sha256
2362 (base32
2363 "0j0hlxji8d974fq7zd4xc02n0jpi31ylhxc7z4zp8iiwad5mkpxp"))))
2364 (build-system trivial-build-system)
2365 (arguments
2366 `(#:modules ((guix build utils))
2367 #:builder
2368 (begin
2369 (use-modules (guix build utils))
2370 (let ((bash (string-append (assoc-ref %build-inputs "bash")
2371 "/bin/bash"))
2372 (rclone (string-append (assoc-ref %build-inputs "rclone")
2373 "/bin/rclone")))
2374 (copy-file (string-append (assoc-ref %build-inputs "source")
2375 "/git-annex-remote-rclone")
2376 "git-annex-remote-rclone")
2377 (substitute* "git-annex-remote-rclone"
2378 (("/bin/bash") bash)
2379 (("runcmd rclone") (string-append "runcmd " rclone)))
2380 (install-file "git-annex-remote-rclone"
2381 (string-append %output "/bin"))
2382 #t))))
2383 (inputs
2384 `(("bash" ,bash)
2385 ("rclone" ,rclone)))
2386 (home-page "https://github.com/DanielDent/git-annex-remote-rclone")
2387 (synopsis "Use rclone-supported cloud storage providers with git-annex")
2388 (description "This wrapper around rclone makes any destination supported
2389 by rclone usable with git-annex.")
2390 (license license:gpl3+)))
2391
2392 (define-public fossil
2393 (package
2394 (name "fossil")
2395 (version "2.11")
2396 (source
2397 (origin
2398 (method url-fetch)
2399 (uri (string-append
2400 "https://www.fossil-scm.org/index.html/uv/"
2401 "fossil-src-" version ".tar.gz"))
2402 (sha256
2403 (base32 "0c9nzx42wxfmym9vf1pnbdb1c7gp7a7zqky60izxsph7w2xh8nix"))
2404 (modules '((guix build utils)))
2405 (snippet
2406 '(begin
2407 (delete-file-recursively "compat") #t))))
2408 (build-system gnu-build-system)
2409 (native-inputs
2410 `(("tcl" ,tcl) ;for configuration only
2411 ("which" ,which) ;for tests only
2412 ("ed" ,ed))) ;ditto
2413 (inputs
2414 `(("openssl" ,openssl)
2415 ("zlib" ,zlib)
2416 ("sqlite" ,sqlite)))
2417 (arguments
2418 `(#:configure-flags (list "--with-openssl=auto"
2419 "--disable-internal-sqlite")
2420 #:test-target "test"
2421 #:phases (modify-phases %standard-phases
2422 (add-after 'patch-source-shebangs 'patch-sh
2423 (lambda _
2424 (substitute* '("auto.def")
2425 (("/bin/sh") (which "sh")))
2426 #t))
2427 (replace 'configure
2428 (lambda* (#:key outputs (configure-flags '())
2429 #:allow-other-keys)
2430 ;; The 'configure' script is not an autoconf script and
2431 ;; chokes on unrecognized options.
2432 (apply invoke
2433 "./configure"
2434 (string-append "--prefix="
2435 (assoc-ref outputs "out"))
2436 configure-flags)
2437 #t))
2438 (add-before 'check 'test-setup
2439 (lambda _
2440 (setenv "USER" "guix")
2441 (setenv "TZ" "UTC")
2442 #t)))))
2443 (home-page "https://fossil-scm.org")
2444 (synopsis "Software configuration management system")
2445 (description
2446 "Fossil is a distributed source control management system which supports
2447 access and administration over HTTP CGI or via a built-in HTTP server. It has
2448 a built-in wiki, built-in file browsing, built-in tickets system, etc.")
2449 (license (list license:public-domain ;src/miniz.c, src/shell.c
2450 license:bsd-2))))
2451
2452 (define-public stagit
2453 (package
2454 (name "stagit")
2455 (version "0.7.2")
2456 (source (origin
2457 (method url-fetch)
2458 (uri (string-append "https://dl.2f30.org/releases/"
2459 name "-" version ".tar.gz"))
2460 (sha256
2461 (base32
2462 "1m3s9g1z9szbjrhm8sic91xh6f2bfpi56rskdkqd5wc4wdycpyi5"))))
2463 (build-system gnu-build-system)
2464 (arguments
2465 `(#:tests? #f ; No tests
2466 #:make-flags (list "CC=gcc"
2467 (string-append "PREFIX=" %output))
2468 #:phases
2469 (modify-phases %standard-phases
2470 (delete 'configure)))) ; No configure script
2471 (inputs
2472 `(("libgit2" ,libgit2)))
2473 (home-page "https://2f30.org/")
2474 (synopsis "Static git page generator")
2475 (description "Stagit creates static pages for git repositories, the results can
2476 be served with a HTTP file server of your choice.")
2477 (license license:expat)))
2478
2479 (define-public gource
2480 (package
2481 (name "gource")
2482 (version "0.51")
2483 (source (origin
2484 (method url-fetch)
2485 (uri (string-append
2486 "https://github.com/acaudwell/Gource/releases/download"
2487 "/gource-" version "/gource-" version ".tar.gz"))
2488 (sha256
2489 (base32
2490 "16p7b1x4r0915w883lp374jcdqqja37fnb7m8vnsfnl2n64gi8qr"))))
2491 (build-system gnu-build-system)
2492 (arguments
2493 `(#:configure-flags
2494 (list (string-append "--with-boost-libdir="
2495 (assoc-ref %build-inputs "boost")
2496 "/lib"))))
2497 (native-inputs
2498 `(("pkg-config" ,pkg-config)))
2499 (inputs
2500 `(("boost" ,boost)
2501 ("ftgl" ,ftgl)
2502 ("glew" ,glew)
2503 ("glm" ,glm)
2504 ("glu" ,glu)
2505 ("libpng" ,libpng)
2506 ("mesa" ,mesa)
2507 ("pcre" ,pcre)
2508 ("sdl-union" ,(sdl-union (list sdl2 sdl2-image)))))
2509 (home-page "https://gource.io/")
2510 (synopsis "3D visualisation tool for source control repositories")
2511 (description "@code{gource} provides a software version control
2512 visualization. The repository is displayed as a tree where the root of the
2513 repository is the centre, directories are branches and files are leaves.
2514 Contributors to the source code appear and disappear as they contribute to
2515 specific files and directories.")
2516 (license license:gpl3+)))
2517
2518 (define-public src
2519 (package
2520 (name "src")
2521 (version "1.18")
2522 (source (origin
2523 (method url-fetch)
2524 (uri (string-append
2525 "http://www.catb.org/~esr/src/src-" version ".tar.gz"))
2526 (sha256
2527 (base32
2528 "0n0skhvya8w2az45h2gsafxy8m2mvqas64nrgxifcmrzfv0rf26c"))))
2529 (build-system gnu-build-system)
2530 (arguments
2531 '(#:make-flags
2532 (list (string-append "prefix=" (assoc-ref %outputs "out")))
2533 #:phases
2534 (modify-phases %standard-phases
2535 (delete 'configure) ; no 'configure' script
2536 (add-after 'install 'wrap-program
2537 (lambda* (#:key inputs outputs #:allow-other-keys)
2538 (let* ((out (assoc-ref outputs "out"))
2539 (prog (string-append out "/bin/src"))
2540 (rcs (assoc-ref inputs "rcs")))
2541 (wrap-program prog
2542 `("PATH" ":" prefix (,(string-append rcs "/bin"))))
2543 #t)))
2544 (replace 'check
2545 (lambda _
2546 (setenv "HOME" (getenv "TMPDIR"))
2547 (invoke "git" "config" "--global" "user.name" "guix")
2548 (invoke "git" "config" "--global" "user.email" "guix")
2549 (invoke "./srctest"))))))
2550 (native-inputs
2551 ;; For testing.
2552 `(("git" ,git)
2553 ("perl" ,perl)))
2554 (inputs
2555 `(("python" ,python-wrapper)
2556 ("rcs" ,rcs)))
2557 (synopsis "Simple revision control")
2558 (home-page "http://www.catb.org/~esr/src/")
2559 (description
2560 "SRC (or src) is simple revision control, a version-control system for
2561 single-file projects by solo developers and authors. It modernizes the
2562 venerable RCS, hence the anagrammatic acronym. The design is tuned for use
2563 cases like all those little scripts in your @file{~/bin} directory, or a
2564 directory full of HOWTOs.")
2565 (license license:bsd-2)))
2566
2567 (define-public git-when-merged
2568 ;; Use an unreleased version to get a PY3 compatibility fix.
2569 (let ((commit "ab6af7865a0ba55ba364a6c507e0be6f84f31c6d"))
2570 (package
2571 (name "git-when-merged")
2572 (version (string-append "1.2.0-" (string-take commit 7)))
2573 (source (origin
2574 (method git-fetch)
2575 (uri (git-reference
2576 (url "https://github.com/mhagger/git-when-merged/")
2577 (commit commit)))
2578 (file-name (git-file-name name version))
2579 (sha256
2580 (base32
2581 "0iyk2psf97bc9h43m89p3xjmm79fsx99i7px29g4lcnmdy5kmz0p"))))
2582 (build-system gnu-build-system)
2583 (arguments
2584 `(#:tests? #f ; there are no tests
2585 #:phases
2586 (modify-phases %standard-phases
2587 (delete 'configure)
2588 (delete 'build)
2589 (replace 'install
2590 (lambda* (#:key outputs #:allow-other-keys)
2591 (install-file "bin/git-when-merged"
2592 (string-append (assoc-ref outputs "out")
2593 "/bin"))
2594 #t))
2595 (add-before 'install 'patch-git
2596 (lambda* (#:key inputs #:allow-other-keys)
2597 (let ((git (string-append (assoc-ref inputs "git")
2598 "/bin/git")))
2599 (substitute* "bin/git-when-merged"
2600 (("'git'") (string-append "'" git "'")))
2601 #t)))
2602 (add-after 'install 'wrap-script
2603 (lambda* (#:key outputs #:allow-other-keys)
2604 (wrap-program (string-append (assoc-ref outputs "out")
2605 "/bin/git-when-merged")
2606 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2607 #t)))))
2608 (inputs
2609 `(("git" ,git)
2610 ("python" ,python-wrapper)))
2611 (home-page "https://github.com/mhagger/git-when-merged")
2612 (synopsis "Determine when a commit was merged into a Git branch")
2613 (description "This Git extension defines a subcommand,
2614 @code{when-merged}, whose core operation is to find the merge that brought a
2615 given commit into the specified ref(s). It has various options that control
2616 how information about the merge is displayed.")
2617 (license license:gpl2+))))
2618
2619 (define-public git-imerge
2620 (package
2621 (name "git-imerge")
2622 (version "1.1.0")
2623 (source
2624 (origin
2625 (method git-fetch)
2626 (uri (git-reference
2627 (url "https://github.com/mhagger/git-imerge")
2628 (commit (string-append "v" version))))
2629 (file-name (git-file-name name version))
2630 (sha256
2631 (base32 "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4"))))
2632 (build-system gnu-build-system)
2633 (arguments
2634 `(#:tests? #f ; only manual test scripts
2635 #:make-flags (list (string-append "DESTDIR=" %output)
2636 "PREFIX=")
2637 #:phases
2638 (modify-phases %standard-phases
2639 (delete 'configure)
2640 (add-before 'install 'patch-git
2641 (lambda* (#:key inputs #:allow-other-keys)
2642 (let ((git (string-append (assoc-ref inputs "git")
2643 "/bin/git")))
2644 (substitute* "git-imerge"
2645 (("'git'") (string-append "'" git "'")))
2646 #t)))
2647 (add-after 'install 'wrap-script
2648 (lambda* (#:key outputs #:allow-other-keys)
2649 (wrap-program (string-append (assoc-ref outputs "out")
2650 "/bin/git-imerge")
2651 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2652 #t)))))
2653 (inputs
2654 `(("git" ,git)
2655 ("python" ,python-wrapper)))
2656 (home-page "https://github.com/mhagger/git-imerge")
2657 (synopsis "Incremental merge for Git")
2658 (description "This Git extension defines a subcommand, @code{imerge},
2659 which performs an incremental merge between two branches. Its two primary
2660 design goals are to reduce the pain of resolving merge conflicts by finding
2661 the smallest possible conflicts and to allow a merge to be saved, tested,
2662 interrupted, published, and collaborated on while in progress.")
2663 (license license:gpl2+)))
2664
2665 (define-public git-lfs
2666 (package
2667 (name "git-lfs")
2668 (version "2.11.0")
2669 (source (origin
2670 (method git-fetch)
2671 (uri (git-reference
2672 (url "https://github.com/git-lfs/git-lfs")
2673 (commit (string-append "v" version))))
2674 (file-name (git-file-name name version))
2675 (sha256
2676 (base32
2677 "05qd96bn2cl7gn5qarbcv6scdpj28qiwdfzalamqk5jjiidpmng5"))))
2678 (build-system go-build-system)
2679 (arguments
2680 `(#:import-path "github.com/git-lfs/git-lfs"
2681 #:install-source? #f
2682 #:phases
2683 (modify-phases %standard-phases
2684 (add-before 'build 'man-gen
2685 ;; Without this, the binary generated in 'build
2686 ;; phase won't have any embedded usage-text.
2687 (lambda _
2688 (with-directory-excursion "src/github.com/git-lfs/git-lfs"
2689 (invoke "make" "mangen"))))
2690 (add-after 'build 'build-man-pages
2691 (lambda _
2692 (with-directory-excursion "src/github.com/git-lfs/git-lfs"
2693 (invoke "make" "man"))
2694 #t))
2695 (add-after 'install 'install-man-pages
2696 (lambda _
2697 (with-directory-excursion "src/github.com/git-lfs/git-lfs/man"
2698 (let ((out (assoc-ref %outputs "out")))
2699 (for-each
2700 (lambda (manpage)
2701 (install-file manpage (string-append out "/share/man/man1")))
2702 (find-files "." "^git-lfs.*\\.1$"))))
2703 #t)))))
2704 ;; make `ronn` available during build for man page generation
2705 (native-inputs `(("ronn-ng" ,ronn-ng)))
2706 (home-page "https://git-lfs.github.com/")
2707 (synopsis "Git extension for versioning large files")
2708 (description
2709 "Git Large File Storage (LFS) replaces large files such as audio samples,
2710 videos, datasets, and graphics with text pointers inside Git, while storing the
2711 file contents on a remote server.")
2712 (license license:expat)))
2713
2714 (define-public git-open
2715 (package
2716 (name "git-open")
2717 (version "2.1.0")
2718 (source
2719 (origin
2720 (method git-fetch)
2721 (uri (git-reference
2722 (url "https://github.com/paulirish/git-open")
2723 (commit (string-append "v" version))))
2724 (file-name (git-file-name name version))
2725 (sha256
2726 (base32 "11n46bngvca5wbdbfcxzjhjbfdbad7sgf7h9gf956cb1q8swsdm0"))))
2727 (build-system copy-build-system)
2728 (inputs
2729 `(("xdg-utils" ,xdg-utils)))
2730 (arguments
2731 `(#:phases
2732 (modify-phases %standard-phases
2733 (add-after 'install 'wrap-program
2734 (lambda* (#:key outputs inputs #:allow-other-keys)
2735 (let ((out (assoc-ref outputs "out"))
2736 (xdg-utils (assoc-ref inputs "xdg-utils")))
2737 (wrap-program (string-append out "/bin/git-open")
2738 `("PATH" ":" prefix (,(string-append xdg-utils "/bin"))))))))
2739 #:install-plan
2740 '(("git-open" "bin/git-open"))))
2741 (home-page "https://github.com/paulirish/git-open")
2742 (synopsis "Open a Git repository's homepage from the command-line")
2743 (description
2744 "@code{git open} opens the repository's website from the command-line,
2745 guessing the URL pattern from the @code{origin} remote.")
2746 (license license:expat)))
2747
2748 (define-public tla
2749 (package
2750 (name "gnu-arch")
2751 (version "1.3.5")
2752 (source (origin
2753 (method url-fetch)
2754 (uri (string-append "https://ftp.gnu.org/old-gnu/gnu-arch/"
2755 "tla-" version ".tar.gz"))
2756 (sha256
2757 (base32
2758 "01mfzj1i6p4s8191cgd5850hds1zls88hkf9rb6qx1vqjv585aj0"))
2759 (modules '((guix build utils)))
2760 (snippet
2761 '(begin
2762 ;; In tar 1.32, '--preserve' is ambiguous and leads to an
2763 ;; error, so address that.
2764 (substitute* "src/tla/libarch/archive.c"
2765 (("\"--preserve\"")
2766 "\"--preserve-permissions\""))
2767 #t))))
2768 (build-system gnu-build-system)
2769 (arguments
2770 '(#:phases (modify-phases %standard-phases
2771 (replace 'configure
2772 (lambda* (#:key inputs outputs #:allow-other-keys)
2773 (let ((out (assoc-ref outputs "out")))
2774 (chdir "src")
2775
2776 (mkdir "=build")
2777 (chdir "=build")
2778
2779 ;; For libneon's 'configure' script.
2780 ;; XXX: There's a bundled copy of neon.
2781 (setenv "CONFIG_SHELL" (which "sh"))
2782
2783 (invoke "../configure" "--prefix" out
2784 "--config-shell" (which "sh")
2785 "--with-posix-shell" (which "sh")
2786 "--with-cc" "gcc")))))
2787
2788
2789 ;; There are build failures when building in parallel.
2790 #:parallel-build? #f
2791 #:parallel-tests? #f
2792
2793 #:test-target "test"))
2794 (native-inputs
2795 `(("which" ,which)))
2796 (synopsis "Historical distributed version-control system")
2797 (description
2798 "GNU Arch, aka. @code{tla}, was one of the first free distributed
2799 version-control systems (DVCS). It saw its last release in 2006. This
2800 package is provided for users who need to recover @code{tla} repositories and
2801 for historians.")
2802 (home-page "https://www.gnu.org/software/gnu-arch/")
2803 (license license:gpl2))) ;version 2 only
2804
2805 (define-public diff-so-fancy
2806 (package
2807 (name "diff-so-fancy")
2808 (version "1.3.0")
2809 (source (origin
2810 (method git-fetch)
2811 (uri (git-reference
2812 (url "https://github.com/so-fancy/diff-so-fancy")
2813 (commit (string-append "v" version))))
2814 (file-name (git-file-name name version))
2815 (sha256
2816 (base32
2817 "0aavxahzha2mms4vdwysk79pa6wzswpfwgsq2hwaxnaf66maahfl"))))
2818 (inputs
2819 `(("perl" ,perl)
2820 ("ncurses" ,ncurses)))
2821 (build-system copy-build-system)
2822 (arguments
2823 '(#:phases
2824 (modify-phases %standard-phases
2825 (add-after 'unpack 'patch-lib-path
2826 (lambda* (#:key outputs #:allow-other-keys)
2827 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2828 (substitute* "diff-so-fancy"
2829 (("use lib.*$")
2830 (string-append "use lib '" lib "';\n")))
2831 #t)))
2832 (add-after 'install 'symlink-executable
2833 (lambda* (#:key outputs inputs #:allow-other-keys)
2834 (let ((out (assoc-ref outputs "out"))
2835 (ncurses (assoc-ref inputs "ncurses"))
2836 (perl (assoc-ref inputs "perl")))
2837 (wrap-program (string-append out "/bin/diff-so-fancy")
2838 `("PATH" ":" prefix (,(string-append ncurses "/bin")
2839 ,(string-append perl "/bin"))))
2840 #t))))
2841 #:install-plan
2842 '(("lib" "lib")
2843 ("diff-so-fancy" "bin/"))))
2844 (home-page "https://github.com/so-fancy/diff-so-fancy")
2845 (synopsis "Makes diffs more human friendly and readable")
2846 (description
2847 "@code{diff-so-fancy} strives to make your diffs human readable instead
2848 of machine readable. This helps improve code quality and helps you spot
2849 defects faster.")
2850 (license license:expat)))
2851
2852 (define-public go-github-go-git
2853 (package
2854 (name "go-github-go-git")
2855 (version "5.1.0")
2856 (source (origin
2857 (method git-fetch)
2858 (uri (git-reference
2859 (url "https://github.com/go-git/go-git")
2860 (commit (string-append "v" version))))
2861 (file-name (git-file-name name version))
2862 (sha256
2863 (base32
2864 "1vkcmhh2qq8c38sjbnzf0wvg2rzr19wssaq177bsvrjwj1xz1qbs"))))
2865 (build-system go-build-system)
2866 (arguments
2867 `(#:tests? #f ;requires network connection
2868 #:import-path "github.com/go-git/go-git/v5"
2869 #:phases
2870 (modify-phases %standard-phases
2871 (add-before 'build 'setup
2872 (lambda* (#:key inputs #:allow-other-keys)
2873 (let* ((git (assoc-ref inputs "git"))
2874 (git-bin (string-append (assoc-ref inputs "git") "/bin"))
2875 (git-exe (string-append git-bin "/git")))
2876 (setenv "GIT_DIST_PATH=" git)
2877 (setenv "GIT_EXEC_PATH=" git-bin)
2878 (setenv "HOME" (getcwd))
2879 (invoke git-exe "config" "--global" "user.email" "gha@example.com")
2880 (invoke git-exe "config" "--global" "user.name" "GitHub Actions")
2881 #t)
2882 #t)))))
2883 (native-inputs
2884 `(("go-github-com-emirpasic-gods" ,go-github-com-emirpasic-gods)
2885 ("go-github-com-go-git-gcfg" ,go-github-com-go-git-gcfg)
2886 ("go-github-com-go-git-go-billy" ,go-github-com-go-git-go-billy)
2887 ("go-github-com-imdario-mergo" ,go-github-com-imdario-mergo)
2888 ("go-github-com-jbenet-go-context" ,go-github-com-jbenet-go-context)
2889 ("go-github-com-kevinburke-ssh-config" ,go-github-com-kevinburke-ssh-config)
2890 ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
2891 ("go-github-com-sergi-go-diff" ,go-github-com-sergi-go-diff)
2892 ("go-github-com-xanzy-ssh-agentf" ,go-github-com-xanzy-ssh-agent)
2893 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
2894 ("go-golang-org-x-net" ,go-golang-org-x-net)
2895 ("go-gopkg-in-warnings" ,go-gopkg-in-warnings)
2896 ("go-github-com-go-git-go-git-fixtures" ,go-github-com-go-git-go-git-fixtures)
2897 ("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)
2898 ("go-github-com-alcortesm-tgz" ,go-github-com-alcortesm-tgz)
2899 ("go-golang-org-x-text" ,go-golang-org-x-text)
2900 ("git" ,git)))
2901 (home-page "https://github.com/go-git/")
2902 (synopsis "Git implementation library")
2903 (description "This package provides a Git implementation library.")
2904 (license license:asl2.0)))
2905
2906 (define-public gita
2907 (let ((commit "62eb3d69874f75bdd6f95743e57315bc59890f70")
2908 (revision "1"))
2909 (package
2910 (name "gita")
2911 (version (git-version "0.10.10" revision commit))
2912 (source (origin
2913 (method git-fetch)
2914 (uri (git-reference
2915 (url "https://github.com/nosarthur/gita")
2916 (commit commit)))
2917 (file-name (git-file-name name version))
2918 (sha256
2919 (base32
2920 "1jn5wnmjbdrrgz9fif7s81pv3g92q0wjcqy5qxl77kjy7iv0kpfp"))))
2921 (build-system python-build-system)
2922 (native-inputs
2923 `(("git" ,git) ;for tests
2924 ("python-pytest" ,python-pytest)))
2925 (propagated-inputs
2926 `(("python-pyyaml" ,python-pyyaml)))
2927 (arguments
2928 `(#:phases
2929 (modify-phases %standard-phases
2930 (replace 'check
2931 (lambda* (#:key inputs outputs #:allow-other-keys)
2932 (substitute* "tests/test_main.py"
2933 (("'gita\\\\n'") "'source\\n'")
2934 (("'gita'") "'source'"))
2935 (invoke (string-append (assoc-ref inputs "git") "/bin/git")
2936 "init")
2937 (add-installed-pythonpath inputs outputs)
2938 (invoke (string-append (assoc-ref inputs "python-pytest")
2939 "/bin/pytest")
2940 "-vv" "tests")))
2941 (add-after 'install 'install-shell-completions
2942 (lambda* (#:key outputs #:allow-other-keys)
2943 (let* ((out (assoc-ref outputs "out"))
2944 (bash-completion (string-append out "/etc/bash_completion.d"))
2945 (zsh-completion (string-append out "/etc/zsh/site-functions")))
2946 (mkdir-p bash-completion)
2947 (copy-file ".gita-completion.bash"
2948 (string-append bash-completion "/gita"))
2949 (mkdir-p zsh-completion)
2950 (copy-file ".gita-completion.zsh"
2951 (string-append zsh-completion "/_gita"))))))))
2952 (home-page "https://github.com/nosarthur/gita")
2953 (synopsis "Command-line tool to manage multiple Git repos")
2954 (description "This package provides a command-line tool to manage
2955 multiple Git repos.
2956
2957 This tool does two things:
2958 @itemize
2959 @item display the status of multiple Git repos such as branch, modification,
2960 commit message side by side
2961 @item (batch) delegate Git commands/aliases from any working directory
2962 @end itemize
2963
2964 If several repos are related, it helps to see their status together.")
2965 (license license:expat))))