1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
6 ;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
7 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
8 ;;; Copyright © 2014, 2016, 2019 Eric Bavier <bavier@member.fsf.org>
9 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
10 ;;; Copyright © 2015, 2018 Kyle Meyer <kyle@kyleam.com>
11 ;;; Copyright © 2015, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
13 ;;; Copyright © 2016, 2017, 2018 ng0 <ng0@n0.is>
14 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
15 ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
16 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
17 ;;; Copyright © 2017 André <eu@euandre.org>
18 ;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
20 ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
21 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
22 ;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
23 ;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com>
24 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
25 ;;; Copyright © 2019 Jovany Leandro G.C <bit4bit@riseup.net>
26 ;;; Copyright © 2019 Kei Kebreau <kkebreau@posteo.net>
27 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
28 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
29 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
30 ;;; Copyright © 2020 John D. Boy <jboy@bius.moe>
32 ;;; This file is part of GNU Guix.
34 ;;; GNU Guix is free software; you can redistribute it and/or modify it
35 ;;; under the terms of the GNU General Public License as published by
36 ;;; the Free Software Foundation; either version 3 of the License, or (at
37 ;;; your option) any later version.
39 ;;; GNU Guix is distributed in the hope that it will be useful, but
40 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
41 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 ;;; GNU General Public License for more details.
44 ;;; You should have received a copy of the GNU General Public License
45 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47 (define-module (gnu packages version-control)
48 #:use-module ((guix licenses) #:prefix license:)
49 #:use-module (guix utils)
50 #:use-module (guix packages)
51 #:use-module (guix download)
52 #:use-module (guix git-download)
53 #:use-module (guix build-system cmake)
54 #:use-module (guix build-system gnu)
55 #:use-module (guix build-system go)
56 #:use-module (guix build-system python)
57 #:use-module (guix build-system trivial)
58 #:use-module (gnu packages apr)
59 #:use-module (gnu packages autotools)
60 #:use-module (gnu packages documentation)
61 #:use-module (gnu packages base)
62 #:use-module (gnu packages bash)
63 #:use-module (gnu packages bison)
64 #:use-module (gnu packages boost)
65 #:use-module (gnu packages check)
66 #:use-module (gnu packages cook)
67 #:use-module (gnu packages curl)
68 #:use-module (gnu packages docbook)
69 #:use-module (gnu packages ed)
70 #:use-module (gnu packages file)
71 #:use-module (gnu packages flex)
72 #:use-module (gnu packages gettext)
73 #:use-module (gnu packages gl)
74 #:use-module (gnu packages groff)
75 #:use-module (gnu packages guile)
76 #:use-module (gnu packages image)
77 #:use-module (gnu packages linux)
78 #:use-module (gnu packages mail)
79 #:use-module (gnu packages maths)
80 #:use-module (gnu packages nano)
81 #:use-module (gnu packages ncurses)
82 #:use-module (gnu packages ssh)
83 #:use-module (gnu packages web)
84 #:use-module (gnu packages openstack)
85 #:use-module (gnu packages pcre)
86 #:use-module (gnu packages perl)
87 #:use-module (gnu packages perl-check)
88 #:use-module (gnu packages pkg-config)
89 #:use-module (gnu packages python)
90 #:use-module (gnu packages python-web)
91 #:use-module (gnu packages python-xyz)
92 #:use-module (gnu packages readline)
93 #:use-module (gnu packages rsync)
94 #:use-module (gnu packages sqlite)
95 #:use-module (gnu packages admin)
96 #:use-module (gnu packages xml)
97 #:use-module (gnu packages emacs)
98 #:use-module (gnu packages compression)
99 #:use-module (gnu packages sdl)
100 #:use-module (gnu packages swig)
101 #:use-module (gnu packages sync)
102 #:use-module (gnu packages tcl)
103 #:use-module (gnu packages textutils)
104 #:use-module (gnu packages time)
105 #:use-module (gnu packages tls)
106 #:use-module (gnu packages)
107 #:use-module (ice-9 match)
108 #:use-module (srfi srfi-1))
110 (define-public bazaar
117 (uri (string-append "https://launchpad.net/bzr/"
118 (version-major+minor version) "/" version
119 "/+download/bzr-" version ".tar.gz"))
120 (patches (search-patches "bazaar-CVE-2017-14176.patch"))
123 "1cysix5k3wa6y7jjck3ckq3abls4gvz570s0v0hxv805nwki4i8d"))))
124 (build-system python-build-system)
126 ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh'
128 `(("gettext" ,gettext-minimal)))
130 `(#:tests? #f ; no test target
131 #:python ,python-2 ; Python 3 apparently not yet supported, see
132 ; https://answers.launchpad.net/bzr/+question/229048
134 (modify-phases %standard-phases
135 (add-after 'unpack 'fix-mandir
137 (substitute* "setup.py"
138 (("man/man1") "share/man/man1"))
140 (home-page "https://gnu.org/software/bazaar")
141 (synopsis "Version control system supporting both distributed and centralized workflows")
143 "GNU Bazaar is a version control system that allows you to record
144 changes to project files over time. It supports both a distributed workflow
145 as well as the classic centralized workflow.")
146 (license license:gpl2+)))
154 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
158 "0j685w6pzkn926z5nf5r8fij4ziipvw4c9yb0wc577nzf4j16rbd"))))
159 (build-system gnu-build-system)
161 `(("native-perl" ,perl)
162 ("gettext" ,gettext-minimal)
167 "mirror://kernel.org/software/scm/git/git-manpages-"
171 "0rb4f4jc31zrcg4gyjg4fi07dw7nggkjg2nqfiq5p1aayw2f2ga3"))))
172 ;; For subtree documentation.
173 ("asciidoc" ,asciidoc-py3)
174 ("docbook-xsl" ,docbook-xsl)
181 ("python" ,python) ; for git-p4
184 ;; Note: we keep this in inputs rather than native-inputs to work around
185 ;; a problem in 'patch-shebangs'; see <https://bugs.gnu.org/31952>.
186 ("bash-for-tests" ,bash)
188 ;; For PCRE support in git grep (USE_LIBPCRE2).
192 ("perl-cgi" ,perl-cgi)
195 ("subversion" ,subversion)
196 ("perl-term-readkey" ,perl-term-readkey)
198 ;; For 'git-send-email'.
199 ("perl-authen-sasl" ,perl-authen-sasl)
200 ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
201 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
203 ;; For 'git gui', 'gitk', and 'git citool'.
206 (outputs '("out" ; the core
207 "send-email" ; for git-send-email
209 "credential-netrc" ; git-credential-netrc
210 "subtree" ; git-subtree
211 "gui")) ; gitk, git gui
213 `(#:make-flags `("V=1" ;more verbose compilation
215 ,(string-append "SHELL_PATH="
216 (assoc-ref %build-inputs "bash")
219 ;; Tests require a bash with completion support.
220 ,(string-append "TEST_SHELL_PATH="
221 (assoc-ref %build-inputs "bash-for-tests")
226 ;; By default 'make install' creates hard links for
227 ;; things in 'libexec/git-core', which leads to huge
228 ;; nars; see <https://bugs.gnu.org/21949>.
229 "NO_INSTALL_HARDLINKS=indeed")
231 ;; Make sure the full bash does not end up in the final closure.
232 #:disallowed-references (,bash)
236 ;; The explicit --with-tcltk forces the build system to hardcode the
237 ;; absolute file name to 'wish'.
238 #:configure-flags (list (string-append "--with-tcltk="
239 (assoc-ref %build-inputs "tk")
240 "/bin/wish8.6")) ; XXX
242 #:modules ((srfi srfi-1)
244 ,@%gnu-build-system-modules)
246 (modify-phases %standard-phases
247 (add-after 'unpack 'modify-PATH
248 (lambda* (#:key inputs #:allow-other-keys)
249 (let ((path (string-split (getenv "PATH") #\:))
250 (bash-full (assoc-ref inputs "bash-for-tests")))
251 ;; Drop the test bash from PATH so that (which "sh") and
252 ;; similar does the right thing.
253 (setenv "PATH" (string-join
254 (remove (cut string-prefix? bash-full <>) path)
257 (add-after 'configure 'patch-makefiles
259 (substitute* "Makefile"
260 (("/usr/bin/perl") (which "perl"))
261 (("/usr/bin/python") (which "python3")))
263 (add-after 'configure 'add-PM.stamp
265 ;; Add the "PM.stamp" to avoid "no rule to make target".
266 (call-with-output-file "perl/PM.stamp" (const #t))
268 (add-after 'build 'build-subtree
269 (lambda* (#:key inputs #:allow-other-keys)
270 (with-directory-excursion "contrib/subtree"
271 (substitute* "Makefile"
272 ;; Apparently `xmlto' does not bother to looks up the stylesheets
273 ;; specified in the XML, unlike the above substitution. Instead it
274 ;; uses a hard-coded URL. Work around it here, but if this is
275 ;; common perhaps we should hardcode this path in xmlto itself.
276 (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\) man")
277 (string-append "$(XMLTO) -x "
278 (string-append (assoc-ref inputs "docbook-xsl")
279 "/xml/xsl/docbook-xsl-"
280 ,(package-version docbook-xsl))
281 "/manpages/docbook.xsl -m $(MANPAGE_XSL) man")))
283 (invoke "make" "install")
284 (invoke "make" "install-doc")
285 (substitute* "git-subtree"
286 (("/bin/sh") (which "sh"))))
288 (add-before 'check 'patch-tests
290 (let ((store-directory (%store-directory)))
291 ;; These files contain some funny bytes that Guile is unable
292 ;; to decode for shebang patching. Just delete them.
293 (for-each delete-file '("t/t4201-shortlog.sh"
294 "t/t7813-grep-icase-iso.sh"))
295 ;; Many tests contain inline shell scripts (hooks etc).
296 (substitute* (find-files "t" "\\.sh$")
297 (("#!/bin/sh") (string-append "#!" (which "sh"))))
298 ;; Un-do shebang patching here to prevent checksum mismatch.
299 (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
300 (("^#!.*/bin/perl") "#!/usr/bin/perl"))
301 (substitute* "t/t5003-archive-zip.sh"
302 (("cp /bin/sh") (string-append "cp " (which "sh"))))
303 (substitute* "t/t6030-bisect-porcelain.sh"
304 (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
305 ;; FIXME: This test runs `git commit` with a bogus EDITOR
306 ;; and empty commit message, but does not fail the way it's
307 ;; expected to. The test passes when invoked interactively.
308 (substitute* "t/t7508-status.sh"
309 (("\tcommit_template_commented") "\ttrue"))
310 ;; More checksum mismatches due to odd shebangs.
311 (substitute* "t/t9100-git-svn-basic.sh"
312 (((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") )
313 (substitute* "t/t9300-fast-import.sh"
314 (((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh")
315 (((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh"))
316 ;; FIXME: Some hooks fail with "basename: command not found".
317 ;; See 't/trash directory.t9164.../svn-hook.log'.
318 (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
320 ;; XXX: These tests fail intermittently for unknown reasons:
321 ;; <https://bugs.gnu.org/29546>.
322 (for-each delete-file
323 '("t/t9128-git-svn-cmd-branch.sh"
324 "t/t9167-git-svn-cmd-branch-subproject.sh"
325 "t/t9141-git-svn-multiple-branches.sh"))
327 (add-after 'install 'install-shell-completion
328 (lambda* (#:key outputs #:allow-other-keys)
329 (let* ((out (assoc-ref outputs "out"))
330 (completions (string-append out "/etc/bash_completion.d")))
331 ;; TODO: Install the tcsh and zsh completions in the right place.
332 (mkdir-p completions)
333 (copy-file "contrib/completion/git-completion.bash"
334 (string-append completions "/git"))
336 (add-after 'install 'install-credential-netrc
337 (lambda* (#:key outputs #:allow-other-keys)
338 (let* ((netrc (assoc-ref outputs "credential-netrc")))
339 (install-file "contrib/credential/netrc/git-credential-netrc.perl"
340 (string-append netrc "/bin"))
341 (rename-file (string-append netrc "/bin/git-credential-netrc.perl")
342 (string-append netrc "/bin/git-credential-netrc"))
343 ;; Previously, Git.pm was automatically found by netrc.
344 ;; Perl 5.26 changed how it locates modules so that @INC no
345 ;; longer includes the current working directory (the Perl
346 ;; community calls this "dotless @INC").
347 (wrap-program (string-append netrc "/bin/git-credential-netrc")
348 `("PERL5LIB" ":" prefix
349 (,(string-append (assoc-ref outputs "out") "/share/perl5"))))
351 (add-after 'install 'install-subtree
352 (lambda* (#:key outputs #:allow-other-keys)
353 (let ((subtree (assoc-ref outputs "subtree")))
354 (install-file "contrib/subtree/git-subtree"
355 (string-append subtree "/bin"))
356 (install-file "contrib/subtree/git-subtree.1"
357 (string-append subtree "/share/man/man1"))
359 (add-after 'install 'split
360 (lambda* (#:key inputs outputs #:allow-other-keys)
361 ;; Split the binaries to the various outputs.
362 (let* ((out (assoc-ref outputs "out"))
363 (se (assoc-ref outputs "send-email"))
364 (svn (assoc-ref outputs "svn"))
365 (gui (assoc-ref outputs "gui"))
366 (gitk (string-append out "/bin/gitk"))
367 (gitk* (string-append gui "/bin/gitk"))
368 (git-gui (string-append out "/libexec/git-core/git-gui"))
369 (git-gui* (string-append gui "/libexec/git-core/git-gui"))
370 (git-cit (string-append out "/libexec/git-core/git-citool"))
371 (git-cit* (string-append gui "/libexec/git-core/git-citool"))
372 (git-se (string-append out "/libexec/git-core/git-send-email"))
373 (git-se* (string-append se "/libexec/git-core/git-send-email"))
374 (git-svn (string-append out "/libexec/git-core/git-svn"))
375 (git-svn* (string-append svn "/libexec/git-core/git-svn"))
376 (git-sm (string-append out
377 "/libexec/git-core/git-submodule")))
378 (mkdir-p (string-append gui "/bin"))
379 (mkdir-p (string-append gui "/libexec/git-core"))
380 (mkdir-p (string-append se "/libexec/git-core"))
381 (mkdir-p (string-append svn "/libexec/git-core"))
383 (for-each (lambda (old new)
387 (list gitk git-gui git-cit git-se git-svn)
388 (list gitk* git-gui* git-cit* git-se* git-svn*))
390 ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
391 (wrap-program git-svn*
393 (,(string-append (assoc-ref inputs "subversion")
395 `("PERL5LIB" ":" prefix
396 ,(map (lambda (i) (string-append (assoc-ref inputs i)
397 "/lib/perl5/site_perl"))
398 '("subversion" "perl-term-readkey")))
400 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
401 ;; help it find 'libsvn_client-1.so'.
402 `("LD_LIBRARY_PATH" ":" prefix
403 (,(string-append (assoc-ref inputs "subversion")
406 ;; Tell 'git-send-email' where perl modules are.
407 (wrap-program git-se*
408 `("PERL5LIB" ":" prefix
409 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
411 ,@(transitive-input-references
414 (assoc l (package-inputs this-package)))
417 "perl-io-socket-ssl")))))))
419 ;; Tell 'gitweb.cgi' where perl modules are.
420 (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
421 `("PERL5LIB" ":" prefix
422 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
424 ,@(transitive-input-references
427 (assoc l (package-inputs this-package)))
430 ;; Tell 'git-submodule' where Perl is.
433 (,(string-append (assoc-ref inputs "perl")
437 (add-after 'split 'install-man-pages
438 (lambda* (#:key inputs outputs #:allow-other-keys)
439 (let* ((out (assoc-ref outputs "out"))
440 (man (string-append out "/share/man"))
441 (manpages (assoc-ref inputs "git-manpages")))
443 (with-directory-excursion man
444 (invoke "tar" "xvf" manpages))))))))
447 ;; For HTTPS access, Git needs a single-file certificate bundle, specified
448 ;; with $GIT_SSL_CAINFO.
449 (list (search-path-specification
450 (variable "GIT_SSL_CAINFO")
452 (separator #f) ;single entry
453 (files '("etc/ssl/certs/ca-certificates.crt")))
454 (search-path-specification
455 (variable "GIT_EXEC_PATH")
456 (separator #f) ;single entry
457 (files '("libexec/git-core")))))
459 (synopsis "Distributed version control system")
461 "Git is a free distributed version control system designed to handle
462 everything from small to very large projects with speed and efficiency.")
463 (license license:gpl2)
464 (home-page "https://git-scm.com/")))
466 (define-public git-minimal
467 ;; The size of the closure of 'git-minimal' is two thirds that of 'git'.
468 ;; Its test suite runs slightly faster and most importantly it doesn't
469 ;; depend on packages that are expensive to build such as Subversion.
474 (substitute-keyword-arguments (package-arguments git)
476 `(modify-phases ,phases
477 (replace 'patch-makefiles
479 (substitute* "Makefile"
480 (("/usr/bin/perl") (which "perl")))
482 (delete 'build-subtree)
484 (delete 'install-man-pages)
485 (delete 'install-subtree)
486 (delete 'install-credential-netrc)
487 (add-before 'check 'delete-svn-test
489 ;; This test cannot run since we are not building 'git-svn'.
490 (delete-file "t/t9020-remote-svn.sh")
492 (add-after 'install 'remove-unusable-perl-commands
493 (lambda* (#:key outputs #:allow-other-keys)
494 (let* ((out (assoc-ref outputs "out"))
495 (bin (string-append out "/bin"))
496 (libexec (string-append out "/libexec")))
497 (for-each (lambda (file)
498 (delete-file (string-append libexec
500 '("git-svn" "git-cvsimport" "git-archimport"
501 "git-cvsserver" "git-request-pull"
502 "git-add--interactive" "git-cvsexportcommit"
503 "git-instaweb" "git-send-email"))
504 (delete-file (string-append bin "/git-cvsserver"))
506 ;; These templates typically depend on Perl. Remove them.
507 (delete-file-recursively
508 (string-append out "/share/git-core/templates/hooks"))
510 ;; Gitweb depends on Perl as well.
511 (delete-file-recursively
512 (string-append out "/share/gitweb"))
514 ((#:make-flags flags)
515 `(delete "USE_LIBPCRE2=yes" ,flags))
516 ((#:configure-flags flags)
518 ((#:disallowed-references lst '())
522 `(("native-perl" ,perl)
523 ("gettext" ,gettext-minimal)))
525 `(("curl" ,curl) ;for HTTP(S) access
526 ("expat" ,expat) ;for 'git push' over HTTP(S)
530 ("bash-for-tests" ,bash)))))
532 (define-public gitless
538 ;; The PyPI package lacks a test suite. Build directly from git.
541 (url "https://github.com/gitless-vcs/gitless")
542 (commit (string-append "v" version))))
544 (base32 "048kl27zjr68hgs70g3l98ci9765wxva6azzrhcdys7nsdd493n6"))
545 (file-name (git-file-name name version))))
546 (build-system python-build-system)
549 (modify-phases %standard-phases
550 (add-before 'build 'loosen-requirements
552 (substitute* "setup.py"
553 ;; Using Guix's python-pygit2 1.1.0 appears to work fine…
554 (("pygit2==") "pygit2>="))
556 (add-before 'check 'prepare-for-tests
558 ;; Find the 'gl' command.
559 (rename-file "gl.py" "gl")
560 (setenv "PATH" (string-append (getcwd) ":" (getenv "PATH")))
562 ;; The tests try to run git as if it were already set up.
563 (setenv "HOME" (getcwd))
564 (invoke "git" "config" "--global" "user.email" "git@example.com")
565 (invoke "git" "config" "--global" "user.name" "Guix")))
567 (lambda* (#:key inputs outputs #:allow-other-keys)
568 (let ((out (assoc-ref outputs "out"))
569 (git (assoc-ref inputs "git")))
570 (wrap-program (string-append out "/bin/gl")
571 `("PATH" ":" prefix (,(string-append git "/bin")))
573 (,(string-append out "/lib/python"
574 ,(version-major+minor
575 (package-version python))
577 ,(getenv "PYTHONPATH"))))
580 `(("git-for-tests" ,git-minimal)))
582 `(("git" ,git-minimal)
583 ("python-clint" ,python-clint)
584 ("python-pygit2" ,python-pygit2)
585 ("python-sh" ,python-sh)))
586 (home-page "https://gitless.com")
587 (synopsis "Simple version control system built on top of Git")
589 "Gitless is a Git-compatible version control system that aims to be easy to
590 learn and use. It simplifies the common workflow by committing changes to
591 tracked files by default and saving any uncommitted changes as part of a branch.
593 The friendly @command{gl} command-line interface gives feedback and helps you
594 figure out what to do next.
596 Gitless is implemented on top of Git and its commits and repositories are
597 indistinguishable from Git's. You (or other contributors) can always fall back
598 on @command{git}, and use any regular Git hosting service.")
599 (license license:expat)))
601 (define-public libgit2
607 (uri (string-append "https://github.com/libgit2/libgit2/"
608 "releases/download/v" version
609 "/libgit2-" version ".tar.gz"))
612 "1d09ni0v3vammk8zqmmwks92fh3wwnsxpyrh4s5wwdb3gxma27va"))
613 (patches (search-patches "libgit2-mtime-0.patch"))
615 (delete-file-recursively "deps") #t))
616 (modules '((guix build utils)))))
617 (build-system cmake-build-system)
618 (outputs '("out" "debug"))
620 `(#:configure-flags '("-DUSE_NTLMCLIENT=OFF" ;TODO: package this
621 "-DREGEX_BACKEND=pcre2"
622 "-DUSE_HTTP_PARSER=system")
624 (modify-phases %standard-phases
625 (add-after 'unpack 'fix-hardcoded-paths
627 (substitute* "tests/repo/init.c"
628 (("#!/bin/sh") (string-append "#!" (which "sh"))))
629 (substitute* "tests/clar/fs.h"
630 (("/bin/cp") (which "cp"))
631 (("/bin/rm") (which "rm")))
633 ;; Run checks more verbosely.
635 (lambda _ (invoke "./libgit2_clar" "-v" "-Q"))))))
637 `(("libssh2" ,libssh2)
638 ("http-parser" ,http-parser)))
640 `(("pkg-config" ,pkg-config)
643 ;; These libraries are in 'Requires.private' in libgit2.pc.
644 `(("openssl" ,openssl)
647 (home-page "https://libgit2.org/")
648 (synopsis "Library providing Git core methods")
650 "Libgit2 is a portable, pure C implementation of the Git core methods
651 provided as a re-entrant linkable library with a solid API, allowing you to
652 write native speed custom Git applications in any language with bindings.")
653 ;; GPLv2 with linking exception
654 (license license:gpl2)))
656 (define-public libgit2-0.28
663 (uri (string-append "https://github.com/libgit2/libgit2/releases/"
665 "/libgit2-" version ".tar.gz"))
668 "0hjgpqjjmkciw1i8jqkx9q2vhdc4fc99qajhrj2bq8ziwsp6hyrb"))
669 (patches (search-patches "libgit2-mtime-0.patch"))
670 (modules '((guix build utils)))
672 (delete-file-recursively "deps") #t))))))
674 (define-public git-crypt
682 (url "https://github.com/AGWA/git-crypt.git")
684 (file-name (git-file-name name version))
686 (base32 "1ba5s0fvmd9hhnfhfsjrm40v0qpxfnwc8vmm55m0k4dryzkzx66q"))))
687 (build-system gnu-build-system)
690 ("openssl" ,openssl)))
692 `(("docbook-xsl" ,docbook-xsl)
693 ("libxslt" ,libxslt)))
695 `(#:tests? #f ; No tests.
697 (modify-phases %standard-phases
699 (add-after 'unpack 'patch-makefile
700 (lambda* (#:key inputs #:allow-other-keys)
701 (substitute* "Makefile"
702 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
703 (string-append (assoc-ref inputs "docbook-xsl")
704 "/xml/xsl/docbook-xsl-"
705 ,(package-version docbook-xsl)
706 "/manpages/docbook.xsl")))
710 (invoke "make" "ENABLE_MAN=yes")))
712 (lambda* (#:key outputs #:allow-other-keys)
713 (let ((out (assoc-ref outputs "out")))
714 (invoke "make" "install"
716 (string-append "PREFIX=" out))))))))
717 (home-page "https://www.agwa.name/projects/git-crypt/")
718 (synopsis "Transparent encryption of files in a git repository")
719 (description "git-crypt enables transparent encryption and decryption of
720 files in a git repository. Files which you choose to protect are encrypted when
721 committed, and decrypted when checked out. git-crypt lets you freely share a
722 repository containing a mix of public and private content. git-crypt gracefully
723 degrades, so developers without the secret key can still clone and commit to a
724 repository with encrypted files. This lets you store your secret material (such
725 as keys or passwords) in the same repository as your code, without requiring you
726 to lock down your entire repository.")
727 (license license:gpl3+)))
729 (define-public git-remote-gcrypt
731 (name "git-remote-gcrypt")
736 (url "https://git.spwhitton.name/git-remote-gcrypt")
738 (file-name (string-append name "-" version "-checkout"))
741 "1vay3204729c7wajgn3nxf0s0hzwpdrw14pl6kd8w2ss25gvw2k1"))))
742 (build-system trivial-build-system)
744 `(#:modules ((guix build utils))
746 (use-modules (guix build utils))
747 (let* ((source (assoc-ref %build-inputs "source"))
748 (output (assoc-ref %outputs "out"))
749 (bindir (string-append output "/bin")))
750 (install-file (string-append source "/git-remote-gcrypt")
753 (home-page "https://spwhitton.name/tech/code/git-remote-gcrypt/")
754 (synopsis "Whole remote repository encryption")
755 (description "git-remote-gcrypt is a Git remote helper to push and pull from
756 repositories encrypted with GnuPG. It works with the standard Git transports,
757 including repository hosting services like GitLab.
759 Remote helper programs are invoked by Git to handle network transport. This
760 helper handles @code{gcrypt:} URLs that access a remote repository encrypted
761 with GPG, using our custom format.
763 Supported locations are local, @code{rsync://} and @code{sftp://}, where the
764 repository is stored as a set of files, or instead any Git URL where gcrypt
765 will store the same representation in a Git repository, bridged over arbitrary
768 The aim is to provide confidential, authenticated Git storage and
769 collaboration using typical untrusted file hosts or services.")
770 (license license:gpl3+)))
775 ;; Update the ‘git-source’ input as well.
780 "https://git.zx2c4.com/cgit/snapshot/cgit-"
784 "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss"))))
785 (build-system gnu-build-system)
787 '(#:tests? #f ; XXX: fail to build the in-source git.
789 #:make-flags '("CC=gcc" "SHELL_PATH=sh")
791 (modify-phases %standard-phases
792 (add-after 'unpack 'unpack-git
793 (lambda* (#:key inputs #:allow-other-keys)
794 ;; Unpack the source of git into the 'git' directory.
795 (invoke "tar" "--strip-components=1" "-C" "git" "-xf"
796 (assoc-ref inputs "git-source"))))
797 (add-after 'unpack 'patch-absolute-file-names
798 (lambda* (#:key inputs #:allow-other-keys)
799 (define (quoted-file-name input path)
800 (string-append "\"" input path "\""))
801 (substitute* "ui-snapshot.c"
803 (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
805 (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
807 (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
809 (substitute* "filters/about-formatting.sh"
810 (("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out")
811 "/lib/cgit/filters"))
812 (("\\| tr") (string-append "| " (which "tr"))))
814 (substitute* "filters/html-converters/txt2html"
815 (("sed") (which "sed")))
817 (substitute* "filters/html-converters/man2html"
818 (("groff") (which "groff")))
820 (substitute* "filters/html-converters/rst2html"
821 (("rst2html\\.py") (which "rst2html.py")))
824 (delete 'configure) ; no configure script
825 (add-after 'build 'build-man
826 (lambda* (#:key make-flags #:allow-other-keys)
827 (apply invoke "make" "doc-man" make-flags)))
829 (lambda* (#:key make-flags outputs #:allow-other-keys)
830 (let ((out (assoc-ref outputs "out")))
832 "make" "install" "install-man"
833 (string-append "prefix=" out)
834 (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
836 ;; Move the platform-dependent 'cgit.cgi' into lib to get it
838 (rename-file (string-append out "/share/cgit/cgit.cgi")
839 (string-append out "/lib/cgit/cgit.cgi"))
841 (add-after 'install 'wrap-python-scripts
842 (lambda* (#:key outputs #:allow-other-keys)
845 (wrap-program (string-append (assoc-ref outputs "out")
846 "/lib/cgit/filters/" file)
847 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
848 '("syntax-highlighting.py"
849 "html-converters/md2html"))
852 ;; For building manpage.
853 `(("asciidoc" ,asciidoc)
858 `(;; Building cgit requires a Git source tree.
862 ;; cgit is tightly bound to git. Use GIT_VER from the Makefile,
863 ;; which may not match the current (package-version git).
864 (uri "mirror://kernel.org/software/scm/git/git-2.25.4.tar.xz")
866 (base32 "11am6s46wmn1yll5614smjhzlghbqq6gysgcs64igjr9y5wzpdxq"))))
870 ("python-docutils" ,python-docutils)
871 ("python-markdown" ,python-markdown)
872 ("python-pygments" ,python-pygments)
874 (home-page "https://git.zx2c4.com/cgit/")
875 (synopsis "Web frontend for git repositories")
877 "CGit is an attempt to create a fast web interface for the Git SCM, using
878 a built-in cache to decrease server I/O pressure.")
879 (license license:gpl2)))
881 (define-public python-git-multimail
883 (name "python-git-multimail")
884 (version "1.5.0.post1")
888 (uri (pypi-uri "git-multimail" version))
891 "1zkrbsa70anwpw86ysfwalrb7nsr064kygfiyikyq1pl9pcl969y"))))
892 (build-system python-build-system)
895 (modify-phases %standard-phases
896 (add-after 'unpack 'patch
897 (lambda* (#:key inputs #:allow-other-keys)
898 (substitute* "git-multimail/git_multimail.py"
899 (("GIT_EXECUTABLE = 'git'")
900 (string-append "GIT_EXECUTABLE = '"
901 (assoc-ref inputs "git") "/bin/git"
903 (("/usr/sbin/sendmail")
904 (string-append (assoc-ref inputs "sendmail")
905 "/usr/sbin/sendmail")))
909 ("sendmail" ,sendmail)))
910 (home-page "https://github.com/git-multimail/git-multimail")
911 (synopsis "Send notification emails for Git pushes")
913 "This hook sends emails describing changes introduced by pushes to a Git
914 repository. For each reference that was changed, it emits one ReferenceChange
915 email summarizing how the reference was changed, followed by one Revision
916 email for each new commit that was introduced by the reference change.
918 This script is designed to be used as a post-receive hook in a Git
920 (license license:gpl2)))
922 (define-public python-ghp-import
924 (name "python-ghp-import")
930 (url "https://github.com/davisp/ghp-import.git")
932 (file-name (git-file-name name version))
934 (base32 "12pmw3zz3i57ljnm0rxdyjqdyhisbvy18mjwkb3bzp5pgzs2f45c"))))
935 (build-system python-build-system)
937 `(#:phases (modify-phases %standard-phases
938 (add-after 'install 'install-documentation
939 (lambda* (#:key outputs #:allow-other-keys)
940 (let* ((out (assoc-ref outputs "out"))
941 (doc (string-append out "/share/doc"))
942 (licenses (string-append out "/share/licenses")))
943 (install-file "README.md" doc)
944 (install-file "LICENSE" licenses)))))))
945 (home-page "https://github.com/davisp/ghp-import")
946 (synopsis "Copy directory to the gh-pages branch")
947 (description "Script that copies a directory to the gh-pages branch (by
948 default) of the repository.")
950 ;; See <https://bugs.gnu.org/27913>.
951 (license (license:non-copyleft
952 "https://raw.githubusercontent.com/davisp/ghp-import/master/LICENSE"
953 "Tumbolia Public License"))))
955 (define-public python2-ghp-import
956 (package-with-python2
957 (strip-python2-variant python-ghp-import)))
959 (define-public python-gitdb
961 (name "python-gitdb")
965 (uri (pypi-uri "gitdb" version))
968 "0l113fphn6msjl3cl3kyf332b6lal7daxdd0nfma0x9ipfb013jr"))))
969 (build-system python-build-system)
971 `(#:phases (modify-phases %standard-phases
972 (add-before 'check 'create-test-repository
974 (mkdir "/tmp/testrepo")
975 ;; Some tests require a git repository, so create one.
976 (with-directory-excursion "/tmp/testrepo"
977 (do ((filecount 1 (1+ filecount)))
979 (call-with-output-file (string-append
980 "file" (number->string filecount))
982 (format port "~a" filecount))))
984 (invoke "git" "init")
985 (invoke "git" "config" "user.name" "Total Git")
986 (invoke "git" "config" "user.email" "git@localhost")
987 (invoke "git" "add" "-A")
988 (invoke "git" "commit" "-q" "-m" "dummy commit")))
990 ;; The repository checkout must be a "bare" clone.
991 (invoke "git" "clone" "--bare" "/tmp/testrepo"
992 "/tmp/testrepo.git")))
995 (setenv "GITDB_TEST_GIT_REPO_BASE" "/tmp/testrepo.git")
996 ;; Skip tests that must be run from the gitdb repository.
997 (setenv "TRAVIS" "1")
998 (invoke "nosetests" "-v"))))))
1000 `(("python-smmap" ,python-smmap)))
1003 ("python-nose" ,python-nose)))
1004 (home-page "https://github.com/gitpython-developers/gitdb")
1005 (synopsis "Python implementation of the Git object database")
1007 "GitDB allows you to access @dfn{bare} Git repositories for reading and
1008 writing. It aims at allowing full access to loose objects as well as packs
1009 with performance and scalability in mind. It operates exclusively on streams,
1010 allowing to handle large objects with a small memory footprint.")
1011 (license license:bsd-3)))
1013 (define-public python-gitpython
1015 (name "python-gitpython")
1019 (uri (pypi-uri "GitPython" version))
1022 "1jzllsy9lwc9yibccgv7h9naxisazx2n3zmpy21c8n5xhysw69p4"))))
1023 (build-system python-build-system)
1025 `(#:tests? #f ;XXX: Tests can only be run within the GitPython repository.
1026 #:phases (modify-phases %standard-phases
1027 (add-after 'unpack 'embed-git-reference
1028 (lambda* (#:key inputs #:allow-other-keys)
1029 (substitute* "git/cmd.py"
1030 (("git_exec_name = \"git\"")
1031 (string-append "git_exec_name = \""
1032 (assoc-ref inputs "git")
1038 `(("python-gitdb" ,python-gitdb)))
1040 `(("python-ddt" ,python-ddt)
1041 ("python-nose" ,python-nose)))
1042 (home-page "https://github.com/gitpython-developers/GitPython")
1043 (synopsis "Python library for interacting with Git repositories")
1045 "GitPython is a python library used to interact with Git repositories,
1046 high-level like git-porcelain, or low-level like git-plumbing.
1048 It provides abstractions of Git objects for easy access of repository data,
1049 and additionally allows you to access the Git repository more directly using
1050 either a pure Python implementation, or the faster, but more resource intensive
1051 @command{git} command implementation.")
1052 (license license:bsd-3)))
1054 (define-public shflags
1061 (url "https://github.com/kward/shflags.git")
1062 (commit (string-append "v" version))))
1063 (file-name (git-file-name name version))
1066 "1ydx0sb6vz9s2dgp5bd64y7fpzh9qvmlfjxrbmzac8saknijrlly"))))
1067 (build-system gnu-build-system)
1069 `(#:tests? #f ; no tests
1071 (modify-phases %standard-phases
1072 (delete 'configure) ; nothing to configure
1073 (delete 'build) ; nothing to build
1075 (lambda* (#:key outputs #:allow-other-keys)
1076 (let* ((out (assoc-ref outputs "out"))
1077 (src (string-append out "/src")))
1078 (install-file "shflags" src)
1080 (home-page "https://github.com/kward/shflags")
1081 (synopsis "Command-line flags library for shell scripts")
1083 "Shell Flags (shFlags) is a library written to greatly simplify the
1084 handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
1085 ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
1086 different versions of getopt on various OSes make writing portable shell
1087 scripts difficult. shFlags instead provides an API that doesn't change across
1088 shell and OS versions so the script writer can be confident that the script
1090 (license license:lgpl2.1)))
1092 (define-public git-flow
1095 ;; This version has not be officially released yet, so we build it
1096 ;; directly from the git repository.
1101 (url "https://github.com/petervanderdoes/gitflow-avh/")
1103 (file-name (git-file-name name version))
1106 "13q4mnrxr03wz2dkhzy73j384g299m4d545cnhxcaznvdwfany4h"))))
1107 (build-system gnu-build-system)
1108 (inputs `(("shflags" ,shflags)))
1110 '(#:tests? #f ; no tests
1111 #:make-flags (list (string-append "prefix="
1112 (assoc-ref %outputs "out")))
1114 (modify-phases %standard-phases
1115 (add-after 'unpack 'reset-shFlags-link
1116 (lambda* (#:key inputs #:allow-other-keys)
1117 ;; The link points to a file in the shFlags submodule.
1118 ;; Redirect it to point to our system shFlags.
1119 (let ((shflags (assoc-ref inputs "shflags")))
1121 (delete-file "gitflow-shFlags")
1122 (symlink (string-append shflags "/src/shflags")
1123 "gitflow-shFlags")))))
1126 (home-page "https://nvie.com/posts/a-successful-git-branching-model/")
1127 (synopsis "Git extensions for Vincent Driessen's branching model")
1129 "Vincent Driessen's branching model is a git branching and release
1130 management strategy that helps developers keep track of features, hotfixes,
1131 and releases in bigger software projects. The git-flow library of git
1132 subcommands helps automate some parts of the flow to make working with it a
1134 (license license:bsd-2)))
1136 (define-public stgit
1144 (url "https://github.com/ctmarinas/stgit.git")
1145 (commit (string-append "v" version))))
1146 (file-name (git-file-name name version))
1148 (base32 "00pmz93znl418lsjwy4mr0chp8i2w27h1xjysa05f62smsv91yyc"))))
1149 (build-system python-build-system)
1156 (modify-phases %standard-phases
1157 (add-after 'unpack 'hard-code-version
1159 ;; setup.py tries to cleverly extract the version number from the
1160 ;; git history, which the source checkout lacks. Hard-code one.
1161 (substitute* "setup.py"
1163 (format #f "'~a'" ,version)))
1165 (add-before 'check 'patch-tests
1167 (substitute* (list "t/t1900-mail.sh"
1168 "t/t7504-commit-msg-hook.sh")
1176 (string-append "SHELL_PATH=" (which "bash"))
1178 (home-page "http://procode.org/stgit/")
1179 (synopsis "Stacked Git")
1181 "StGit is a command-line application that provides functionality similar
1182 to Quilt (i.e., pushing/popping patches to/from a stack), but using Git
1183 instead of @command{diff} and @command{patch}. StGit stores its patches in a
1184 Git repository as normal Git commits, and provides a number of commands to
1185 manipulate them in various ways.")
1186 (license license:gpl2)))
1191 (version "1.20151229")
1196 (url "https://github.com/RichiH/vcsh.git")
1197 (commit (string-append "v" version))))
1198 (file-name (git-file-name name version))
1200 (base32 "1grpj45nbpv4j60vd2kg4rj53zrm0bc0h9l4pfd3c2mwbvywm6ab"))))
1201 (build-system gnu-build-system)
1203 `(("which" ,which)))
1207 ("perl-test-harness" ,perl-test-harness)
1208 ("perl-shell-command" ,perl-shell-command)
1209 ("perl-test-most" ,perl-test-most)))
1211 '(#:phases (modify-phases %standard-phases
1214 #:make-flags (list (string-append "PREFIX="
1215 (assoc-ref %outputs "out")))
1216 #:test-target "test"))
1217 (home-page "https://github.com/RichiH/vcsh")
1218 (synopsis "Version control system for @code{$HOME}")
1220 "vcsh version-controls configuration files in several Git repositories,
1221 all in one single directory. They all maintain their working trees without
1222 clobbering each other or interfering otherwise. By default, all Git
1223 repositories maintained via vcsh store the actual files in @code{$HOME},
1224 though this can be overridden.")
1225 (license license:gpl2+)))
1227 (define-public git-test-sequence
1228 (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76"))
1230 (name "git-test-sequence")
1231 (version (string-append "20140312." (string-take commit 7)))
1235 ;; There are many other scripts in this directory; we
1236 ;; are interested in just one for this package.
1237 (url "https://github.com/dustin/bindir")
1239 (file-name (git-file-name name version))
1242 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
1243 (build-system trivial-build-system)
1245 `(#:modules ((guix build utils))
1247 (use-modules (guix build utils))
1248 (let* ((source (assoc-ref %build-inputs "source"))
1249 (output (assoc-ref %outputs "out"))
1250 (bindir (string-append output "/bin"))
1251 (script "git-test-sequence"))
1252 (install-file (string-append source "/" script)
1255 (home-page "https://dustin.sallings.org/2010/03/28/git-test-sequence.html")
1256 (synopsis "Run a command over a sequence of commits")
1258 "git-test-sequence is similar to an automated git bisect except it’s
1259 linear. It will test every change between two points in the DAG. It will
1260 also walk each side of a merge and test those changes individually.")
1261 (license (license:x11-style "file://LICENSE")))))
1263 (define-public gitolite
1271 (url "https://github.com/sitaramc/gitolite.git")
1272 (commit (string-append "v" version))))
1273 (file-name (git-file-name name version))
1275 (base32 "0rmyzr66lxh2ildf3h1nh3hh2ndwk21rjdin50r5vhwbdd7jg8vb"))))
1276 (build-system gnu-build-system)
1278 '(#:tests? #f ; no tests
1279 #:phases (modify-phases %standard-phases
1282 (add-before 'install 'patch-scripts
1283 (lambda* (#:key inputs #:allow-other-keys)
1284 (let ((perl (string-append (assoc-ref inputs "perl")
1286 ;; This seems to take care of every shell script that
1288 (substitute* (find-files "." ".*")
1290 (string-append " " perl " -")))
1292 (substitute* (find-files "src/triggers" ".*")
1294 (string-append " " (which "sed") " ")))
1297 '("src/triggers/post-compile/update-gitweb-access-list"
1298 "src/triggers/post-compile/ssh-authkeys-split"
1299 "src/triggers/upstream")
1301 (string-append " " (which "grep") " ")))
1303 ;; Avoid references to the store in authorized_keys.
1304 ;; This works because gitolite-shell is in the PATH.
1305 (substitute* "src/triggers/post-compile/ssh-authkeys"
1306 (("\\$glshell \\$user")
1307 "gitolite-shell $user"))
1309 (add-before 'install 'patch-source
1310 (lambda* (#:key inputs #:allow-other-keys)
1311 ;; Gitolite uses cat to test the readability of the
1313 (substitute* "src/lib/Gitolite/Setup.pm"
1315 (string-append "\"" (which "cat") " "))
1317 (string-append "\"" (which "ssh-keygen"))))
1319 (substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
1320 "src/lib/Gitolite/Hooks/Update.pm")
1322 (string-append (assoc-ref inputs "perl")
1325 (substitute* "src/lib/Gitolite/Common.pm"
1327 (string-append "\"" (which "ssh-keygen")))
1330 (assoc-ref inputs "inetutils")
1335 (lambda* (#:key outputs #:allow-other-keys)
1336 (let* ((output (assoc-ref outputs "out"))
1337 (sharedir (string-append output "/share/gitolite"))
1338 (bindir (string-append output "/bin")))
1341 (invoke "./install" "-to" sharedir)
1342 ;; Create symlinks for executable scripts in /bin.
1343 (for-each (lambda (script)
1344 (symlink (string-append sharedir "/" script)
1345 (string-append bindir "/" script)))
1346 '("gitolite" "gitolite-shell"))
1348 (add-after 'install 'wrap-scripts
1349 (lambda* (#:key inputs outputs #:allow-other-keys)
1350 (let ((out (assoc-ref outputs "out"))
1351 (coreutils (assoc-ref inputs "coreutils"))
1352 (findutils (assoc-ref inputs "findutils"))
1353 (git (assoc-ref inputs "git")))
1354 (wrap-program (string-append out "/bin/gitolite")
1357 (string-append dir "/bin"))
1358 (list out coreutils findutils git))))
1362 ("coreutils" ,coreutils)
1363 ("findutils" ,findutils)
1364 ("inetutils" ,inetutils)))
1365 ;; git and openssh are propagated because trying to patch the source via
1366 ;; regexp matching is too brittle and prone to false positives.
1369 ("openssh" ,openssh)))
1370 (home-page "https://gitolite.com")
1371 (synopsis "Git access control layer")
1373 "Gitolite is an access control layer on top of Git, providing fine access
1374 control to Git repositories.")
1375 (license license:gpl2)))
1377 (define-public mercurial
1383 (uri (string-append "https://www.mercurial-scm.org/"
1384 "release/mercurial-" version ".tar.gz"))
1387 "1nbjpzjrzgql4hrvslpxwbcgn885ikq6ba1yb4w6p78rw9nzkhgp"))))
1388 (build-system python-build-system)
1391 (modify-phases %standard-phases
1392 (add-after 'unpack 'patch-tests
1394 (substitute* '("tests/test-extdiff.t"
1395 "tests/test-logtoprocess.t"
1396 "tests/test-patchbomb.t"
1397 "tests/test-run-tests.t"
1398 "tests/test-transplant.t")
1403 (lambda* (#:key tests? #:allow-other-keys)
1404 (with-directory-excursion "tests"
1405 ;; The following tests are known to fail.
1406 (for-each delete-file
1407 '(;; XXX: This test calls 'run-tests.py --with-hg=
1408 ;; `which hg`' and fails because there is no hg on
1409 ;; PATH from before (that's why we are building it!)?
1412 ;; FIXME: Why does this fail in the build container, but
1413 ;; not in 'guix environment -C' (even without /bin/sh)?
1414 "test-nointerrupt.t"
1416 ;; TODO: the fqaddr() call fails in the build
1417 ;; container, causing these server tests to fail.
1419 "test-http-branchmap.t"
1420 "test-pull-bundle.t"
1423 "test-subrepo-deep-nested-change.t"
1424 "test-subrepo-recursion.t"))
1426 (invoke "./run-tests.py"
1427 ;; ‘make check’ does not respect ‘-j’.
1428 (string-append "-j" (number->string
1429 (parallel-job-count)))
1430 ;; The default time-outs are too low for many systems.
1431 ;; Raise them generously: Guix enforces its own.
1433 "--slowtimeout" "86400"
1434 ;; The test suite takes a long time and produces little
1435 ;; output by default. Prevent timeouts due to silence.
1438 ;; The following inputs are only needed to run the tests.
1440 `(("python-nose" ,python-nose)
1443 (home-page "https://www.mercurial-scm.org/")
1444 (synopsis "Decentralized version control system")
1446 "Mercurial is a free, distributed source control management tool.
1447 It efficiently handles projects of any size
1448 and offers an easy and intuitive interface.")
1449 (license license:gpl2+)))
1457 (uri (string-append "http://www.webdav.org/neon/neon-"
1461 "1jpvczcx658vimqm7c8my2q41fnmjaf1j03g7bsli6rjxk6xh2yv"))))
1462 (build-system gnu-build-system)
1465 ("pkg-config" ,pkg-config)))
1467 `(("libxml2" ,libxml2)
1468 ("openssl" ,openssl)
1471 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
1472 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
1474 #:configure-flags '("--enable-shared"
1475 ;; requires libgnutils-config, deprecated
1477 ; "--with-ssl=gnutls")))
1478 "--with-ssl=openssl")))
1479 (home-page "http://www.webdav.org/neon/")
1480 (synopsis "HTTP and WebDAV client library")
1482 "Neon is an HTTP and WebDAV client library, with a C interface and the
1485 @item High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
1487 @item low-level interface to the HTTP request/response engine, allowing the use
1488 of arbitrary HTTP methods, headers, etc.;
1489 @item authentication support including Basic and Digest support, along with
1490 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
1491 @item SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
1492 verifying server certificates, handling client certificates, and examining
1493 certificate properties, smartcard-based client certificates are also
1494 supported via a PKCS#11 wrapper interface;
1495 @item abstract interface to parsing XML using libxml2 or expat, and wrappers for
1496 simplifying handling XML HTTP response bodies;
1497 @item WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
1498 property manipulation.
1500 (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+
1502 (define-public subversion
1510 (string-append "https://archive.apache.org/dist/subversion/"
1511 "subversion-" version ".tar.bz2")
1512 (string-append "https://www-eu.apache.org/dist/subversion/"
1513 "subversion-" version ".tar.bz2")))
1516 "19zc215mhpnm92mlyl5jbv57r5zqp6cavr3s2g9yglp6j4kfgj0q"))))
1517 (build-system gnu-build-system)
1519 '(#:parallel-tests? #f ; TODO Seems to cause test failures on
1521 #:configure-flags '("--enable-static=no")
1523 (modify-phases %standard-phases
1524 (add-after 'configure 'patch-libtool-wrapper-ls
1525 (lambda* (#:key inputs #:allow-other-keys)
1526 ;; This substitution allows tests svnauthz_tests and svnlook_tests
1527 ;; to pass. These tests execute svnauthz and svnlook through
1528 ;; their libtool wrapper scripts from svn hooks, whose empty
1529 ;; environments cause "ls: command not found" errors. It would be
1530 ;; nice if this fix ultimately made its way into libtool.
1531 (let ((coreutils (assoc-ref inputs "coreutils")))
1532 (substitute* "libtool"
1533 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))
1535 (add-before 'build 'patch-test-sh
1537 (substitute* "subversion/tests/libsvn_repos/repos-test.c"
1538 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1540 (add-before 'check 'set-PARALLEL
1541 (lambda* (#:key parallel-tests? #:allow-other-keys)
1543 (setenv "PARALLEL" (number->string (parallel-job-count)))
1544 (simple-format #t "parallel-tests? are disabled\n"))
1546 (add-after 'install 'install-perl-bindings
1547 (lambda* (#:key outputs #:allow-other-keys)
1548 ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
1549 (let ((out (assoc-ref outputs "out")))
1550 (invoke "make" "swig-pl-lib")
1551 ;; FIXME: Test failures.
1552 ;; (invoke "make" "check-swig-pl")
1553 (invoke "make" "install-swig-pl-lib")
1555 ;; Set the right installation prefix.
1556 (with-directory-excursion
1557 "subversion/bindings/swig/perl/native"
1558 (invoke "perl" "Makefile.PL"
1560 (string-append "PREFIX=" out))
1561 (invoke "make" "install"
1562 (string-append "OTHERLDFLAGS="
1566 `(("pkg-config" ,pkg-config)
1567 ;; For the Perl bindings.
1571 ("apr-util" ,apr-util)
1575 ("python" ,python-wrapper)
1577 ("utf8proc" ,utf8proc)
1579 (home-page "https://subversion.apache.org/")
1580 (synopsis "Revision control system")
1582 "@dfn{Subversion} (svn) exists to be recognized and adopted as a
1583 centralized version control system characterized by its
1584 reliability as a safe haven for valuable data; the simplicity of its model and
1585 usage; and its ability to support the needs of a wide variety of users and
1586 projects, from individuals to large-scale enterprise operations.")
1587 (license license:asl2.0)))
1595 (uri (string-append "mirror://gnu/rcs/rcs-"
1599 "1zsx7bb0rgvvvisiy4zlixf56ay8wbd9qqqcp1a1g0m1gl6mlg86"))
1600 (patches (search-patches "rcs-5.9.4-noreturn.patch"))))
1601 (build-system gnu-build-system)
1602 (native-inputs `(("ed" ,ed)))
1604 `(#:phases (modify-phases %standard-phases
1605 (add-before 'check 'disable-t810
1606 ;; See https://savannah.gnu.org/bugs/index.php?52288
1607 ;; Back-porting the fix is non-trivial, so disable for now.
1609 (substitute* "tests/Makefile"
1610 ((" t810 \\\\\n") ""))
1612 (home-page "https://www.gnu.org/software/rcs/")
1613 (synopsis "Per-file local revision control system")
1615 "RCS is the original Revision Control System. It works on a
1616 file-by-file basis, in contrast to subsequent version control systems such as
1617 CVS, Subversion, and Git. This can make it suitable for system
1618 administration files, for example, which are often inherently local to one
1620 (license license:gpl3+)))
1629 "https://ftp.gnu.org/non-gnu/cvs/source/feature/"
1630 version "/cvs-" version ".tar.bz2"))
1631 (patches (search-patches "cvs-CVE-2017-12836.patch"))
1634 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
1635 (build-system gnu-build-system)
1637 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
1639 #:configure-flags (list "--with-external-zlib")))
1640 (inputs `(("zlib" ,zlib)
1641 ("nano" ,nano))) ; the default editor
1642 (home-page "http://cvs.nongnu.org")
1643 (synopsis "Historical centralized version control system")
1645 "CVS is a version control system, an important component of Source
1646 Configuration Management (SCM). Using it, you can record the history of
1647 sources files, and documents. It fills a similar role to the free software
1648 RCS, PRCS, and Aegis packages.")
1649 (license license:gpl1+)))
1651 (define-public cvs-fast-export
1653 (name "cvs-fast-export")
1657 (uri (string-append "http://www.catb.org/~esr/cvs-fast-export/"
1658 "cvs-fast-export-" version ".tar.gz"))
1661 "0nn5cf8syb5nbjvkn8w561pk25clv187h4hs9pnc700g9w56chzf"))))
1662 (build-system gnu-build-system)
1665 (modify-phases %standard-phases
1666 (delete 'configure)) ; no configure script
1667 #:parallel-build? #f ; parallel a2x commands fail spectacularly
1669 (list "CC=gcc" (string-append "prefix?=" (assoc-ref %outputs "out")))))
1672 ("python" ,python-wrapper)))
1674 `(("asciidoc" ,asciidoc)
1675 ;; These are needed for the tests.
1678 (home-page "http://www.catb.org/esr/cvs-fast-export/")
1679 (synopsis "Export an RCS or CVS history as a fast-import stream")
1680 (description "This program analyzes a collection of RCS files in a CVS
1681 repository (or outside of one) and, when possible, emits an equivalent history
1682 in the form of a fast-import stream. Not all possible histories can be
1683 rendered this way; the program tries to emit useful warnings when it can't.
1685 The program can also produce a visualization of the resulting commit directed
1686 acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org,
1687 Graphviz}. The package also includes @command{cvssync}, a tool for mirroring
1688 masters from remote CVS hosts.")
1689 (license license:gpl2+)))
1691 (define-public vc-dwim
1697 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
1701 "0mf1dd7wdqxsm4fcfinfd7iadzarmzvg747pbsbi32qpavpk8gdf"))))
1702 (build-system gnu-build-system)
1703 (inputs `(("perl" ,perl)))
1705 `(("emacs" ,emacs-minimal) ; for `ctags'
1706 ("inetutils" ,inetutils))) ; for `hostname', used in the tests
1707 (home-page "https://www.gnu.org/software/vc-dwim/")
1708 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
1710 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
1711 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
1712 using version control at the same time, for example by printing a reminder
1713 when a file change has been described in the ChangeLog but the file has not
1714 been added to the VC. vc-chlog scans changed files and generates
1715 standards-compliant ChangeLog entries based on the changes that it detects.")
1716 (license license:gpl3+)))
1718 (define-public diffstat
1726 (string-append "ftp://invisible-island.net/diffstat/"
1727 "diffstat-" version ".tgz")
1728 (string-append "http://invisible-mirror.net/archives/diffstat/"
1729 "diffstat-" version ".tgz")))
1732 "0vyw200s5dv1257pmrh6c6fdkmw3slyz5szpqfx916xr04sdbpby"))))
1733 (build-system gnu-build-system)
1734 (home-page "https://invisible-island.net/diffstat/")
1735 (synopsis "Make histograms from the output of @command{diff}")
1737 "Diffstat reads the output of @command{diff} and displays a histogram of
1738 the insertions, deletions, and modifications per file. It is useful for
1739 reviewing large, complex patch files.")
1740 (license (license:x11-style "file://COPYING"))))
1748 (uri (string-append "mirror://gnu/" name "/CSSC-"
1752 "1vsisqq573xjr2qpn19iwmpqgl3mq03m790akpa4rvj60b4d1gni"))))
1753 (build-system gnu-build-system)
1756 (modify-phases %standard-phases
1757 (add-before 'check 'precheck
1760 (substitute* "tests/common/test-common"
1761 (("/bin/pwd") (which "pwd")))
1763 (substitute* "tests/prt/all-512.sh"
1764 (("/bin/sh") (which "sh")))
1766 ;; XXX: This test has no hope of passing until there is a "nogroup"
1767 ;; entry (or at least some group to which the guix builder does
1768 ;; not belong) in the /etc/group file of the build environment.
1769 ;; Currently we do not have such a group. Disable this test for now.
1770 (substitute* "tests/Makefile"
1771 (("test-delta ") ""))))))))
1772 ;; These are needed for the tests
1773 (native-inputs `(("git" ,git)
1775 (home-page "https://www.gnu.org/software/cssc/")
1776 (synopsis "File-based version control like SCCS")
1777 (description "GNU CSSC provides a replacement for the legacy Unix source
1778 code control system SCCS. This allows old code still under that system to be
1779 accessed and migrated on modern systems.")
1780 (license license:gpl3+)))
1782 ;; This package can unfortunately work only in -TEST mode, since Aegis
1783 ;; requires that it is installed setuid root.
1784 (define-public aegis
1790 (uri (string-append "mirror://sourceforge/aegis/aegis/" version
1791 "/aegis-" version ".tar.gz"))
1794 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
1795 (patches (search-patches "aegis-perl-tempdir1.patch"
1796 "aegis-perl-tempdir2.patch"
1797 "aegis-test-fixup-1.patch"
1798 "aegis-test-fixup-2.patch"
1799 "aegis-constness-error.patch"))))
1800 (build-system gnu-build-system)
1802 `(("e2fsprogs" ,e2fsprogs)
1805 ("libxml2" ,libxml2)
1807 ("gettext" ,gettext-minimal)))
1812 ;; Various tests require the following:
1816 ("subversion" ,subversion)
1820 `(#:configure-flags (list "--with-no-aegis-configured"
1821 "--sharedstatedir=/var/com/aegis")
1822 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
1824 (modify-phases %standard-phases
1825 (add-before 'configure 'pre-conf
1827 (substitute* (append '("configure"
1828 "etc/check-tar-gz.sh"
1832 "script/aebisect.in"
1833 "script/aeintegratq.in"
1835 "script/test_funcs.in"
1836 "web/eg_oss_templ.sh"
1838 "libaegis/getpw_cache.cc")
1839 (find-files "test" "\\.sh"))
1840 (("/bin/sh") (which "sh")))
1841 (setenv "SH" (which "sh"))
1845 (let ((home (string-append (getcwd) "/my-new-home")))
1846 ;; Some tests need to write to $HOME.
1848 (setenv "HOME" home)
1850 ;; This test assumes that flex has been symlinked to "lex".
1851 (substitute* "test/00/t0011a.sh"
1852 (("type lex") "type flex"))
1854 ;; XXX Disable tests that fail, for unknown reasons, ‘for now’.
1856 (lambda (test) (substitute* "Makefile"
1857 (((string-append "test/" test "\\.ES ")) "")))
1862 ;; The author decided to call the check rule "sure".
1863 (invoke "make" "sure")))))))
1864 (home-page "http://aegis.sourceforge.net")
1865 (synopsis "Project change supervisor")
1866 (description "Aegis is a project change supervisor, and performs some of
1867 the Software Configuration Management needed in a CASE environment. Aegis
1868 provides a framework within which a team of developers may work on many
1869 changes to a program independently, and Aegis coordinates integrating these
1870 changes back into the master source of the program, with as little disruption
1871 as possible. Resolution of contention for source files, a major headache for
1872 any project with more than one developer, is one of Aegis's major functions.")
1873 (license license:gpl3+)))
1875 (define-public reposurgeon
1877 (name "reposurgeon")
1881 (uri (string-append "http://www.catb.org/~esr/" name "/"
1882 name "-" version ".tar.xz"))
1885 "1af0z14wcm4bk5a9ysinbwq2fp3lf5f7i8mvwh7286hr3fnagcaz"))
1886 (patches (search-patches
1887 "reposurgeon-add-missing-docbook-files.patch"))))
1888 (build-system gnu-build-system)
1892 (string-append "target=" (assoc-ref %outputs "out")))
1894 (modify-phases %standard-phases
1895 (add-after 'unpack 'patch-inputs
1896 (lambda* (#:key inputs #:allow-other-keys)
1897 (let ((tzdata (assoc-ref inputs "tzdata")))
1898 (substitute* "reposurgeon"
1899 (("/usr/share/zoneinfo")
1900 (string-append tzdata "/share/zoneinfo")))
1901 (substitute* "test/svn-to-svn"
1902 (("/bin/echo") "echo"))
1904 (delete 'configure) ; no configure script
1905 (add-before 'build 'fix-docbook
1906 (lambda* (#:key inputs #:allow-other-keys)
1907 (substitute* (find-files "." "\\.xml$")
1908 (("docbook/docbookx.dtd")
1909 (string-append (assoc-ref inputs "docbook-xml")
1910 "/xml/dtd/docbook/docbookx.dtd")))
1912 (add-before 'check 'set-up-test-environment
1913 (lambda* (#:key inputs #:allow-other-keys)
1914 (let ((tzdata (assoc-ref inputs "tzdata")))
1915 (setenv "TZDIR" (string-append tzdata "/share/zoneinfo"))
1917 (add-after 'install 'install-emacs-data
1918 (lambda* (#:key outputs #:allow-other-keys)
1919 (install-file "reposurgeon-mode.el"
1920 (string-append (assoc-ref outputs "out")
1921 "/share/emacs/site-lisp"))
1924 `(("python" ,python-wrapper)
1925 ("tzdata" ,tzdata)))
1927 `( ;; For building documentation.
1928 ("asciidoc" ,asciidoc)
1929 ("docbook-xml" ,docbook-xml)
1930 ("docbook-xsl" ,docbook-xsl)
1931 ("libxml2" ,libxml2)
1937 ("mercurial" ,mercurial)
1938 ("subversion" ,subversion)))
1939 (home-page "http://www.catb.org/~esr/reposurgeon/")
1940 (synopsis "Edit version-control repository history")
1941 (description "Reposurgeon enables risky operations that version-control
1942 systems don't want to let you do, such as editing past comments and metadata
1943 and removing commits. It works with any version control system that can
1944 export and import Git fast-import streams, including Git, Mercurial, Fossil,
1945 Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly
1946 and can thus be used to script production of very high-quality conversions
1947 from Subversion to any supported Distributed Version Control System (DVCS).")
1948 ;; Most files are distributed under bsd-2, except 'repocutter' which is
1950 (license (list license:bsd-2 license:bsd-3))))
1959 "https://github.com/jonas/tig/releases/download/tig-"
1960 version "/tig-" version ".tar.gz"))
1963 "0r4y9hyvpkplaxrzslws3asz652d83qh3bjwvmp8assga8s5s3ah"))))
1964 (build-system gnu-build-system)
1966 `(("asciidoc" ,asciidoc)
1969 `(("ncurses" ,ncurses)
1970 ("readline" ,readline)))
1973 (modify-phases %standard-phases
1974 (add-after 'install 'install-doc
1976 (invoke "make" "install-doc"))))
1977 #:test-target "test"
1978 #:tests? #f)) ; tests require access to /dev/tty
1979 (home-page "https://jonas.github.io/tig/")
1980 (synopsis "Ncurses-based text user interface for Git")
1982 "Tig is an ncurses text user interface for Git, primarily intended as
1983 a history browser. It can also stage hunks for commit, or colorize the
1984 output of the @code{git} command.")
1985 (license license:gpl2+)))
1987 (define-public findnewest
1995 (url "https://github.com/0-wiz-0/findnewest.git")
1996 (commit (string-append "findnewest-" version))))
1997 (file-name (git-file-name name version))
1999 (base32 "1x1cbn2b27h5r0ah5xc06fkalfdci2ngrgd4wibxjw0h88h0nvgq"))))
2000 (build-system gnu-build-system)
2001 (native-inputs `(("autoconf" ,autoconf)
2002 ("automake" ,automake)))
2003 (home-page "https://github.com/0-wiz-0/findnewest/releases")
2004 (synopsis "Print the modification time of the latest file")
2006 "Recursively find the newest file in a file tree and print its
2007 modification time.")
2008 (license license:bsd-2)))
2010 (define-public myrepos
2013 (version "1.20180726")
2018 (url "git://myrepos.branchable.com/myrepos")
2020 (file-name (string-append name "-" version "-checkout"))
2022 (base32 "0jphw61plm8cgklja6hs639xhdvxgvjwbr6jpvjwpp7hc5gmhms5"))))
2023 (build-system gnu-build-system)
2025 '(#:test-target "test"
2026 #:make-flags (list (string-append "PREFIX=" %output))
2028 (modify-phases %standard-phases
2030 (add-after 'install 'wrap-webcheckout
2031 (lambda* (#:key inputs outputs #:allow-other-keys)
2032 (let ((out (assoc-ref outputs "out")))
2033 (wrap-program (string-append out "/bin/webcheckout")
2034 `("PERL5LIB" ":" prefix
2035 ,(map (lambda (i) (string-append (assoc-ref inputs i)
2036 "/lib/perl5/site_perl"))
2037 '("perl-encode-locale" "perl-http-date"
2038 "perl-http-message" "perl-html-parser" "perl-libwww"
2039 "perl-uri" "perl-try-tiny"))))
2043 ("perl-encode-locale" ,perl-encode-locale)
2044 ("perl-html-parser" ,perl-html-parser)
2045 ("perl-http-date" ,perl-http-date)
2046 ("perl-http-message" ,perl-http-message)
2047 ("perl-libwww" ,perl-libwww)
2048 ("perl-try-tiny" ,perl-try-tiny)
2049 ("perl-uri" ,perl-uri)))
2050 (home-page "https://myrepos.branchable.com/")
2051 (synopsis "Multiple repository management tool")
2053 "Myrepos provides the @code{mr} command, which maps an operation (e.g.,
2054 fetching updates) over a collection of version control repositories. It
2055 supports a large number of version control systems: Git, Subversion,
2056 Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
2057 (license license:gpl2+)))
2059 (define-public git-annex-remote-rclone
2061 (name "git-annex-remote-rclone")
2067 (url "https://github.com/DanielDent/git-annex-remote-rclone.git")
2068 (commit (string-append "v" version))))
2069 (file-name (git-file-name name version))
2072 "0j0hlxji8d974fq7zd4xc02n0jpi31ylhxc7z4zp8iiwad5mkpxp"))))
2073 (build-system trivial-build-system)
2075 `(#:modules ((guix build utils))
2078 (use-modules (guix build utils))
2079 (let ((bash (string-append (assoc-ref %build-inputs "bash")
2081 (rclone (string-append (assoc-ref %build-inputs "rclone")
2083 (copy-file (string-append (assoc-ref %build-inputs "source")
2084 "/git-annex-remote-rclone")
2085 "git-annex-remote-rclone")
2086 (substitute* "git-annex-remote-rclone"
2087 (("/bin/bash") bash)
2088 (("runcmd rclone") (string-append "runcmd " rclone)))
2089 (install-file "git-annex-remote-rclone"
2090 (string-append %output "/bin"))
2094 ("rclone" ,rclone)))
2095 (home-page "https://github.com/DanielDent/git-annex-remote-rclone")
2096 (synopsis "Use rclone-supported cloud storage providers with git-annex")
2097 (description "This wrapper around rclone makes any destination supported
2098 by rclone usable with git-annex.")
2099 (license license:gpl3+)))
2101 (define-public fossil
2109 "https://www.fossil-scm.org/index.html/uv/"
2110 "fossil-src-" version ".tar.gz"))
2113 "041bs4fgk52fw58p7s084pxk9d9vs5v2f2pjbznqawz75inpg8yq"))
2114 (modules '((guix build utils)))
2117 (delete-file-recursively "compat") #t))))
2118 (build-system gnu-build-system)
2120 `(("tcl" ,tcl) ;for configuration only
2121 ("which" ,which) ;for tests only
2124 `(("openssl" ,openssl)
2126 ("sqlite" ,sqlite)))
2128 `(#:configure-flags (list "--with-openssl=auto"
2129 "--disable-internal-sqlite")
2130 #:test-target "test"
2131 #:phases (modify-phases %standard-phases
2132 (add-after 'patch-source-shebangs 'patch-sh
2134 (substitute* '("auto.def")
2135 (("/bin/sh") (which "sh")))
2138 (lambda* (#:key outputs (configure-flags '())
2140 ;; The 'configure' script is not an autoconf script and
2141 ;; chokes on unrecognized options.
2144 (string-append "--prefix="
2145 (assoc-ref outputs "out"))
2148 (add-before 'check 'test-setup
2150 (setenv "USER" "guix")
2153 (home-page "https://fossil-scm.org")
2154 (synopsis "Software configuration management system")
2156 "Fossil is a distributed source control management system which supports
2157 access and administration over HTTP CGI or via a built-in HTTP server. It has
2158 a built-in wiki, built-in file browsing, built-in tickets system, etc.")
2159 (license (list license:public-domain ;src/miniz.c, src/shell.c
2162 (define-public stagit
2168 (uri (string-append "https://dl.2f30.org/releases/"
2169 name "-" version ".tar.gz"))
2172 "1m3s9g1z9szbjrhm8sic91xh6f2bfpi56rskdkqd5wc4wdycpyi5"))))
2173 (build-system gnu-build-system)
2175 `(#:tests? #f ; No tests
2176 #:make-flags (list "CC=gcc"
2177 (string-append "PREFIX=" %output))
2179 (modify-phases %standard-phases
2180 (delete 'configure)))) ; No configure script
2182 `(("libgit2" ,libgit2)))
2183 (home-page "https://2f30.org/")
2184 (synopsis "Static git page generator")
2185 (description "Stagit creates static pages for git repositories, the results can
2186 be served with a HTTP file server of your choice.")
2187 (license license:expat)))
2189 (define-public gource
2196 "https://github.com/acaudwell/Gource/releases/download"
2197 "/gource-" version "/gource-" version ".tar.gz"))
2200 "16p7b1x4r0915w883lp374jcdqqja37fnb7m8vnsfnl2n64gi8qr"))))
2201 (build-system gnu-build-system)
2204 (list (string-append "--with-boost-libdir="
2205 (assoc-ref %build-inputs "boost")
2208 `(("pkg-config" ,pkg-config)))
2218 ("sdl-union" ,(sdl-union (list sdl2 sdl2-image)))))
2219 (home-page "https://gource.io/")
2220 (synopsis "3D visualisation tool for source control repositories")
2221 (description "@code{gource} provides a software version control
2222 visualization. The repository is displayed as a tree where the root of the
2223 repository is the centre, directories are branches and files are leaves.
2224 Contributors to the source code appear and disappear as they contribute to
2225 specific files and directories.")
2226 (license license:gpl3+)))
2235 "http://www.catb.org/~esr/src/src-" version ".tar.gz"))
2238 "0n0skhvya8w2az45h2gsafxy8m2mvqas64nrgxifcmrzfv0rf26c"))))
2239 (build-system gnu-build-system)
2242 (list (string-append "prefix=" (assoc-ref %outputs "out")))
2244 (modify-phases %standard-phases
2245 (delete 'configure) ; no 'configure' script
2246 (add-after 'install 'wrap-program
2247 (lambda* (#:key inputs outputs #:allow-other-keys)
2248 (let* ((out (assoc-ref outputs "out"))
2249 (prog (string-append out "/bin/src"))
2250 (rcs (assoc-ref inputs "rcs")))
2252 `("PATH" ":" prefix (,(string-append rcs "/bin"))))
2256 (setenv "HOME" (getenv "TMPDIR"))
2257 (invoke "git" "config" "--global" "user.name" "guix")
2258 (invoke "git" "config" "--global" "user.email" "guix")
2259 (invoke "./srctest"))))))
2265 `(("python" ,python-wrapper)
2267 (synopsis "Simple revision control")
2268 (home-page "http://www.catb.org/~esr/src/")
2270 "SRC (or src) is simple revision control, a version-control system for
2271 single-file projects by solo developers and authors. It modernizes the
2272 venerable RCS, hence the anagrammatic acronym. The design is tuned for use
2273 cases like all those little scripts in your @file{~/bin} directory, or a
2274 directory full of HOWTOs.")
2275 (license license:bsd-2)))
2277 (define-public git-when-merged
2278 ;; Use an unreleased version to get a PY3 compatibility fix.
2279 (let ((commit "ab6af7865a0ba55ba364a6c507e0be6f84f31c6d"))
2281 (name "git-when-merged")
2282 (version (string-append "1.2.0-" (string-take commit 7)))
2286 (url "https://github.com/mhagger/git-when-merged/")
2288 (file-name (git-file-name name version))
2291 "0iyk2psf97bc9h43m89p3xjmm79fsx99i7px29g4lcnmdy5kmz0p"))))
2292 (build-system gnu-build-system)
2294 `(#:tests? #f ; there are no tests
2296 (modify-phases %standard-phases
2300 (lambda* (#:key outputs #:allow-other-keys)
2301 (install-file "bin/git-when-merged"
2302 (string-append (assoc-ref outputs "out")
2305 (add-before 'install 'patch-git
2306 (lambda* (#:key inputs #:allow-other-keys)
2307 (let ((git (string-append (assoc-ref inputs "git")
2309 (substitute* "bin/git-when-merged"
2310 (("'git'") (string-append "'" git "'")))
2312 (add-after 'install 'wrap-script
2313 (lambda* (#:key outputs #:allow-other-keys)
2314 (wrap-program (string-append (assoc-ref outputs "out")
2315 "/bin/git-when-merged")
2316 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2320 ("python" ,python-wrapper)))
2321 (home-page "https://github.com/mhagger/git-when-merged")
2322 (synopsis "Determine when a commit was merged into a Git branch")
2323 (description "This Git extension defines a subcommand,
2324 @code{when-merged}, whose core operation is to find the merge that brought a
2325 given commit into the specified ref(s). It has various options that control
2326 how information about the merge is displayed.")
2327 (license license:gpl2+))))
2329 (define-public git-imerge
2337 (url "https://github.com/mhagger/git-imerge.git")
2338 (commit (string-append "v" version))))
2339 (file-name (git-file-name name version))
2341 (base32 "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4"))))
2342 (build-system gnu-build-system)
2344 `(#:tests? #f ; only manual test scripts
2345 #:make-flags (list (string-append "DESTDIR=" %output)
2348 (modify-phases %standard-phases
2350 (add-before 'install 'patch-git
2351 (lambda* (#:key inputs #:allow-other-keys)
2352 (let ((git (string-append (assoc-ref inputs "git")
2354 (substitute* "git-imerge"
2355 (("'git'") (string-append "'" git "'")))
2357 (add-after 'install 'wrap-script
2358 (lambda* (#:key outputs #:allow-other-keys)
2359 (wrap-program (string-append (assoc-ref outputs "out")
2361 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2365 ("python" ,python-wrapper)))
2366 (home-page "https://github.com/mhagger/git-imerge")
2367 (synopsis "Incremental merge for Git")
2368 (description "This Git extension defines a subcommand, @code{imerge},
2369 which performs an incremental merge between two branches. Its two primary
2370 design goals are to reduce the pain of resolving merge conflicts by finding
2371 the smallest possible conflicts and to allow a merge to be saved, tested,
2372 interrupted, published, and collaborated on while in progress.")
2373 (license license:gpl2+)))
2375 (define-public git-lfs
2382 (url "https://github.com/git-lfs/git-lfs")
2383 (commit (string-append "v" version))))
2384 (file-name (git-file-name name version))
2387 "1nf40rbdz901vsahg5cm09pznpina6wimmxl0lmh8pn0mi51yzvc"))))
2388 (build-system go-build-system)
2390 '(#:import-path "github.com/git-lfs/git-lfs"))
2391 (home-page "https://git-lfs.github.com/")
2392 (synopsis "Git extension for versioning large files")
2394 "Git Large File Storage (LFS) replaces large files such as audio samples,
2395 videos, datasets, and graphics with text pointers inside Git, while storing the
2396 file contents on a remote server.")
2397 (license license:expat)))
2405 (uri (string-append "https://ftp.gnu.org/old-gnu/gnu-arch/"
2406 "tla-" version ".tar.gz"))
2409 "01mfzj1i6p4s8191cgd5850hds1zls88hkf9rb6qx1vqjv585aj0"))
2410 (modules '((guix build utils)))
2413 ;; In tar 1.32, '--preserve' is ambiguous and leads to an
2414 ;; error, so address that.
2415 (substitute* "src/tla/libarch/archive.c"
2417 "\"--preserve-permissions\""))
2419 (build-system gnu-build-system)
2421 '(#:phases (modify-phases %standard-phases
2423 (lambda* (#:key inputs outputs #:allow-other-keys)
2424 (let ((out (assoc-ref outputs "out")))
2430 ;; For libneon's 'configure' script.
2431 ;; XXX: There's a bundled copy of neon.
2432 (setenv "CONFIG_SHELL" (which "sh"))
2434 (invoke "../configure" "--prefix" out
2435 "--config-shell" (which "sh")
2436 "--with-posix-shell" (which "sh")
2437 "--with-cc" "gcc")))))
2440 ;; There are build failures when building in parallel.
2441 #:parallel-build? #f
2442 #:parallel-tests? #f
2444 #:test-target "test"))
2446 `(("which" ,which)))
2447 (synopsis "Historical distributed version-control system")
2449 "GNU Arch, aka. @code{tla}, was one of the first free distributed
2450 version-control systems (DVCS). It saw its last release in 2006. This
2451 package is provided for users who need to recover @code{tla} repositories and
2453 (home-page "https://www.gnu.org/software/gnu-arch/")
2454 (license license:gpl2))) ;version 2 only