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