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