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