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