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