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