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