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