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