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