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