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