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