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