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