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