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