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