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, 2020 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.27.0")
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 "1ybk39ylvs32lywq7ra4l2kdr5izc80r9461hwfnw8pssxs9gjkk"))))
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 "176lkcfhjhqin2w8s814j9wwcian9jr6xx6xzn35i5scn14spjz6"))))
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\\)")
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)")))
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.1")
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 "0nlg35pxhh548nn7aa3y1m81mf81nkbzz86i2psps4f474n497v8"))
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")
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")
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")
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")
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")
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")
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.14.0")
1573 (source (origin
1574 (method url-fetch)
1575 (uri (string-append "mirror://apache/subversion/"
1576 "subversion-" version ".tar.bz2"))
1577 (sha256
1578 (base32
1579 "00i1f88snlpcnsycpn6r315h6792l5nkr2p5k6kq6yprz4cf5a3b"))))
1580 (build-system gnu-build-system)
1581 (arguments
1582 '(#:parallel-tests? #f ; TODO Seems to cause test failures on
1583 ; i686-linux
1584 #:configure-flags '("--enable-static=no")
1585 #:phases
1586 (modify-phases %standard-phases
1587 (add-after 'configure 'patch-libtool-wrapper-ls
1588 (lambda* (#:key inputs #:allow-other-keys)
1589 ;; This substitution allows tests svnauthz_tests and svnlook_tests
1590 ;; to pass. These tests execute svnauthz and svnlook through
1591 ;; their libtool wrapper scripts from svn hooks, whose empty
1592 ;; environments cause "ls: command not found" errors. It would be
1593 ;; nice if this fix ultimately made its way into libtool.
1594 (let ((coreutils (assoc-ref inputs "coreutils")))
1595 (substitute* "libtool"
1596 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))
1597 #t)))
1598 (add-before 'build 'patch-test-sh
1599 (lambda _
1600 (substitute* "subversion/tests/libsvn_repos/repos-test.c"
1601 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1602 #t))
1603 (add-before 'check 'set-PARALLEL
1604 (lambda* (#:key parallel-tests? #:allow-other-keys)
1605 (if parallel-tests?
1606 (setenv "PARALLEL" (number->string (parallel-job-count)))
1607 (simple-format #t "parallel-tests? are disabled\n"))
1608 #t))
1609 (add-after 'install 'install-perl-bindings
1610 (lambda* (#:key outputs #:allow-other-keys)
1611 ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
1612 (let ((out (assoc-ref outputs "out")))
1613 (invoke "make" "swig-pl-lib")
1614 ;; FIXME: Test failures.
1615 ;; (invoke "make" "check-swig-pl")
1616 (invoke "make" "install-swig-pl-lib")
1617
1618 ;; Set the right installation prefix.
1619 (with-directory-excursion
1620 "subversion/bindings/swig/perl/native"
1621 (invoke "perl" "Makefile.PL"
1622 "NO_PERLLOCAL=1"
1623 (string-append "PREFIX=" out))
1624 (invoke "make" "install"
1625 (string-append "OTHERLDFLAGS="
1626 "-Wl,-rpath="
1627 out "/lib")))))))))
1628 (native-inputs
1629 `(("pkg-config" ,pkg-config)
1630 ;; For the Perl bindings.
1631 ("swig" ,swig)))
1632 (inputs
1633 `(("apr" ,apr)
1634 ("apr-util" ,apr-util)
1635 ("lz4" ,lz4)
1636 ("serf" ,serf)
1637 ("perl" ,perl)
1638 ("python" ,python-wrapper)
1639 ("sqlite" ,sqlite)
1640 ("utf8proc" ,utf8proc)
1641 ("zlib" ,zlib)))
1642 (home-page "https://subversion.apache.org/")
1643 (synopsis "Revision control system")
1644 (description
1645 "@dfn{Subversion} (svn) exists to be recognized and adopted as a
1646 centralized version control system characterized by its
1647 reliability as a safe haven for valuable data; the simplicity of its model and
1648 usage; and its ability to support the needs of a wide variety of users and
1649 projects, from individuals to large-scale enterprise operations.")
1650 (license license:asl2.0)))
1651
1652 (define-public rcs
1653 (package
1654 (name "rcs")
1655 (version "5.9.4")
1656 (source (origin
1657 (method url-fetch)
1658 (uri (string-append "mirror://gnu/rcs/rcs-"
1659 version ".tar.xz"))
1660 (sha256
1661 (base32
1662 "1zsx7bb0rgvvvisiy4zlixf56ay8wbd9qqqcp1a1g0m1gl6mlg86"))
1663 (patches (search-patches "rcs-5.9.4-noreturn.patch"))))
1664 (build-system gnu-build-system)
1665 (native-inputs `(("ed" ,ed)))
1666 (arguments
1667 `(#:phases (modify-phases %standard-phases
1668 (add-before 'check 'disable-t810
1669 ;; See https://savannah.gnu.org/bugs/index.php?52288
1670 ;; Back-porting the fix is non-trivial, so disable for now.
1671 (lambda _
1672 (substitute* "tests/Makefile"
1673 ((" t810 \\\\\n") ""))
1674 #t)))))
1675 (home-page "https://www.gnu.org/software/rcs/")
1676 (synopsis "Per-file local revision control system")
1677 (description
1678 "RCS is the original Revision Control System. It works on a
1679 file-by-file basis, in contrast to subsequent version control systems such as
1680 CVS, Subversion, and Git. This can make it suitable for system
1681 administration files, for example, which are often inherently local to one
1682 machine.")
1683 (license license:gpl3+)))
1684
1685 (define-public cvs
1686 (package
1687 (name "cvs")
1688 (version "1.12.13")
1689 (source (origin
1690 (method url-fetch)
1691 (uri (string-append
1692 "https://ftp.gnu.org/non-gnu/cvs/source/feature/"
1693 version "/cvs-" version ".tar.bz2"))
1694 (patches (search-patches "cvs-CVE-2017-12836.patch"))
1695 (sha256
1696 (base32
1697 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
1698 (build-system gnu-build-system)
1699 (arguments
1700 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
1701 '(#:tests? #f
1702 #:configure-flags (list "--with-external-zlib")))
1703 (inputs `(("zlib" ,zlib)
1704 ("nano" ,nano))) ; the default editor
1705 (home-page "http://cvs.nongnu.org")
1706 (synopsis "Historical centralized version control system")
1707 (description
1708 "CVS is a version control system, an important component of Source
1709 Configuration Management (SCM). Using it, you can record the history of
1710 sources files, and documents. It fills a similar role to the free software
1711 RCS, PRCS, and Aegis packages.")
1712 (license license:gpl1+)))
1713
1714 (define-public cvs-fast-export
1715 (package
1716 (name "cvs-fast-export")
1717 (version "1.55")
1718 (source (origin
1719 (method url-fetch)
1720 (uri (string-append "http://www.catb.org/~esr/cvs-fast-export/"
1721 "cvs-fast-export-" version ".tar.gz"))
1722 (sha256
1723 (base32
1724 "06y2myhhv2ap08bq7d7shq0b7lq6wgznwrpz6622xq66cxkf2n5g"))))
1725 (build-system gnu-build-system)
1726 (arguments
1727 '(#:phases
1728 (modify-phases %standard-phases
1729 (delete 'configure)) ; no configure script
1730 #:parallel-build? #f ; parallel a2x commands fail spectacularly
1731 #:make-flags
1732 (list "CC=gcc" (string-append "prefix?=" (assoc-ref %outputs "out")))))
1733 (inputs
1734 `(("git" ,git)
1735 ("python" ,python-wrapper)))
1736 (native-inputs
1737 `(("asciidoc" ,asciidoc)
1738 ;; These are needed for the tests.
1739 ("cvs" ,cvs)
1740 ("rcs" ,rcs)))
1741 (home-page "http://www.catb.org/esr/cvs-fast-export/")
1742 (synopsis "Export an RCS or CVS history as a fast-import stream")
1743 (description "This program analyzes a collection of RCS files in a CVS
1744 repository (or outside of one) and, when possible, emits an equivalent history
1745 in the form of a fast-import stream. Not all possible histories can be
1746 rendered this way; the program tries to emit useful warnings when it can't.
1747
1748 The program can also produce a visualization of the resulting commit directed
1749 acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org,
1750 Graphviz}. The package also includes @command{cvssync}, a tool for mirroring
1751 masters from remote CVS hosts.")
1752 (license license:gpl2+)))
1753
1754 (define-public vc-dwim
1755 (package
1756 (name "vc-dwim")
1757 (version "1.9")
1758 (source (origin
1759 (method url-fetch)
1760 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
1761 version ".tar.xz"))
1762 (sha256
1763 (base32
1764 "0mf1dd7wdqxsm4fcfinfd7iadzarmzvg747pbsbi32qpavpk8gdf"))))
1765 (build-system gnu-build-system)
1766 (inputs `(("perl" ,perl)))
1767 (native-inputs
1768 `(("emacs" ,emacs-minimal) ; for `ctags'
1769 ("inetutils" ,inetutils))) ; for `hostname', used in the tests
1770 (home-page "https://www.gnu.org/software/vc-dwim/")
1771 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
1772 (description
1773 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
1774 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
1775 using version control at the same time, for example by printing a reminder
1776 when a file change has been described in the ChangeLog but the file has not
1777 been added to the VC. vc-chlog scans changed files and generates
1778 standards-compliant ChangeLog entries based on the changes that it detects.")
1779 (license license:gpl3+)))
1780
1781 (define-public diffstat
1782 (package
1783 (name "diffstat")
1784 (version "1.63")
1785 (source (origin
1786 (method url-fetch)
1787 (uri
1788 (list
1789 (string-append "ftp://invisible-island.net/diffstat/"
1790 "diffstat-" version ".tgz")
1791 (string-append "http://invisible-mirror.net/archives/diffstat/"
1792 "diffstat-" version ".tgz")))
1793 (sha256
1794 (base32
1795 "0vyw200s5dv1257pmrh6c6fdkmw3slyz5szpqfx916xr04sdbpby"))))
1796 (build-system gnu-build-system)
1797 (home-page "https://invisible-island.net/diffstat/")
1798 (synopsis "Make histograms from the output of @command{diff}")
1799 (description
1800 "Diffstat reads the output of @command{diff} and displays a histogram of
1801 the insertions, deletions, and modifications per file. It is useful for
1802 reviewing large, complex patch files.")
1803 (license (license:x11-style "file://COPYING"))))
1804
1805 (define-public cssc
1806 (package
1807 (name "cssc")
1808 (version "1.4.1")
1809 (source (origin
1810 (method url-fetch)
1811 (uri (string-append "mirror://gnu/" name "/CSSC-"
1812 version ".tar.gz"))
1813 (sha256
1814 (base32
1815 "1vsisqq573xjr2qpn19iwmpqgl3mq03m790akpa4rvj60b4d1gni"))))
1816 (build-system gnu-build-system)
1817 (arguments
1818 `(#:phases
1819 (modify-phases %standard-phases
1820 (add-before 'check 'precheck
1821 (lambda _
1822 (begin
1823 (substitute* "tests/common/test-common"
1824 (("/bin/pwd") (which "pwd")))
1825
1826 (substitute* "tests/prt/all-512.sh"
1827 (("/bin/sh") (which "sh")))
1828
1829 ;; XXX: This test has no hope of passing until there is a "nogroup"
1830 ;; entry (or at least some group to which the guix builder does
1831 ;; not belong) in the /etc/group file of the build environment.
1832 ;; Currently we do not have such a group. Disable this test for now.
1833 (substitute* "tests/Makefile"
1834 (("test-delta ") ""))))))))
1835 ;; These are needed for the tests
1836 (native-inputs `(("git" ,git)
1837 ("cvs" ,cvs)))
1838 (home-page "https://www.gnu.org/software/cssc/")
1839 (synopsis "File-based version control like SCCS")
1840 (description "GNU CSSC provides a replacement for the legacy Unix source
1841 code control system SCCS. This allows old code still under that system to be
1842 accessed and migrated on modern systems.")
1843 (license license:gpl3+)))
1844
1845 ;; This package can unfortunately work only in -TEST mode, since Aegis
1846 ;; requires that it is installed setuid root.
1847 (define-public aegis
1848 (package
1849 (name "aegis")
1850 (version "4.24")
1851 (source (origin
1852 (method url-fetch)
1853 (uri (string-append "mirror://sourceforge/aegis/aegis/" version
1854 "/aegis-" version ".tar.gz"))
1855 (sha256
1856 (base32
1857 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
1858 (patches (search-patches "aegis-perl-tempdir1.patch"
1859 "aegis-perl-tempdir2.patch"
1860 "aegis-test-fixup-1.patch"
1861 "aegis-test-fixup-2.patch"
1862 "aegis-constness-error.patch"))))
1863 (build-system gnu-build-system)
1864 (inputs
1865 `(("e2fsprogs" ,e2fsprogs)
1866 ("curl" ,curl)
1867 ("file" ,file)
1868 ("libxml2" ,libxml2)
1869 ("zlib" ,zlib)
1870 ("gettext" ,gettext-minimal)))
1871 (native-inputs
1872 `(("bison" ,bison)
1873 ("groff" ,groff)
1874 ("perl" ,perl)
1875 ;; Various tests require the following:
1876 ("cvs" ,cvs)
1877 ("flex" ,flex)
1878 ("cook" ,cook)
1879 ("subversion" ,subversion)
1880 ("rcs" ,rcs)
1881 ("ed" ,ed)))
1882 (arguments
1883 `(#:configure-flags (list "--with-no-aegis-configured"
1884 "--sharedstatedir=/var/com/aegis"
1885 ;; Uses the old 'throw()' specifier with 'new'
1886 ;; which changed in C++11.
1887 "CXXFLAGS=-std=c++03")
1888 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
1889 #:phases
1890 (modify-phases %standard-phases
1891 (add-before 'configure 'pre-conf
1892 (lambda _
1893 (substitute* (append '("configure"
1894 "etc/check-tar-gz.sh"
1895 "etc/patches.sh"
1896 "etc/test.sh"
1897 "script/aexver.in"
1898 "script/aebisect.in"
1899 "script/aeintegratq.in"
1900 "script/tkaegis.in"
1901 "script/test_funcs.in"
1902 "web/eg_oss_templ.sh"
1903 "web/webiface.html"
1904 "libaegis/getpw_cache.cc")
1905 (find-files "test" "\\.sh"))
1906 (("/bin/sh") (which "sh")))
1907 (setenv "SH" (which "sh"))
1908 #t))
1909 (replace 'check
1910 (lambda _
1911 (let ((home (string-append (getcwd) "/my-new-home")))
1912 ;; Some tests need to write to $HOME.
1913 (mkdir home)
1914 (setenv "HOME" home)
1915
1916 ;; This test assumes that flex has been symlinked to "lex".
1917 (substitute* "test/00/t0011a.sh"
1918 (("type lex") "type flex"))
1919
1920 ;; XXX Disable tests that fail, for unknown reasons, ‘for now’.
1921 (for-each
1922 (lambda (test) (substitute* "Makefile"
1923 (((string-append "test/" test "\\.ES ")) "")))
1924 (list "00/t0011a"
1925 "00/t0049a"
1926 "01/t0196a"))
1927
1928 ;; The author decided to call the check rule "sure".
1929 (invoke "make" "sure")))))))
1930 (home-page "https://sourceforge.net/projects/aegis/")
1931 (synopsis "Project change supervisor")
1932 (description "Aegis is a project change supervisor, and performs some of
1933 the Software Configuration Management needed in a CASE environment. Aegis
1934 provides a framework within which a team of developers may work on many
1935 changes to a program independently, and Aegis coordinates integrating these
1936 changes back into the master source of the program, with as little disruption
1937 as possible. Resolution of contention for source files, a major headache for
1938 any project with more than one developer, is one of Aegis's major functions.")
1939 (license license:gpl3+)))
1940
1941 (define-public reposurgeon
1942 (package
1943 (name "reposurgeon")
1944 (version "3.43")
1945 (source (origin
1946 (method url-fetch)
1947 (uri (string-append "http://www.catb.org/~esr/" name "/"
1948 name "-" version ".tar.xz"))
1949 (sha256
1950 (base32
1951 "1af0z14wcm4bk5a9ysinbwq2fp3lf5f7i8mvwh7286hr3fnagcaz"))
1952 (patches (search-patches
1953 "reposurgeon-add-missing-docbook-files.patch"))))
1954 (build-system gnu-build-system)
1955 (arguments
1956 `(#:make-flags
1957 (list "ECHO=echo"
1958 (string-append "target=" (assoc-ref %outputs "out")))
1959 #:phases
1960 (modify-phases %standard-phases
1961 (add-after 'unpack 'patch-inputs
1962 (lambda* (#:key inputs #:allow-other-keys)
1963 (let ((tzdata (assoc-ref inputs "tzdata")))
1964 (substitute* "reposurgeon"
1965 (("/usr/share/zoneinfo")
1966 (string-append tzdata "/share/zoneinfo")))
1967 (substitute* "test/svn-to-svn"
1968 (("/bin/echo") "echo"))
1969 #t)))
1970 (delete 'configure) ; no configure script
1971 (add-before 'build 'fix-docbook
1972 (lambda* (#:key inputs #:allow-other-keys)
1973 (substitute* (find-files "." "\\.xml$")
1974 (("docbook/docbookx.dtd")
1975 (string-append (assoc-ref inputs "docbook-xml")
1976 "/xml/dtd/docbook/docbookx.dtd")))
1977 #t))
1978 (add-before 'check 'set-up-test-environment
1979 (lambda* (#:key inputs #:allow-other-keys)
1980 (let ((tzdata (assoc-ref inputs "tzdata")))
1981 (setenv "TZDIR" (string-append tzdata "/share/zoneinfo"))
1982 #t)))
1983 (add-after 'install 'install-emacs-data
1984 (lambda* (#:key outputs #:allow-other-keys)
1985 (install-file "reposurgeon-mode.el"
1986 (string-append (assoc-ref outputs "out")
1987 "/share/emacs/site-lisp"))
1988 #t)))))
1989 (inputs
1990 `(("python" ,python-wrapper)
1991 ("tzdata" ,tzdata)))
1992 (native-inputs
1993 `( ;; For building documentation.
1994 ("asciidoc" ,asciidoc)
1995 ("docbook-xml" ,docbook-xml)
1996 ("docbook-xsl" ,docbook-xsl)
1997 ("libxml2" ,libxml2)
1998 ("xmlto" ,xmlto)
1999
2000 ;; For tests.
2001 ("cvs" ,cvs)
2002 ("git" ,git)
2003 ("mercurial" ,mercurial)
2004 ("subversion" ,subversion)))
2005 (home-page "http://www.catb.org/~esr/reposurgeon/")
2006 (synopsis "Edit version-control repository history")
2007 (description "Reposurgeon enables risky operations that version-control
2008 systems don't want to let you do, such as editing past comments and metadata
2009 and removing commits. It works with any version control system that can
2010 export and import Git fast-import streams, including Git, Mercurial, Fossil,
2011 Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly
2012 and can thus be used to script production of very high-quality conversions
2013 from Subversion to any supported Distributed Version Control System (DVCS).")
2014 ;; Most files are distributed under bsd-2, except 'repocutter' which is
2015 ;; under bsd-3.
2016 (license (list license:bsd-2 license:bsd-3))))
2017
2018 (define-public tig
2019 (package
2020 (name "tig")
2021 (version "2.5.1")
2022 (source (origin
2023 (method url-fetch)
2024 (uri (string-append
2025 "https://github.com/jonas/tig/releases/download/tig-"
2026 version "/tig-" version ".tar.gz"))
2027 (sha256
2028 (base32
2029 "0r4y9hyvpkplaxrzslws3asz652d83qh3bjwvmp8assga8s5s3ah"))))
2030 (build-system gnu-build-system)
2031 (native-inputs
2032 `(("asciidoc" ,asciidoc)
2033 ("xmlto" ,xmlto)))
2034 (inputs
2035 `(("ncurses" ,ncurses)
2036 ("readline" ,readline)))
2037 (arguments
2038 `(#:phases
2039 (modify-phases %standard-phases
2040 (add-after 'install 'install-doc
2041 (lambda _
2042 (invoke "make" "install-doc"))))
2043 #:test-target "test"
2044 #:tests? #f)) ; tests require access to /dev/tty
2045 (home-page "https://jonas.github.io/tig/")
2046 (synopsis "Ncurses-based text user interface for Git")
2047 (description
2048 "Tig is an ncurses text user interface for Git, primarily intended as
2049 a history browser. It can also stage hunks for commit, or colorize the
2050 output of the @code{git} command.")
2051 (license license:gpl2+)))
2052
2053 (define-public findnewest
2054 (package
2055 (name "findnewest")
2056 (version "0.3")
2057 (source
2058 (origin
2059 (method git-fetch)
2060 (uri (git-reference
2061 (url "https://github.com/0-wiz-0/findnewest")
2062 (commit (string-append "findnewest-" version))))
2063 (file-name (git-file-name name version))
2064 (sha256
2065 (base32 "1x1cbn2b27h5r0ah5xc06fkalfdci2ngrgd4wibxjw0h88h0nvgq"))))
2066 (build-system gnu-build-system)
2067 (native-inputs `(("autoconf" ,autoconf)
2068 ("automake" ,automake)))
2069 (home-page "https://github.com/0-wiz-0/findnewest/releases")
2070 (synopsis "Print the modification time of the latest file")
2071 (description
2072 "Recursively find the newest file in a file tree and print its
2073 modification time.")
2074 (license license:bsd-2)))
2075
2076 (define-public myrepos
2077 (package
2078 (name "myrepos")
2079 (version "1.20180726")
2080 (source
2081 (origin
2082 (method git-fetch)
2083 (uri (git-reference
2084 (url "git://myrepos.branchable.com/myrepos")
2085 (commit version)))
2086 (file-name (string-append name "-" version "-checkout"))
2087 (sha256
2088 (base32 "0jphw61plm8cgklja6hs639xhdvxgvjwbr6jpvjwpp7hc5gmhms5"))))
2089 (build-system gnu-build-system)
2090 (arguments
2091 '(#:test-target "test"
2092 #:make-flags (list (string-append "PREFIX=" %output))
2093 #:phases
2094 (modify-phases %standard-phases
2095 (delete 'configure)
2096 (add-after 'install 'wrap-webcheckout
2097 (lambda* (#:key inputs outputs #:allow-other-keys)
2098 (let ((out (assoc-ref outputs "out")))
2099 (wrap-program (string-append out "/bin/webcheckout")
2100 `("PERL5LIB" ":" prefix
2101 ,(map (lambda (i) (string-append (assoc-ref inputs i)
2102 "/lib/perl5/site_perl"))
2103 '("perl-encode-locale" "perl-http-date"
2104 "perl-http-message" "perl-html-parser" "perl-libwww"
2105 "perl-uri" "perl-try-tiny"))))
2106 #t))))))
2107 (inputs
2108 `(("perl" ,perl)
2109 ("perl-encode-locale" ,perl-encode-locale)
2110 ("perl-html-parser" ,perl-html-parser)
2111 ("perl-http-date" ,perl-http-date)
2112 ("perl-http-message" ,perl-http-message)
2113 ("perl-libwww" ,perl-libwww)
2114 ("perl-try-tiny" ,perl-try-tiny)
2115 ("perl-uri" ,perl-uri)))
2116 (home-page "https://myrepos.branchable.com/")
2117 (synopsis "Multiple repository management tool")
2118 (description
2119 "Myrepos provides the @code{mr} command, which maps an operation (e.g.,
2120 fetching updates) over a collection of version control repositories. It
2121 supports a large number of version control systems: Git, Subversion,
2122 Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
2123 (license license:gpl2+)))
2124
2125 (define-public git-annex-remote-rclone
2126 (package
2127 (name "git-annex-remote-rclone")
2128 (version "0.6")
2129 (source
2130 (origin
2131 (method git-fetch)
2132 (uri (git-reference
2133 (url "https://github.com/DanielDent/git-annex-remote-rclone")
2134 (commit (string-append "v" version))))
2135 (file-name (git-file-name name version))
2136 (sha256
2137 (base32
2138 "0j0hlxji8d974fq7zd4xc02n0jpi31ylhxc7z4zp8iiwad5mkpxp"))))
2139 (build-system trivial-build-system)
2140 (arguments
2141 `(#:modules ((guix build utils))
2142 #:builder
2143 (begin
2144 (use-modules (guix build utils))
2145 (let ((bash (string-append (assoc-ref %build-inputs "bash")
2146 "/bin/bash"))
2147 (rclone (string-append (assoc-ref %build-inputs "rclone")
2148 "/bin/rclone")))
2149 (copy-file (string-append (assoc-ref %build-inputs "source")
2150 "/git-annex-remote-rclone")
2151 "git-annex-remote-rclone")
2152 (substitute* "git-annex-remote-rclone"
2153 (("/bin/bash") bash)
2154 (("runcmd rclone") (string-append "runcmd " rclone)))
2155 (install-file "git-annex-remote-rclone"
2156 (string-append %output "/bin"))
2157 #t))))
2158 (inputs
2159 `(("bash" ,bash)
2160 ("rclone" ,rclone)))
2161 (home-page "https://github.com/DanielDent/git-annex-remote-rclone")
2162 (synopsis "Use rclone-supported cloud storage providers with git-annex")
2163 (description "This wrapper around rclone makes any destination supported
2164 by rclone usable with git-annex.")
2165 (license license:gpl3+)))
2166
2167 (define-public fossil
2168 (package
2169 (name "fossil")
2170 (version "2.11")
2171 (source
2172 (origin
2173 (method url-fetch)
2174 (uri (string-append
2175 "https://www.fossil-scm.org/index.html/uv/"
2176 "fossil-src-" version ".tar.gz"))
2177 (sha256
2178 (base32 "0c9nzx42wxfmym9vf1pnbdb1c7gp7a7zqky60izxsph7w2xh8nix"))
2179 (modules '((guix build utils)))
2180 (snippet
2181 '(begin
2182 (delete-file-recursively "compat") #t))))
2183 (build-system gnu-build-system)
2184 (native-inputs
2185 `(("tcl" ,tcl) ;for configuration only
2186 ("which" ,which) ;for tests only
2187 ("ed" ,ed))) ;ditto
2188 (inputs
2189 `(("openssl" ,openssl)
2190 ("zlib" ,zlib)
2191 ("sqlite" ,sqlite)))
2192 (arguments
2193 `(#:configure-flags (list "--with-openssl=auto"
2194 "--disable-internal-sqlite")
2195 #:test-target "test"
2196 #:phases (modify-phases %standard-phases
2197 (add-after 'patch-source-shebangs 'patch-sh
2198 (lambda _
2199 (substitute* '("auto.def")
2200 (("/bin/sh") (which "sh")))
2201 #t))
2202 (replace 'configure
2203 (lambda* (#:key outputs (configure-flags '())
2204 #:allow-other-keys)
2205 ;; The 'configure' script is not an autoconf script and
2206 ;; chokes on unrecognized options.
2207 (apply invoke
2208 "./configure"
2209 (string-append "--prefix="
2210 (assoc-ref outputs "out"))
2211 configure-flags)
2212 #t))
2213 (add-before 'check 'test-setup
2214 (lambda _
2215 (setenv "USER" "guix")
2216 (setenv "TZ" "UTC")
2217 #t)))))
2218 (home-page "https://fossil-scm.org")
2219 (synopsis "Software configuration management system")
2220 (description
2221 "Fossil is a distributed source control management system which supports
2222 access and administration over HTTP CGI or via a built-in HTTP server. It has
2223 a built-in wiki, built-in file browsing, built-in tickets system, etc.")
2224 (license (list license:public-domain ;src/miniz.c, src/shell.c
2225 license:bsd-2))))
2226
2227 (define-public stagit
2228 (package
2229 (name "stagit")
2230 (version "0.7.2")
2231 (source (origin
2232 (method url-fetch)
2233 (uri (string-append "https://dl.2f30.org/releases/"
2234 name "-" version ".tar.gz"))
2235 (sha256
2236 (base32
2237 "1m3s9g1z9szbjrhm8sic91xh6f2bfpi56rskdkqd5wc4wdycpyi5"))))
2238 (build-system gnu-build-system)
2239 (arguments
2240 `(#:tests? #f ; No tests
2241 #:make-flags (list "CC=gcc"
2242 (string-append "PREFIX=" %output))
2243 #:phases
2244 (modify-phases %standard-phases
2245 (delete 'configure)))) ; No configure script
2246 (inputs
2247 `(("libgit2" ,libgit2)))
2248 (home-page "https://2f30.org/")
2249 (synopsis "Static git page generator")
2250 (description "Stagit creates static pages for git repositories, the results can
2251 be served with a HTTP file server of your choice.")
2252 (license license:expat)))
2253
2254 (define-public gource
2255 (package
2256 (name "gource")
2257 (version "0.51")
2258 (source (origin
2259 (method url-fetch)
2260 (uri (string-append
2261 "https://github.com/acaudwell/Gource/releases/download"
2262 "/gource-" version "/gource-" version ".tar.gz"))
2263 (sha256
2264 (base32
2265 "16p7b1x4r0915w883lp374jcdqqja37fnb7m8vnsfnl2n64gi8qr"))))
2266 (build-system gnu-build-system)
2267 (arguments
2268 `(#:configure-flags
2269 (list (string-append "--with-boost-libdir="
2270 (assoc-ref %build-inputs "boost")
2271 "/lib"))))
2272 (native-inputs
2273 `(("pkg-config" ,pkg-config)))
2274 (inputs
2275 `(("boost" ,boost)
2276 ("ftgl" ,ftgl)
2277 ("glew" ,glew)
2278 ("glm" ,glm)
2279 ("glu" ,glu)
2280 ("libpng" ,libpng)
2281 ("mesa" ,mesa)
2282 ("pcre" ,pcre)
2283 ("sdl-union" ,(sdl-union (list sdl2 sdl2-image)))))
2284 (home-page "https://gource.io/")
2285 (synopsis "3D visualisation tool for source control repositories")
2286 (description "@code{gource} provides a software version control
2287 visualization. The repository is displayed as a tree where the root of the
2288 repository is the centre, directories are branches and files are leaves.
2289 Contributors to the source code appear and disappear as they contribute to
2290 specific files and directories.")
2291 (license license:gpl3+)))
2292
2293 (define-public src
2294 (package
2295 (name "src")
2296 (version "1.18")
2297 (source (origin
2298 (method url-fetch)
2299 (uri (string-append
2300 "http://www.catb.org/~esr/src/src-" version ".tar.gz"))
2301 (sha256
2302 (base32
2303 "0n0skhvya8w2az45h2gsafxy8m2mvqas64nrgxifcmrzfv0rf26c"))))
2304 (build-system gnu-build-system)
2305 (arguments
2306 '(#:make-flags
2307 (list (string-append "prefix=" (assoc-ref %outputs "out")))
2308 #:phases
2309 (modify-phases %standard-phases
2310 (delete 'configure) ; no 'configure' script
2311 (add-after 'install 'wrap-program
2312 (lambda* (#:key inputs outputs #:allow-other-keys)
2313 (let* ((out (assoc-ref outputs "out"))
2314 (prog (string-append out "/bin/src"))
2315 (rcs (assoc-ref inputs "rcs")))
2316 (wrap-program prog
2317 `("PATH" ":" prefix (,(string-append rcs "/bin"))))
2318 #t)))
2319 (replace 'check
2320 (lambda _
2321 (setenv "HOME" (getenv "TMPDIR"))
2322 (invoke "git" "config" "--global" "user.name" "guix")
2323 (invoke "git" "config" "--global" "user.email" "guix")
2324 (invoke "./srctest"))))))
2325 (native-inputs
2326 ;; For testing.
2327 `(("git" ,git)
2328 ("perl" ,perl)))
2329 (inputs
2330 `(("python" ,python-wrapper)
2331 ("rcs" ,rcs)))
2332 (synopsis "Simple revision control")
2333 (home-page "http://www.catb.org/~esr/src/")
2334 (description
2335 "SRC (or src) is simple revision control, a version-control system for
2336 single-file projects by solo developers and authors. It modernizes the
2337 venerable RCS, hence the anagrammatic acronym. The design is tuned for use
2338 cases like all those little scripts in your @file{~/bin} directory, or a
2339 directory full of HOWTOs.")
2340 (license license:bsd-2)))
2341
2342 (define-public git-when-merged
2343 ;; Use an unreleased version to get a PY3 compatibility fix.
2344 (let ((commit "ab6af7865a0ba55ba364a6c507e0be6f84f31c6d"))
2345 (package
2346 (name "git-when-merged")
2347 (version (string-append "1.2.0-" (string-take commit 7)))
2348 (source (origin
2349 (method git-fetch)
2350 (uri (git-reference
2351 (url "https://github.com/mhagger/git-when-merged/")
2352 (commit commit)))
2353 (file-name (git-file-name name version))
2354 (sha256
2355 (base32
2356 "0iyk2psf97bc9h43m89p3xjmm79fsx99i7px29g4lcnmdy5kmz0p"))))
2357 (build-system gnu-build-system)
2358 (arguments
2359 `(#:tests? #f ; there are no tests
2360 #:phases
2361 (modify-phases %standard-phases
2362 (delete 'configure)
2363 (delete 'build)
2364 (replace 'install
2365 (lambda* (#:key outputs #:allow-other-keys)
2366 (install-file "bin/git-when-merged"
2367 (string-append (assoc-ref outputs "out")
2368 "/bin"))
2369 #t))
2370 (add-before 'install 'patch-git
2371 (lambda* (#:key inputs #:allow-other-keys)
2372 (let ((git (string-append (assoc-ref inputs "git")
2373 "/bin/git")))
2374 (substitute* "bin/git-when-merged"
2375 (("'git'") (string-append "'" git "'")))
2376 #t)))
2377 (add-after 'install 'wrap-script
2378 (lambda* (#:key outputs #:allow-other-keys)
2379 (wrap-program (string-append (assoc-ref outputs "out")
2380 "/bin/git-when-merged")
2381 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2382 #t)))))
2383 (inputs
2384 `(("git" ,git)
2385 ("python" ,python-wrapper)))
2386 (home-page "https://github.com/mhagger/git-when-merged")
2387 (synopsis "Determine when a commit was merged into a Git branch")
2388 (description "This Git extension defines a subcommand,
2389 @code{when-merged}, whose core operation is to find the merge that brought a
2390 given commit into the specified ref(s). It has various options that control
2391 how information about the merge is displayed.")
2392 (license license:gpl2+))))
2393
2394 (define-public git-imerge
2395 (package
2396 (name "git-imerge")
2397 (version "1.1.0")
2398 (source
2399 (origin
2400 (method git-fetch)
2401 (uri (git-reference
2402 (url "https://github.com/mhagger/git-imerge")
2403 (commit (string-append "v" version))))
2404 (file-name (git-file-name name version))
2405 (sha256
2406 (base32 "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4"))))
2407 (build-system gnu-build-system)
2408 (arguments
2409 `(#:tests? #f ; only manual test scripts
2410 #:make-flags (list (string-append "DESTDIR=" %output)
2411 "PREFIX=")
2412 #:phases
2413 (modify-phases %standard-phases
2414 (delete 'configure)
2415 (add-before 'install 'patch-git
2416 (lambda* (#:key inputs #:allow-other-keys)
2417 (let ((git (string-append (assoc-ref inputs "git")
2418 "/bin/git")))
2419 (substitute* "git-imerge"
2420 (("'git'") (string-append "'" git "'")))
2421 #t)))
2422 (add-after 'install 'wrap-script
2423 (lambda* (#:key outputs #:allow-other-keys)
2424 (wrap-program (string-append (assoc-ref outputs "out")
2425 "/bin/git-imerge")
2426 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2427 #t)))))
2428 (inputs
2429 `(("git" ,git)
2430 ("python" ,python-wrapper)))
2431 (home-page "https://github.com/mhagger/git-imerge")
2432 (synopsis "Incremental merge for Git")
2433 (description "This Git extension defines a subcommand, @code{imerge},
2434 which performs an incremental merge between two branches. Its two primary
2435 design goals are to reduce the pain of resolving merge conflicts by finding
2436 the smallest possible conflicts and to allow a merge to be saved, tested,
2437 interrupted, published, and collaborated on while in progress.")
2438 (license license:gpl2+)))
2439
2440 (define-public git-lfs
2441 (package
2442 (name "git-lfs")
2443 (version "2.7.2")
2444 (source (origin
2445 (method git-fetch)
2446 (uri (git-reference
2447 (url "https://github.com/git-lfs/git-lfs")
2448 (commit (string-append "v" version))))
2449 (file-name (git-file-name name version))
2450 (sha256
2451 (base32
2452 "1nf40rbdz901vsahg5cm09pznpina6wimmxl0lmh8pn0mi51yzvc"))))
2453 (build-system go-build-system)
2454 (arguments
2455 '(#:import-path "github.com/git-lfs/git-lfs"))
2456 (home-page "https://git-lfs.github.com/")
2457 (synopsis "Git extension for versioning large files")
2458 (description
2459 "Git Large File Storage (LFS) replaces large files such as audio samples,
2460 videos, datasets, and graphics with text pointers inside Git, while storing the
2461 file contents on a remote server.")
2462 (license license:expat)))
2463
2464 (define-public tla
2465 (package
2466 (name "gnu-arch")
2467 (version "1.3.5")
2468 (source (origin
2469 (method url-fetch)
2470 (uri (string-append "https://ftp.gnu.org/old-gnu/gnu-arch/"
2471 "tla-" version ".tar.gz"))
2472 (sha256
2473 (base32
2474 "01mfzj1i6p4s8191cgd5850hds1zls88hkf9rb6qx1vqjv585aj0"))
2475 (modules '((guix build utils)))
2476 (snippet
2477 '(begin
2478 ;; In tar 1.32, '--preserve' is ambiguous and leads to an
2479 ;; error, so address that.
2480 (substitute* "src/tla/libarch/archive.c"
2481 (("\"--preserve\"")
2482 "\"--preserve-permissions\""))
2483 #t))))
2484 (build-system gnu-build-system)
2485 (arguments
2486 '(#:phases (modify-phases %standard-phases
2487 (replace 'configure
2488 (lambda* (#:key inputs outputs #:allow-other-keys)
2489 (let ((out (assoc-ref outputs "out")))
2490 (chdir "src")
2491
2492 (mkdir "=build")
2493 (chdir "=build")
2494
2495 ;; For libneon's 'configure' script.
2496 ;; XXX: There's a bundled copy of neon.
2497 (setenv "CONFIG_SHELL" (which "sh"))
2498
2499 (invoke "../configure" "--prefix" out
2500 "--config-shell" (which "sh")
2501 "--with-posix-shell" (which "sh")
2502 "--with-cc" "gcc")))))
2503
2504
2505 ;; There are build failures when building in parallel.
2506 #:parallel-build? #f
2507 #:parallel-tests? #f
2508
2509 #:test-target "test"))
2510 (native-inputs
2511 `(("which" ,which)))
2512 (synopsis "Historical distributed version-control system")
2513 (description
2514 "GNU Arch, aka. @code{tla}, was one of the first free distributed
2515 version-control systems (DVCS). It saw its last release in 2006. This
2516 package is provided for users who need to recover @code{tla} repositories and
2517 for historians.")
2518 (home-page "https://www.gnu.org/software/gnu-arch/")
2519 (license license:gpl2))) ;version 2 only