1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
6 ;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
7 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
8 ;;; Copyright © 2014, 2016, 2019 Eric Bavier <bavier@member.fsf.org>
9 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
10 ;;; Copyright © 2015, 2018, 2020, 2021 Kyle Meyer <kyle@kyleam.com>
11 ;;; Copyright © 2015, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
13 ;;; Copyright © 2016, 2017, 2018 Nikita <nikita@n0.is>
14 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
15 ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
16 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
17 ;;; Copyright © 2017, 2020 EuAndreh <eu@euandre.org>
18 ;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
20 ;;; Copyright © 2017, 2020 Oleg Pykhalov <go.wigust@gmail.com>
21 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
22 ;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
23 ;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com>
24 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
25 ;;; Copyright © 2019 Jovany Leandro G.C <bit4bit@riseup.net>
26 ;;; Copyright © 2019 Kei Kebreau <kkebreau@posteo.net>
27 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
28 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
29 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
30 ;;; Copyright © 2020 John D. Boy <jboy@bius.moe>
31 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
32 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
33 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
34 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
35 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
36 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
37 ;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
38 ;;; Copyright © 2021 Léo Le Bouter <lle-bout@zaclys.net>
39 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
40 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
42 ;;; This file is part of GNU Guix.
44 ;;; GNU Guix is free software; you can redistribute it and/or modify it
45 ;;; under the terms of the GNU General Public License as published by
46 ;;; the Free Software Foundation; either version 3 of the License, or (at
47 ;;; your option) any later version.
49 ;;; GNU Guix is distributed in the hope that it will be useful, but
50 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
51 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52 ;;; GNU General Public License for more details.
54 ;;; You should have received a copy of the GNU General Public License
55 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
57 (define-module (gnu packages version-control)
58 #:use-module ((guix licenses) #:prefix license:)
59 #:use-module (guix utils)
60 #:use-module (guix packages)
61 #:use-module (guix download)
62 #:use-module (guix git-download)
63 #:use-module (guix hg-download)
64 #:use-module (guix build-system cmake)
65 #:use-module (guix build-system copy)
66 #:use-module (guix build-system gnu)
67 #:use-module (guix build-system go)
68 #:use-module (guix build-system perl)
69 #:use-module (guix build-system python)
70 #:use-module (guix build-system trivial)
71 #:use-module (gnu packages apr)
72 #:use-module (gnu packages autotools)
73 #:use-module (gnu packages documentation)
74 #:use-module (gnu packages base)
75 #:use-module (gnu packages bash)
76 #:use-module (gnu packages bison)
77 #:use-module (gnu packages boost)
78 #:use-module (gnu packages check)
79 #:use-module (gnu packages cook)
80 #:use-module (gnu packages curl)
81 #:use-module (gnu packages docbook)
82 #:use-module (gnu packages ed)
83 #:use-module (gnu packages file)
84 #:use-module (gnu packages flex)
85 #:use-module (gnu packages freedesktop)
86 #:use-module (gnu packages gettext)
87 #:use-module (gnu packages gl)
88 #:use-module (gnu packages glib)
89 #:use-module (gnu packages gnome)
90 #:use-module (gnu packages golang)
91 #:use-module (gnu packages groff)
92 #:use-module (gnu packages guile)
93 #:use-module (gnu packages image)
94 #:use-module (gnu packages linux)
95 #:use-module (gnu packages mail)
96 #:use-module (gnu packages maths)
97 #:use-module (gnu packages nano)
98 #:use-module (gnu packages ncurses)
99 #:use-module (gnu packages ssh)
100 #:use-module (gnu packages web)
101 #:use-module (gnu packages openstack)
102 #:use-module (gnu packages pcre)
103 #:use-module (gnu packages perl)
104 #:use-module (gnu packages perl-check)
105 #:use-module (gnu packages pkg-config)
106 #:use-module (gnu packages python)
107 #:use-module (gnu packages python-build)
108 #:use-module (gnu packages python-check)
109 #:use-module (gnu packages python-web)
110 #:use-module (gnu packages python-xyz)
111 #:use-module (gnu packages readline)
112 #:use-module (gnu packages rsync)
113 #:use-module (gnu packages sqlite)
114 #:use-module (gnu packages admin)
115 #:use-module (gnu packages xml)
116 #:use-module (gnu packages emacs)
117 #:use-module (gnu packages compression)
118 #:use-module (gnu packages sdl)
119 #:use-module (gnu packages swig)
120 #:use-module (gnu packages sync)
121 #:use-module (gnu packages tcl)
122 #:use-module (gnu packages textutils)
123 #:use-module (gnu packages time)
124 #:use-module (gnu packages tls)
125 #:use-module (gnu packages)
126 #:use-module (ice-9 match)
127 #:use-module (srfi srfi-1))
129 (define-public bazaar
136 (uri (string-append "https://launchpad.net/bzr/"
137 (version-major+minor version) "/" version
138 "/+download/bzr-" version ".tar.gz"))
139 (patches (search-patches "bazaar-CVE-2017-14176.patch"))
142 "1cysix5k3wa6y7jjck3ckq3abls4gvz570s0v0hxv805nwki4i8d"))))
143 (build-system python-build-system)
145 ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh'
147 `(("gettext" ,gettext-minimal)))
149 `(#:tests? #f ; no test target
150 #:python ,python-2 ; Python 3 apparently not yet supported, see
151 ; https://answers.launchpad.net/bzr/+question/229048
153 (modify-phases %standard-phases
154 (add-after 'unpack 'fix-mandir
156 (substitute* "setup.py"
157 (("man/man1") "share/man/man1"))
159 (home-page "https://gnu.org/software/bazaar")
160 (synopsis "Version control system supporting both distributed and centralized workflows")
162 "GNU Bazaar is a version control system that allows you to record
163 changes to project files over time. It supports both a distributed workflow
164 as well as the classic centralized workflow.")
165 (license license:gpl2+)))
167 (define git-cross-configure-flags
168 '("ac_cv_fread_reads_directories=yes"
169 "ac_cv_snprintf_returns_bogus=no"
170 "ac_cv_iconv_omits_bom=no"))
178 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
182 "10367n5sv4nsgaxy486pbp7nscx34vjk8vrb06jm9ffm8ix42qcz"))))
183 (build-system gnu-build-system)
185 `(("native-perl" ,perl)
186 ;; Add bash-minimal explicitly to ensure it comes before bash-for-tests,
187 ;; see <https://bugs.gnu.org/39513>.
188 ("bash" ,bash-minimal)
189 ("bash-for-tests" ,bash)
190 ("gettext" ,gettext-minimal)
195 "mirror://kernel.org/software/scm/git/git-manpages-"
199 "00n7vbfmd3ywgjksgwrszwj0l2niba64qkaq07ra4p8mawy483ax"))))
200 ;; For subtree documentation.
201 ("asciidoc" ,asciidoc-py3)
202 ("docbook-xsl" ,docbook-xsl)
204 ("pkg-config" ,pkg-config)))
210 ("python" ,python) ; for git-p4
213 ;; For PCRE support in git grep (USE_LIBPCRE2).
217 ("perl-cgi" ,perl-cgi)
220 ("subversion" ,subversion)
221 ("perl-term-readkey" ,perl-term-readkey)
223 ;; For 'git-send-email'.
224 ("perl-authen-sasl" ,perl-authen-sasl)
225 ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
226 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
228 ;; For 'git gui', 'gitk', and 'git citool'.
232 ;; For 'git-credential-libsecret'
234 ("libsecret" ,libsecret)))
235 (outputs '("out" ; the core
236 "send-email" ; for git-send-email
238 "credential-netrc" ; git-credential-netrc
239 "credential-libsecret" ; git-credential-libsecret
240 "subtree" ; git-subtree
241 "gui")) ; gitk, git gui
243 `(#:make-flags `("V=1" ;more verbose compilation
245 ,(string-append "SHELL_PATH="
246 (assoc-ref %build-inputs "bash")
249 ;; Tests require a bash with completion support.
250 ,(string-append "TEST_SHELL_PATH="
251 (assoc-ref %build-inputs "bash-for-tests")
256 ;; By default 'make install' creates hard links for
257 ;; things in 'libexec/git-core', which leads to huge
258 ;; nars; see <https://bugs.gnu.org/21949>.
259 "NO_INSTALL_HARDLINKS=indeed")
261 ;; Make sure the full bash does not end up in the final closure.
262 #:disallowed-references (,bash)
266 ;; The explicit --with-tcltk forces the build system to hardcode the
267 ;; absolute file name to 'wish'.
268 #:configure-flags (list (string-append "--with-tcltk="
269 (assoc-ref %build-inputs "tk")
270 "/bin/wish8.6") ; XXX
271 ,@(if (%current-target-system)
272 git-cross-configure-flags
275 #:modules ((srfi srfi-1)
277 ((guix build gnu-build-system) #:prefix gnu:)
278 ,@%gnu-build-system-modules)
280 (modify-phases %standard-phases
281 ,@(if (%current-target-system)
282 ;; The git build system assumes build == host
283 `((add-after 'unpack 'use-host-uname_S
285 (substitute* "config.mak.uname"
286 (("uname_S := .*" all)
287 (if (equal? ,(%current-target-system) "i586-pc-gnu")
291 ;; We do not have bash-for-tests when cross-compiling.
292 `((add-after 'unpack 'modify-PATH
293 (lambda* (#:key inputs #:allow-other-keys)
294 (let ((path (string-split (getenv "PATH") #\:))
295 (bash-full (assoc-ref inputs "bash-for-tests")))
296 ;; Drop the test bash from PATH so that (which "sh") and
297 ;; similar does the right thing.
298 (setenv "PATH" (string-join
299 (remove (cut string-prefix? bash-full <>) path)
302 ;; Add cross curl-config script to PATH when cross-compiling.
303 ,@(if (%current-target-system)
304 '((add-before 'configure 'add-cross-curl-config
305 (lambda* (#:key inputs #:allow-other-keys)
307 (string-append (assoc-ref inputs "curl") "/bin:"
311 (add-after 'configure 'patch-makefiles
313 (substitute* "Makefile"
314 (("/usr/bin/perl") (which "perl"))
315 (("/usr/bin/python") (which "python3")))
317 (add-after 'configure 'add-PM.stamp
319 ;; Add the "PM.stamp" to avoid "no rule to make target".
320 (call-with-output-file "perl/PM.stamp" (const #t))
322 (add-after 'build 'build-subtree
323 (lambda* (#:key inputs #:allow-other-keys)
324 (with-directory-excursion "contrib/subtree"
325 (substitute* "Makefile"
326 ;; Apparently `xmlto' does not bother to looks up the stylesheets
327 ;; specified in the XML, unlike the above substitution. Instead it
328 ;; uses a hard-coded URL. Work around it here, but if this is
329 ;; common perhaps we should hardcode this path in xmlto itself.
330 (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
331 (string-append "$(XMLTO) -x "
332 (string-append (assoc-ref inputs "docbook-xsl")
333 "/xml/xsl/docbook-xsl-"
334 ,(package-version docbook-xsl))
335 "/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
337 (invoke "make" "install")
338 (invoke "make" "install-doc")
339 (substitute* "git-subtree"
340 (("/bin/sh") (which "sh"))))
342 (add-before 'check 'patch-tests
344 (let ((store-directory (%store-directory)))
345 ;; These files contain some funny bytes that Guile is unable
346 ;; to decode for shebang patching. Just delete them.
347 (for-each delete-file '("t/t4201-shortlog.sh"
348 "t/t7813-grep-icase-iso.sh"))
349 ;; Many tests contain inline shell scripts (hooks etc).
350 (substitute* (find-files "t" "\\.sh$")
351 (("#!/bin/sh") (string-append "#!" (which "sh"))))
352 ;; Un-do shebang patching here to prevent checksum mismatch.
353 (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
354 (("^#!.*/bin/perl") "#!/usr/bin/perl"))
355 (substitute* "t/t5003-archive-zip.sh"
356 (("cp /bin/sh") (string-append "cp " (which "sh"))))
357 (substitute* "t/t6030-bisect-porcelain.sh"
358 (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
359 ;; FIXME: This test runs `git commit` with a bogus EDITOR
360 ;; and empty commit message, but does not fail the way it's
361 ;; expected to. The test passes when invoked interactively.
362 (substitute* "t/t7508-status.sh"
363 (("\tcommit_template_commented") "\ttrue"))
364 ;; More checksum mismatches due to odd shebangs.
365 (substitute* "t/t9100-git-svn-basic.sh"
366 (((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") )
367 (substitute* "t/t9300-fast-import.sh"
368 (((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh")
369 (((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh"))
370 ;; FIXME: Some hooks fail with "basename: command not found".
371 ;; See 't/trash directory.t9164.../svn-hook.log'.
372 (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
374 ;; XXX: These tests fail intermittently for unknown reasons:
375 ;; <https://bugs.gnu.org/29546>.
376 (for-each delete-file
377 '("t/t9128-git-svn-cmd-branch.sh"
378 "t/t9167-git-svn-cmd-branch-subproject.sh"
379 "t/t9141-git-svn-multiple-branches.sh"))
381 (add-after 'install 'install-shell-completion
382 (lambda* (#:key outputs #:allow-other-keys)
383 (let* ((out (assoc-ref outputs "out"))
384 (completions (string-append out "/etc/bash_completion.d")))
385 ;; TODO: Install the tcsh and zsh completions in the right place.
386 (mkdir-p completions)
387 (copy-file "contrib/completion/git-completion.bash"
388 (string-append completions "/git"))
390 (add-after 'install 'install-credential-netrc
391 (lambda* (#:key outputs #:allow-other-keys)
392 (let* ((netrc (assoc-ref outputs "credential-netrc")))
393 (install-file "contrib/credential/netrc/git-credential-netrc.perl"
394 (string-append netrc "/bin"))
395 (rename-file (string-append netrc "/bin/git-credential-netrc.perl")
396 (string-append netrc "/bin/git-credential-netrc"))
397 ;; Previously, Git.pm was automatically found by netrc.
398 ;; Perl 5.26 changed how it locates modules so that @INC no
399 ;; longer includes the current working directory (the Perl
400 ;; community calls this "dotless @INC").
401 (wrap-program (string-append netrc "/bin/git-credential-netrc")
402 `("PERL5LIB" ":" prefix
403 (,(string-append (assoc-ref outputs "out") "/share/perl5"))))
405 (add-after 'install 'install-credential-libsecret
406 (lambda* (#:key outputs #:allow-other-keys)
407 (let* ((libsecret (assoc-ref outputs "credential-libsecret")))
408 (with-directory-excursion "contrib/credential/libsecret"
409 ((assoc-ref gnu:%standard-phases 'build))
410 (install-file "git-credential-libsecret"
411 (string-append libsecret "/bin"))
413 (add-after 'install 'install-subtree
414 (lambda* (#:key outputs #:allow-other-keys)
415 (let ((subtree (assoc-ref outputs "subtree")))
416 (install-file "contrib/subtree/git-subtree"
417 (string-append subtree "/bin"))
418 (install-file "contrib/subtree/git-subtree.1"
419 (string-append subtree "/share/man/man1"))
421 (add-after 'install 'restore-sample-hooks-shebang
422 (lambda* (#:key outputs #:allow-other-keys)
423 (let* ((out (assoc-ref outputs "out"))
424 (dir (string-append out "/share/git-core/templates/hooks")))
425 (for-each (lambda (file)
426 (format #t "restoring shebang on `~a'~%" file)
428 (("^#!.*/bin/sh") "#!/bin/sh")))
429 (find-files dir ".*"))
431 (add-after 'install 'split
432 (lambda* (#:key inputs outputs #:allow-other-keys)
433 ;; Split the binaries to the various outputs.
434 (let* ((out (assoc-ref outputs "out"))
435 (se (assoc-ref outputs "send-email"))
436 (svn (assoc-ref outputs "svn"))
437 (gui (assoc-ref outputs "gui"))
438 (gitk (string-append out "/bin/gitk"))
439 (gitk* (string-append gui "/bin/gitk"))
440 (git-gui (string-append out "/libexec/git-core/git-gui"))
441 (git-gui* (string-append gui "/libexec/git-core/git-gui"))
442 (git-cit (string-append out "/libexec/git-core/git-citool"))
443 (git-cit* (string-append gui "/libexec/git-core/git-citool"))
444 (git-se (string-append out "/libexec/git-core/git-send-email"))
445 (git-se* (string-append se "/libexec/git-core/git-send-email"))
446 (git-svn (string-append out "/libexec/git-core/git-svn"))
447 (git-svn* (string-append svn "/libexec/git-core/git-svn"))
448 (git-sm (string-append out
449 "/libexec/git-core/git-submodule")))
450 (mkdir-p (string-append gui "/bin"))
451 (mkdir-p (string-append gui "/libexec/git-core"))
452 (mkdir-p (string-append se "/libexec/git-core"))
453 (mkdir-p (string-append svn "/libexec/git-core"))
455 (for-each (lambda (old new)
459 (list gitk git-gui git-cit git-se git-svn)
460 (list gitk* git-gui* git-cit* git-se* git-svn*))
462 ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
463 (wrap-program git-svn*
465 (,(string-append (assoc-ref inputs "subversion")
467 `("PERL5LIB" ":" prefix
468 ,(map (lambda (i) (string-append (assoc-ref inputs i)
469 "/lib/perl5/site_perl"))
470 '("subversion" "perl-term-readkey")))
472 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
473 ;; help it find 'libsvn_client-1.so'.
474 `("LD_LIBRARY_PATH" ":" prefix
475 (,(string-append (assoc-ref inputs "subversion")
478 ;; Tell 'git-send-email' where perl modules are.
479 (wrap-program git-se*
480 `("PERL5LIB" ":" prefix
481 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
483 ,@(transitive-input-references
486 (assoc l (package-inputs this-package)))
489 "perl-io-socket-ssl")))))))
491 ;; Tell 'gitweb.cgi' where perl modules are.
492 (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
493 `("PERL5LIB" ":" prefix
494 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
496 ,@(transitive-input-references
499 (assoc l (package-inputs this-package)))
502 ;; Tell 'git-submodule' where Perl is.
505 (,(string-append (assoc-ref inputs "perl")
509 (add-after 'split 'install-man-pages
510 (lambda* (#:key inputs outputs #:allow-other-keys)
511 (let* ((out (assoc-ref outputs "out"))
512 (man (string-append out "/share/man"))
513 (manpages (assoc-ref inputs "git-manpages")))
515 (with-directory-excursion man
516 (invoke "tar" "xvf" manpages))))))))
519 ;; For HTTPS access, Git needs a single-file certificate bundle, specified
520 ;; with $GIT_SSL_CAINFO.
521 (list (search-path-specification
522 (variable "GIT_SSL_CAINFO")
524 (separator #f) ;single entry
525 (files '("etc/ssl/certs/ca-certificates.crt")))
526 (search-path-specification
527 (variable "GIT_EXEC_PATH")
528 (separator #f) ;single entry
529 (files '("libexec/git-core")))))
531 (synopsis "Distributed version control system")
533 "Git is a free distributed version control system designed to handle
534 everything from small to very large projects with speed and efficiency.")
535 (license license:gpl2)
536 (home-page "https://git-scm.com/")))
538 (define-public git-minimal
539 ;; The size of the closure of 'git-minimal' is two thirds that of 'git'.
540 ;; Its test suite runs slightly faster and most importantly it doesn't
541 ;; depend on packages that are expensive to build such as Subversion.
546 (substitute-keyword-arguments (package-arguments git)
548 `(modify-phases ,phases
549 (replace 'patch-makefiles
551 (substitute* "Makefile"
552 (("/usr/bin/perl") (which "perl")))
554 (delete 'build-subtree)
556 (delete 'install-man-pages)
557 (delete 'install-subtree)
558 (delete 'install-credential-netrc)
559 (delete 'install-credential-libsecret)
560 (add-after 'install 'remove-unusable-perl-commands
561 (lambda* (#:key outputs #:allow-other-keys)
562 (let* ((out (assoc-ref outputs "out"))
563 (bin (string-append out "/bin"))
564 (libexec (string-append out "/libexec")))
565 (for-each (lambda (file)
566 (delete-file (string-append libexec
568 '("git-svn" "git-cvsimport" "git-archimport"
569 "git-cvsserver" "git-request-pull"
570 "git-add--interactive" "git-cvsexportcommit"
571 "git-instaweb" "git-send-email"))
572 (delete-file (string-append bin "/git-cvsserver"))
574 ;; These templates typically depend on Perl. Remove them.
575 (delete-file-recursively
576 (string-append out "/share/git-core/templates/hooks"))
578 ;; Gitweb depends on Perl as well.
579 (delete-file-recursively
580 (string-append out "/share/gitweb"))
582 ((#:make-flags flags)
583 `(delete "USE_LIBPCRE2=yes" ,flags))
584 ((#:configure-flags flags)
586 ,@(if (%current-target-system)
587 git-cross-configure-flags
589 ((#:disallowed-references lst '())
593 `(("bash" ,bash-minimal)
594 ("bash-for-tests" ,bash)
595 ("native-perl" ,perl)
596 ("gettext" ,gettext-minimal)))
598 `(("curl" ,curl) ;for HTTP(S) access
599 ("expat" ,expat) ;for 'git push' over HTTP(S)
604 (define-public git2cl
605 (let ((commit "1d74d4c0d933fc69ed5cec838c73502584dead05"))
608 (version (string-append "20120919." (string-take commit 7)))
612 (url "https://git.savannah.nongnu.org/git/git2cl.git")
614 (file-name (git-file-name name version))
617 "0wnnbm2sjvfj0qrksj89jlnl69miwl0vk3wrrvgvpclgys3na2g1"))))
618 (build-system copy-build-system)
622 `(#:install-plan '(("git2cl" "bin/git2cl"))))
623 (home-page "https://savannah.nongnu.org/projects/git2cl")
624 (synopsis "Convert Git logs to GNU ChangeLog format")
625 (description "@code{git2cl} is a command line tool for converting Git
626 logs to GNU ChangeLog format.")
627 (license license:gpl2+))))
629 (define-public gitless
635 ;; The PyPI package lacks a test suite. Build directly from git.
638 (url "https://github.com/gitless-vcs/gitless")
639 (commit (string-append "v" version))))
641 (base32 "048kl27zjr68hgs70g3l98ci9765wxva6azzrhcdys7nsdd493n6"))
642 (file-name (git-file-name name version))))
643 (build-system python-build-system)
646 (modify-phases %standard-phases
647 (add-before 'build 'loosen-requirements
649 (substitute* "setup.py"
650 ;; Using Guix's python-pygit2 1.1.0 appears to work fine…
651 (("pygit2==") "pygit2>="))
653 (add-before 'check 'prepare-for-tests
655 ;; Find the 'gl' command.
656 (rename-file "gl.py" "gl")
657 (setenv "PATH" (string-append (getcwd) ":" (getenv "PATH")))
659 ;; The tests try to run git as if it were already set up.
660 (setenv "HOME" (getcwd))
661 (invoke "git" "config" "--global" "user.email" "git@example.com")
662 (invoke "git" "config" "--global" "user.name" "Guix")))
664 (lambda* (#:key inputs outputs #:allow-other-keys)
665 (let ((out (assoc-ref outputs "out"))
666 (git (assoc-ref inputs "git")))
667 (wrap-program (string-append out "/bin/gl")
668 `("PATH" ":" prefix (,(string-append git "/bin")))
670 (,(string-append out "/lib/python"
671 ,(version-major+minor
672 (package-version python))
674 ,(getenv "PYTHONPATH"))))
677 `(("git-for-tests" ,git-minimal)))
679 `(("git" ,git-minimal)
680 ("python-clint" ,python-clint)
681 ("python-pygit2" ,python-pygit2)
682 ("python-sh" ,python-sh)))
683 (home-page "https://gitless.com")
684 (synopsis "Simple version control system built on top of Git")
686 "Gitless is a Git-compatible version control system that aims to be easy to
687 learn and use. It simplifies the common workflow by committing changes to
688 tracked files by default and saving any uncommitted changes as part of a branch.
690 The friendly @command{gl} command-line interface gives feedback and helps you
691 figure out what to do next.
693 Gitless is implemented on top of Git and its commits and repositories are
694 indistinguishable from Git's. You (or other contributors) can always fall back
695 on @command{git}, and use any regular Git hosting service.")
696 (license license:expat)))
698 (define-public git-cal
705 (url "https://github.com/k4rthik/git-cal")
706 (commit (string-append "v" version))))
707 (file-name (git-file-name name version))
710 "08s9sif3qlk5n2dqpzq5yjczggnqlnxldljspjdqgpfydb2dqg3z"))))
711 (build-system perl-build-system)
712 (home-page "https://github.com/k4rthik/git-cal/")
713 (synopsis "GitHub like contributions calendar for terminal")
714 (description "@code{git-cal} is a script to view commits calendar similar
715 to GitHub contributions calendar.")
716 (license license:expat)))
718 (define-public libgit2
724 (uri (string-append "https://github.com/libgit2/libgit2/"
725 "releases/download/v" version
726 "/libgit2-" version ".tar.gz"))
729 "1fjdglkh04qv3b4alg621pxa689i0wlf8m7nf2755zawjr2zhwxd"))
730 (patches (search-patches "libgit2-mtime-0.patch"))
732 (delete-file-recursively "deps") #t))
733 (modules '((guix build utils)))))
734 (build-system cmake-build-system)
735 (outputs '("out" "debug"))
738 (list "-DUSE_NTLMCLIENT=OFF" ;TODO: package this
739 "-DREGEX_BACKEND=pcre2"
740 "-DUSE_HTTP_PARSER=system"
741 ,@(if (%current-target-system)
743 "-DPKG_CONFIG_EXECUTABLE="
744 (assoc-ref %build-inputs "pkg-config")
745 "/bin/" ,(%current-target-system) "-pkg-config"))
748 (modify-phases %standard-phases
749 (add-after 'unpack 'fix-hardcoded-paths
751 (substitute* "tests/repo/init.c"
752 (("#!/bin/sh") (string-append "#!" (which "sh"))))
753 (substitute* "tests/clar/fs.h"
754 (("/bin/cp") (which "cp"))
755 (("/bin/rm") (which "rm")))
757 ;; Run checks more verbosely, unless we are cross-compiling.
759 (lambda* (#:key (tests? #t) #:allow-other-keys)
761 (invoke "./libgit2_clar" "-v" "-Q")
762 ;; Tests may be disabled if cross-compiling.
763 (format #t "Test suite not run.~%")))))))
765 `(("libssh2" ,libssh2)
766 ("http-parser" ,http-parser)))
768 `(("pkg-config" ,pkg-config)
771 ;; These libraries are in 'Requires.private' in libgit2.pc.
772 `(("openssl" ,openssl)
775 (home-page "https://libgit2.org/")
776 (synopsis "Library providing Git core methods")
778 "Libgit2 is a portable, pure C implementation of the Git core methods
779 provided as a re-entrant linkable library with a solid API, allowing you to
780 write native speed custom Git applications in any language with bindings.")
781 ;; GPLv2 with linking exception
782 (license license:gpl2)))
784 (define-public libgit2-0.28
791 (uri (string-append "https://github.com/libgit2/libgit2/releases/"
793 "/libgit2-" version ".tar.gz"))
796 "0hjgpqjjmkciw1i8jqkx9q2vhdc4fc99qajhrj2bq8ziwsp6hyrb"))
797 (patches (search-patches "libgit2-mtime-0.patch"))
798 (modules '((guix build utils)))
800 (delete-file-recursively "deps") #t))))))
802 (define-public git-crypt
810 (url "https://github.com/AGWA/git-crypt")
812 (file-name (git-file-name name version))
814 (base32 "1ba5s0fvmd9hhnfhfsjrm40v0qpxfnwc8vmm55m0k4dryzkzx66q"))))
815 (build-system gnu-build-system)
818 ("openssl" ,openssl)))
820 `(("docbook-xsl" ,docbook-xsl)
821 ("libxslt" ,libxslt)))
823 `(#:tests? #f ; No tests.
825 (modify-phases %standard-phases
827 (add-after 'unpack 'patch-makefile
828 (lambda* (#:key inputs #:allow-other-keys)
829 (substitute* "Makefile"
830 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
831 (string-append (assoc-ref inputs "docbook-xsl")
832 "/xml/xsl/docbook-xsl-"
833 ,(package-version docbook-xsl)
834 "/manpages/docbook.xsl")))
838 (invoke "make" "ENABLE_MAN=yes")))
840 (lambda* (#:key outputs #:allow-other-keys)
841 (let ((out (assoc-ref outputs "out")))
842 (invoke "make" "install"
844 (string-append "PREFIX=" out))))))))
845 (home-page "https://www.agwa.name/projects/git-crypt/")
846 (synopsis "Transparent encryption of files in a git repository")
847 (description "git-crypt enables transparent encryption and decryption of
848 files in a git repository. Files which you choose to protect are encrypted when
849 committed, and decrypted when checked out. git-crypt lets you freely share a
850 repository containing a mix of public and private content. git-crypt gracefully
851 degrades, so developers without the secret key can still clone and commit to a
852 repository with encrypted files. This lets you store your secret material (such
853 as keys or passwords) in the same repository as your code, without requiring you
854 to lock down your entire repository.")
855 (license license:gpl3+)))
857 (define-public git-remote-gcrypt
859 (name "git-remote-gcrypt")
864 (url "https://git.spwhitton.name/git-remote-gcrypt")
866 (file-name (string-append name "-" version "-checkout"))
869 "0n8fzvr6y0pxrbvkywlky2bd8jvi0ayp4n9hwi84l1ldmv4a40dh"))))
870 (build-system trivial-build-system)
872 `(#:modules ((guix build utils))
874 (use-modules (guix build utils))
875 (let* ((source (assoc-ref %build-inputs "source"))
876 (output (assoc-ref %outputs "out"))
877 (bindir (string-append output "/bin")))
878 (install-file (string-append source "/git-remote-gcrypt")
881 (home-page "https://spwhitton.name/tech/code/git-remote-gcrypt/")
882 (synopsis "Whole remote repository encryption")
883 (description "git-remote-gcrypt is a Git remote helper to push and pull from
884 repositories encrypted with GnuPG. It works with the standard Git transports,
885 including repository hosting services like GitLab.
887 Remote helper programs are invoked by Git to handle network transport. This
888 helper handles @code{gcrypt:} URLs that access a remote repository encrypted
889 with GPG, using our custom format.
891 Supported locations are local, @code{rsync://} and @code{sftp://}, where the
892 repository is stored as a set of files, or instead any Git URL where gcrypt
893 will store the same representation in a Git repository, bridged over arbitrary
896 The aim is to provide confidential, authenticated Git storage and
897 collaboration using typical untrusted file hosts or services.")
898 (license license:gpl3+)))
903 ;; Update the ‘git-source’ input as well.
908 "https://git.zx2c4.com/cgit/snapshot/cgit-"
912 "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss"))))
913 (build-system gnu-build-system)
915 '(#:tests? #f ; XXX: fail to build the in-source git.
917 #:make-flags '("CC=gcc" "SHELL_PATH=sh")
919 (modify-phases %standard-phases
920 (add-after 'unpack 'unpack-git
921 (lambda* (#:key inputs #:allow-other-keys)
922 ;; Unpack the source of git into the 'git' directory.
923 (invoke "tar" "--strip-components=1" "-C" "git" "-xf"
924 (assoc-ref inputs "git-source"))))
925 (add-after 'unpack 'patch-absolute-file-names
926 (lambda* (#:key inputs #:allow-other-keys)
927 (define (quoted-file-name input path)
928 (string-append "\"" input path "\""))
929 (substitute* "ui-snapshot.c"
931 (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
933 (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
935 (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
937 (substitute* "filters/about-formatting.sh"
938 (("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out")
939 "/lib/cgit/filters"))
940 (("\\| tr") (string-append "| " (which "tr"))))
942 (substitute* "filters/html-converters/txt2html"
943 (("sed") (which "sed")))
945 (substitute* "filters/html-converters/man2html"
946 (("groff") (which "groff")))
948 (substitute* "filters/html-converters/rst2html"
949 (("rst2html\\.py") (which "rst2html.py")))
952 (delete 'configure) ; no configure script
953 (add-after 'build 'build-man
954 (lambda* (#:key make-flags #:allow-other-keys)
955 (apply invoke "make" "doc-man" make-flags)))
957 (lambda* (#:key make-flags outputs #:allow-other-keys)
958 (let ((out (assoc-ref outputs "out")))
960 "make" "install" "install-man"
961 (string-append "prefix=" out)
962 (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
964 ;; Move the platform-dependent 'cgit.cgi' into lib to get it
966 (rename-file (string-append out "/share/cgit/cgit.cgi")
967 (string-append out "/lib/cgit/cgit.cgi"))
969 (add-after 'install 'wrap-python-scripts
970 (lambda* (#:key outputs #:allow-other-keys)
973 (wrap-program (string-append (assoc-ref outputs "out")
974 "/lib/cgit/filters/" file)
975 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
976 '("syntax-highlighting.py"
977 "html-converters/md2html"))
980 ;; For building manpage.
981 `(("asciidoc" ,asciidoc)
986 `(;; Building cgit requires a Git source tree.
990 ;; cgit is tightly bound to git. Use GIT_VER from the Makefile,
991 ;; which may not match the current (package-version git).
992 (uri "mirror://kernel.org/software/scm/git/git-2.25.4.tar.xz")
994 (base32 "11am6s46wmn1yll5614smjhzlghbqq6gysgcs64igjr9y5wzpdxq"))))
998 ("python-docutils" ,python-docutils)
999 ("python-markdown" ,python-markdown)
1000 ("python-pygments" ,python-pygments)
1002 (home-page "https://git.zx2c4.com/cgit/")
1003 (synopsis "Web frontend for git repositories")
1005 "CGit is an attempt to create a fast web interface for the Git SCM, using
1006 a built-in cache to decrease server I/O pressure.")
1007 (license license:gpl2)))
1009 (define-public python-git-multimail
1011 (name "python-git-multimail")
1012 (version "1.5.0.post1")
1016 (uri (pypi-uri "git-multimail" version))
1019 "1zkrbsa70anwpw86ysfwalrb7nsr064kygfiyikyq1pl9pcl969y"))))
1020 (build-system python-build-system)
1023 (modify-phases %standard-phases
1024 (add-after 'unpack 'patch
1025 (lambda* (#:key inputs #:allow-other-keys)
1026 (substitute* "git-multimail/git_multimail.py"
1027 (("GIT_EXECUTABLE = 'git'")
1028 (string-append "GIT_EXECUTABLE = '"
1029 (assoc-ref inputs "git") "/bin/git"
1031 (("/usr/sbin/sendmail")
1032 (string-append (assoc-ref inputs "sendmail")
1033 "/usr/sbin/sendmail")))
1037 ("sendmail" ,sendmail)))
1038 (home-page "https://github.com/git-multimail/git-multimail")
1039 (synopsis "Send notification emails for Git pushes")
1041 "This hook sends emails describing changes introduced by pushes to a Git
1042 repository. For each reference that was changed, it emits one ReferenceChange
1043 email summarizing how the reference was changed, followed by one Revision
1044 email for each new commit that was introduced by the reference change.
1046 This script is designed to be used as a post-receive hook in a Git
1048 (license license:gpl2)))
1050 (define-public python-ghp-import
1052 (name "python-ghp-import")
1058 (url "https://github.com/davisp/ghp-import")
1060 (file-name (git-file-name name version))
1062 (base32 "12pmw3zz3i57ljnm0rxdyjqdyhisbvy18mjwkb3bzp5pgzs2f45c"))))
1063 (build-system python-build-system)
1065 `(#:phases (modify-phases %standard-phases
1066 (add-after 'install 'install-documentation
1067 (lambda* (#:key outputs #:allow-other-keys)
1068 (let* ((out (assoc-ref outputs "out"))
1069 (doc (string-append out "/share/doc"))
1070 (licenses (string-append out "/share/licenses")))
1071 (install-file "README.md" doc)
1072 (install-file "LICENSE" licenses)))))))
1073 (home-page "https://github.com/davisp/ghp-import")
1074 (synopsis "Copy directory to the gh-pages branch")
1075 (description "Script that copies a directory to the gh-pages branch (by
1076 default) of the repository.")
1078 ;; See <https://bugs.gnu.org/27913>.
1079 (license (license:non-copyleft
1080 "https://raw.githubusercontent.com/davisp/ghp-import/master/LICENSE"
1081 "Tumbolia Public License"))))
1083 (define-public python2-ghp-import
1084 (package-with-python2
1085 (strip-python2-variant python-ghp-import)))
1087 (define-public python-gitdb
1089 (name "python-gitdb")
1093 (uri (pypi-uri "gitdb" version))
1096 "0l113fphn6msjl3cl3kyf332b6lal7daxdd0nfma0x9ipfb013jr"))))
1097 (build-system python-build-system)
1099 `(#:phases (modify-phases %standard-phases
1100 (add-before 'check 'create-test-repository
1102 (mkdir "/tmp/testrepo")
1103 ;; Some tests require a git repository, so create one.
1104 (with-directory-excursion "/tmp/testrepo"
1105 (do ((filecount 1 (1+ filecount)))
1106 ((> filecount 1000))
1107 (call-with-output-file (string-append
1108 "file" (number->string filecount))
1110 (format port "~a" filecount))))
1112 (invoke "git" "init")
1113 (invoke "git" "config" "user.name" "Total Git")
1114 (invoke "git" "config" "user.email" "git@localhost")
1115 (invoke "git" "add" "-A")
1116 (invoke "git" "commit" "-q" "-m" "dummy commit")))
1118 ;; The repository checkout must be a "bare" clone.
1119 (invoke "git" "clone" "--bare" "/tmp/testrepo"
1120 "/tmp/testrepo.git")))
1123 (setenv "GITDB_TEST_GIT_REPO_BASE" "/tmp/testrepo.git")
1124 ;; Skip tests that must be run from the gitdb repository.
1125 (setenv "TRAVIS" "1")
1126 (invoke "nosetests" "-v"))))))
1128 `(("python-smmap" ,python-smmap)))
1131 ("python-nose" ,python-nose)))
1132 (home-page "https://github.com/gitpython-developers/gitdb")
1133 (synopsis "Python implementation of the Git object database")
1135 "GitDB allows you to access @dfn{bare} Git repositories for reading and
1136 writing. It aims at allowing full access to loose objects as well as packs
1137 with performance and scalability in mind. It operates exclusively on streams,
1138 allowing to handle large objects with a small memory footprint.")
1139 (license license:bsd-3)))
1141 (define-public python-gitpython
1143 (name "python-gitpython")
1147 (uri (pypi-uri "GitPython" version))
1150 "1jzllsy9lwc9yibccgv7h9naxisazx2n3zmpy21c8n5xhysw69p4"))))
1151 (build-system python-build-system)
1153 `(#:tests? #f ;XXX: Tests can only be run within the GitPython repository.
1154 #:phases (modify-phases %standard-phases
1155 (add-after 'unpack 'embed-git-reference
1156 (lambda* (#:key inputs #:allow-other-keys)
1157 (substitute* "git/cmd.py"
1158 (("git_exec_name = \"git\"")
1159 (string-append "git_exec_name = \""
1160 (assoc-ref inputs "git")
1166 `(("python-gitdb" ,python-gitdb)))
1168 `(("python-ddt" ,python-ddt)
1169 ("python-nose" ,python-nose)))
1170 (home-page "https://github.com/gitpython-developers/GitPython")
1171 (synopsis "Python library for interacting with Git repositories")
1173 "GitPython is a python library used to interact with Git repositories,
1174 high-level like git-porcelain, or low-level like git-plumbing.
1176 It provides abstractions of Git objects for easy access of repository data,
1177 and additionally allows you to access the Git repository more directly using
1178 either a pure Python implementation, or the faster, but more resource intensive
1179 @command{git} command implementation.")
1180 (license license:bsd-3)))
1182 (define-public shflags
1189 (url "https://github.com/kward/shflags")
1190 (commit (string-append "v" version))))
1191 (file-name (git-file-name name version))
1194 "1ydx0sb6vz9s2dgp5bd64y7fpzh9qvmlfjxrbmzac8saknijrlly"))))
1195 (build-system gnu-build-system)
1197 `(#:tests? #f ; no tests
1199 (modify-phases %standard-phases
1200 (delete 'configure) ; nothing to configure
1201 (delete 'build) ; nothing to build
1203 (lambda* (#:key outputs #:allow-other-keys)
1204 (let* ((out (assoc-ref outputs "out"))
1205 (src (string-append out "/src")))
1206 (install-file "shflags" src)
1208 (home-page "https://github.com/kward/shflags")
1209 (synopsis "Command-line flags library for shell scripts")
1211 "Shell Flags (shFlags) is a library written to greatly simplify the
1212 handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
1213 ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
1214 different versions of getopt on various OSes make writing portable shell
1215 scripts difficult. shFlags instead provides an API that doesn't change across
1216 shell and OS versions so the script writer can be confident that the script
1218 (license license:lgpl2.1)))
1220 (define-public git-flow
1223 ;; This version has not be officially released yet, so we build it
1224 ;; directly from the git repository.
1229 (url "https://github.com/petervanderdoes/gitflow-avh/")
1231 (file-name (git-file-name name version))
1234 "13q4mnrxr03wz2dkhzy73j384g299m4d545cnhxcaznvdwfany4h"))))
1235 (build-system gnu-build-system)
1236 (inputs `(("shflags" ,shflags)))
1238 '(#:tests? #f ; no tests
1239 #:make-flags (list (string-append "prefix="
1240 (assoc-ref %outputs "out")))
1242 (modify-phases %standard-phases
1243 (add-after 'unpack 'reset-shFlags-link
1244 (lambda* (#:key inputs #:allow-other-keys)
1245 ;; The link points to a file in the shFlags submodule.
1246 ;; Redirect it to point to our system shFlags.
1247 (let ((shflags (assoc-ref inputs "shflags")))
1249 (delete-file "gitflow-shFlags")
1250 (symlink (string-append shflags "/src/shflags")
1251 "gitflow-shFlags")))))
1254 (home-page "https://nvie.com/posts/a-successful-git-branching-model/")
1255 (synopsis "Git extensions for Vincent Driessen's branching model")
1257 "Vincent Driessen's branching model is a git branching and release
1258 management strategy that helps developers keep track of features, hotfixes,
1259 and releases in bigger software projects. The git-flow library of git
1260 subcommands helps automate some parts of the flow to make working with it a
1262 (license license:bsd-2)))
1264 (define-public stgit
1272 (url "https://github.com/ctmarinas/stgit")
1273 (commit (string-append "v" version))))
1274 (file-name (git-file-name name version))
1276 (base32 "0dixgvjlsk3xisj8blzdhh0nphm5zqkjbj081wgsba52z4zq1y0q"))))
1277 (build-system python-build-system)
1284 (modify-phases %standard-phases
1285 (add-after 'unpack 'hard-code-version
1287 ;; setup.py tries to cleverly extract the version number from the
1288 ;; git history, which the source checkout lacks. Hard-code one.
1289 (substitute* "setup.py"
1291 (format #f "'~a'" ,version)))
1293 (add-before 'check 'patch-tests
1295 (substitute* (list "t/t1900-mail.sh"
1296 "t/t7504-commit-msg-hook.sh")
1304 (string-append "SHELL_PATH=" (which "bash"))
1306 (home-page "https://stacked-git.github.io/")
1307 (synopsis "Stacked Git")
1309 "StGit is a command-line application that provides functionality similar
1310 to Quilt (i.e., pushing/popping patches to/from a stack), but using Git
1311 instead of @command{diff} and @command{patch}. StGit stores its patches in a
1312 Git repository as normal Git commits, and provides a number of commands to
1313 manipulate them in various ways.")
1314 (license license:gpl2)))
1319 (version "1.20151229")
1324 (url "https://github.com/RichiH/vcsh")
1325 (commit (string-append "v" version))))
1326 (file-name (git-file-name name version))
1328 (base32 "1grpj45nbpv4j60vd2kg4rj53zrm0bc0h9l4pfd3c2mwbvywm6ab"))))
1329 (build-system gnu-build-system)
1331 `(("which" ,which)))
1335 ("perl-test-harness" ,perl-test-harness)
1336 ("perl-shell-command" ,perl-shell-command)
1337 ("perl-test-most" ,perl-test-most)))
1339 '(#:phases (modify-phases %standard-phases
1342 #:make-flags (list (string-append "PREFIX="
1343 (assoc-ref %outputs "out")))
1344 #:test-target "test"))
1345 (home-page "https://github.com/RichiH/vcsh")
1346 (synopsis "Version control system for @code{$HOME}")
1348 "vcsh version-controls configuration files in several Git repositories,
1349 all in one single directory. They all maintain their working trees without
1350 clobbering each other or interfering otherwise. By default, all Git
1351 repositories maintained via vcsh store the actual files in @code{$HOME},
1352 though this can be overridden.")
1353 (license license:gpl2+)))
1355 (define-public git-test-sequence
1356 (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76"))
1358 (name "git-test-sequence")
1359 (version (string-append "20140312." (string-take commit 7)))
1363 ;; There are many other scripts in this directory; we
1364 ;; are interested in just one for this package.
1365 (url "https://github.com/dustin/bindir")
1367 (file-name (git-file-name name version))
1370 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
1371 (build-system trivial-build-system)
1373 `(#:modules ((guix build utils))
1375 (use-modules (guix build utils))
1376 (let* ((source (assoc-ref %build-inputs "source"))
1377 (output (assoc-ref %outputs "out"))
1378 (bindir (string-append output "/bin"))
1379 (script "git-test-sequence"))
1380 (install-file (string-append source "/" script)
1383 (home-page "https://dustin.sallings.org/2010/03/28/git-test-sequence.html")
1384 (synopsis "Run a command over a sequence of commits")
1386 "git-test-sequence is similar to an automated git bisect except it’s
1387 linear. It will test every change between two points in the DAG. It will
1388 also walk each side of a merge and test those changes individually.")
1389 (license (license:x11-style "file://LICENSE")))))
1391 (define-public gitolite
1399 (url "https://github.com/sitaramc/gitolite")
1400 (commit (string-append "v" version))))
1401 (file-name (git-file-name name version))
1403 (base32 "05xw1pmagvkrbzga5pgl3xk9qyc6b5x73f842454f3w9ijspa8zy"))))
1404 (build-system gnu-build-system)
1406 '(#:tests? #f ; no tests
1407 #:phases (modify-phases %standard-phases
1410 (add-before 'install 'patch-scripts
1411 (lambda* (#:key inputs #:allow-other-keys)
1412 (let ((perl (string-append (assoc-ref inputs "perl")
1414 ;; This seems to take care of every shell script that
1416 (substitute* (find-files "." ".*")
1418 (string-append " " perl " -")))
1420 (substitute* (find-files "src/triggers" ".*")
1422 (string-append " " (which "sed") " ")))
1425 '("src/triggers/post-compile/update-gitweb-access-list"
1426 "src/triggers/post-compile/ssh-authkeys-split"
1427 "src/triggers/upstream")
1429 (string-append " " (which "grep") " ")))
1431 ;; Avoid references to the store in authorized_keys.
1432 ;; This works because gitolite-shell is in the PATH.
1433 (substitute* "src/triggers/post-compile/ssh-authkeys"
1434 (("\\$glshell \\$user")
1435 "gitolite-shell $user"))
1437 (add-before 'install 'patch-source
1438 (lambda* (#:key inputs #:allow-other-keys)
1439 ;; Gitolite uses cat to test the readability of the
1441 (substitute* "src/lib/Gitolite/Setup.pm"
1443 (string-append "\"" (which "cat") " "))
1445 (string-append "\"" (which "ssh-keygen"))))
1447 (substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
1448 "src/lib/Gitolite/Hooks/Update.pm")
1450 (string-append (assoc-ref inputs "perl")
1453 (substitute* "src/lib/Gitolite/Common.pm"
1455 (string-append "\"" (which "ssh-keygen")))
1458 (assoc-ref inputs "inetutils")
1463 (lambda* (#:key outputs #:allow-other-keys)
1464 (let* ((output (assoc-ref outputs "out"))
1465 (sharedir (string-append output "/share/gitolite"))
1466 (bindir (string-append output "/bin")))
1469 (invoke "./install" "-to" sharedir)
1470 ;; Create symlinks for executable scripts in /bin.
1471 (for-each (lambda (script)
1472 (symlink (string-append sharedir "/" script)
1473 (string-append bindir "/" script)))
1474 '("gitolite" "gitolite-shell"))
1476 (add-after 'install 'wrap-scripts
1477 (lambda* (#:key inputs outputs #:allow-other-keys)
1478 (let ((out (assoc-ref outputs "out"))
1479 (coreutils (assoc-ref inputs "coreutils"))
1480 (findutils (assoc-ref inputs "findutils"))
1481 (git (assoc-ref inputs "git")))
1482 (wrap-program (string-append out "/bin/gitolite")
1485 (string-append dir "/bin"))
1486 (list out coreutils findutils git))))
1490 ("coreutils" ,coreutils)
1491 ("findutils" ,findutils)
1492 ("inetutils" ,inetutils)))
1493 ;; git and openssh are propagated because trying to patch the source via
1494 ;; regexp matching is too brittle and prone to false positives.
1497 ("openssh" ,openssh)))
1498 (home-page "https://gitolite.com")
1499 (synopsis "Git access control layer")
1501 "Gitolite is an access control layer on top of Git, providing fine access
1502 control to Git repositories.")
1503 (license license:gpl2)))
1505 (define-public pre-commit
1511 ;; No tests in the PyPI tarball.
1514 (url "https://github.com/pre-commit/pre-commit")
1515 (commit (string-append "v" version))))
1516 (file-name (git-file-name name version))
1518 (base32 "0b3ks6viccq3n4p8i8zgfd40vp1k5nkhmmlz7p4nxcdizw8zxgn8"))))
1519 (build-system python-build-system)
1522 (modify-phases %standard-phases
1523 (add-before 'check 'set-up-git
1525 ;; Change from /homeless-shelter to /tmp for write permission.
1526 (setenv "HOME" "/tmp")
1527 ;; Environment variables used in the tests.
1528 (setenv "GIT_AUTHOR_NAME" "Your Name")
1529 (setenv "GIT_COMMITTER_NAME" "Your Name")
1530 (setenv "GIT_AUTHOR_EMAIL" "you@example.com")
1531 (setenv "GIT_COMMITTER_EMAIL" "you@example.com")
1532 (invoke "git" "config" "--global" "user.name" "Your Name")
1533 (invoke "git" "config" "--global" "user.email" "you@example.com")
1536 (lambda* (#:key inputs outputs #:allow-other-keys)
1537 (add-installed-pythonpath inputs outputs)
1538 (invoke "pytest" "tests" "-k"
1540 ;; Disable conda tests.
1541 "not test_conda_hook"
1542 " and not test_conda_with_additional_dependencies_hook"
1543 " and not test_local_conda_additional_dependencies"
1544 ;; Disable cpan tests.
1545 " and not test_local_perl_additional_dependencies"
1546 " and not test_perl_hook"
1547 ;; Disable Ruby tests.
1548 " and not test_additional_ruby_dependencies_installed"
1549 " and not test_install_rbenv"
1550 " and not test_install_rbenv_with_version"
1551 " and not test_run_a_ruby_hook"
1552 " and not test_run_ruby_hook_with_disable_shared_gems"
1553 " and not test_run_versioned_ruby_hook"
1554 ;; Disable Cargo tests.
1555 " and not test_additional_rust_cli_dependencies_installed"
1556 " and not test_additional_rust_lib_dependencies_installed"
1557 " and not test_local_rust_additional_dependencies"
1558 " and not test_rust_hook"
1559 ;; Disable dotnet tests.
1560 " and not test_dotnet_hook"
1561 ;; Disable nodejs tests.
1562 " and not test_unhealthy_if_system_node_goes_missing"
1563 " and not test_installs_without_links_outside_env"
1564 " and not test_healthy_system_node"
1565 ;; Disable python2 test.
1566 " and not test_switch_language_versions_doesnt_clobber"
1567 ;; These tests try to open a network socket.
1568 " and not test_additional_golang_dependencies_installed"
1569 " and not test_additional_node_dependencies_installed"
1570 " and not test_golang_hook"
1571 " and not test_golang_hook_still_works_when_gobin_is_set"
1572 " and not test_local_golang_additional_dependencies"
1573 " and not test_main"
1574 " and not test_node_hook_with_npm_userconfig_set"
1575 " and not test_run_a_node_hook"
1576 " and not test_run_versioned_node_hook"
1577 ;; Tests failing with a permission error.
1578 ;; They try to write to the filesystem.
1579 " and not test_autoupdate_hook_disappearing_repo"
1580 " and not test_hook_disppearing_repo_raises"
1581 " and not test_img_conflict"
1582 " and not test_img_something_unstaged"
1583 " and not test_installed_from_venv"
1584 " and not test_too_new_version"
1585 " and not test_try_repo_uncommitted_changes"
1586 " and not test_versions_ok"
1587 ;; This test tries to activate a virtualenv.
1588 " and not test_healthy_venv_creator"
1589 ;; Fatal error: Not a Git repository.
1590 " and not test_all_cmds"
1591 " and not test_try_repo"
1592 ;; No module named 'pip._internal.cli.main'.
1593 " and not test_additional_dependencies_roll_forward"
1594 ;; Assertion errors.
1595 " and not test_install_existing_hooks_no_overwrite"
1596 " and not test_uninstall_restores_legacy_hooks"))))
1597 (add-before 'reset-gzip-timestamps 'make-files-writable
1598 (lambda* (#:key outputs #:allow-other-keys)
1599 ;; Make sure .gz files are writable so that the
1600 ;; 'reset-gzip-timestamps' phase can do its work.
1601 (let ((out (assoc-ref outputs "out")))
1602 (for-each make-file-writable
1603 (find-files out "\\.gz$"))
1606 `(("git" ,git-minimal)
1607 ("python-pytest" ,python-pytest)
1608 ("python-re-assert" ,python-re-assert)))
1609 ;; Propagate because pre-commit is also used as a module.
1611 `(("python-cfgv" ,python-cfgv)
1612 ("python-identify" ,python-identify)
1613 ("python-nodeenv" ,python-nodeenv)
1614 ("python-pyyaml" ,python-pyyaml)
1615 ("python-toml" ,python-toml)
1616 ("python-virtualenv" ,python-virtualenv)))
1617 (home-page "https://pre-commit.com/")
1618 (synopsis "Framework for managing and maintaining multi-language pre-commit hooks")
1620 "Pre-commit is a multi-language package manager for pre-commit hooks. You
1621 specify a list of hooks you want and pre-commit manages the installation and
1622 execution of any hook written in any language before every commit.")
1623 (license license:expat)))
1625 (define-public mercurial
1631 (uri (string-append "https://www.mercurial-scm.org/"
1632 "release/mercurial-" version ".tar.gz"))
1635 "1bgz8f1a7lnmh6lzcvwg6q1yx6i7yibhwy06l4k55i04957jap75"))))
1636 (build-system python-build-system)
1639 (modify-phases %standard-phases
1640 (add-after 'unpack 'patch-tests
1642 (substitute* '("tests/test-extdiff.t"
1643 "tests/test-logtoprocess.t"
1644 "tests/test-patchbomb.t"
1645 "tests/test-run-tests.t"
1646 "tests/test-transplant.t")
1650 (lambda* (#:key tests? #:allow-other-keys)
1651 (with-directory-excursion "tests"
1652 ;; The following tests are known to fail.
1653 (for-each delete-file
1654 '(;; XXX: This test calls 'run-tests.py --with-hg=
1655 ;; `which hg`' and fails because there is no hg on
1656 ;; PATH from before (that's why we are building it!)?
1659 ;; These tests fail because the program is not
1660 ;; connected to a TTY in the build container.
1661 "test-nointerrupt.t"
1662 "test-transaction-rollback-on-sigpipe.t"
1664 ;; FIXME: This gets killed but does not receive an interrupt.
1665 "test-commandserver.t"
1667 ;; Only works when run in a hg-repo, not in an
1668 ;; extracted tarball
1671 ;; TODO: the fqaddr() call fails in the build
1672 ;; container, causing these server tests to fail.
1674 "test-http-branchmap.t"
1675 "test-pull-bundle.t"
1678 "test-subrepo-deep-nested-change.t"
1679 "test-subrepo-recursion.t"))
1681 (invoke "./run-tests.py"
1682 ;; ‘make check’ does not respect ‘-j’.
1683 (string-append "-j" (number->string
1684 (parallel-job-count)))
1685 ;; The default time-outs are too low for many systems.
1686 ;; Raise them generously: Guix enforces its own.
1688 "--slowtimeout" "86400"
1689 ;; The test suite takes a long time and produces little
1690 ;; output by default. Prevent timeouts due to silence.
1692 ;; The following inputs are only needed to run the tests.
1694 `(("python-nose" ,python-nose)
1697 (home-page "https://www.mercurial-scm.org/")
1698 (synopsis "Decentralized version control system")
1700 "Mercurial is a free, distributed source control management tool.
1701 It efficiently handles projects of any size
1702 and offers an easy and intuitive interface.")
1703 (license license:gpl2+)))
1705 (define-public python-hg-evolve
1707 (name "python-hg-evolve")
1713 (url "https://www.mercurial-scm.org/repo/evolve")
1714 (changeset version)))
1715 (file-name (string-append name "-" version "-checkout"))
1718 "1lz407373lfam9n02gq0l0rc2sjvn0m96kbzy93ipia3ika8fa68"))))
1719 (build-system python-build-system)
1721 ;; Tests need mercurial source code.
1724 `(("mercurial" ,mercurial)))
1725 (home-page "https://www.mercurial-scm.org/doc/evolution/")
1726 (synopsis "Flexible evolution of Mercurial history")
1727 (description "Evolve is a Mercurial extension for faster and safer mutable
1728 history. It implements the changeset evolution concept for Mercurial.")
1729 (license license:gpl2)))
1737 (uri (string-append "https://notroj.github.io/neon/neon-"
1741 "0y46dbhiblcvg8k41bdydr3fivghwk73z040ki5825d24ynf67ng"))))
1742 (build-system gnu-build-system)
1745 ("pkg-config" ,pkg-config)))
1747 `(("libxml2" ,libxml2)
1748 ("openssl" ,openssl)
1751 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
1752 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
1754 #:configure-flags '("--enable-shared"
1756 ;; requires libgnutils-config, deprecated
1758 ; "--with-ssl=gnutls")))
1759 "--with-ssl=openssl")))
1760 (home-page "https://notroj.github.io/neon/")
1761 (synopsis "HTTP and WebDAV client library")
1763 "Neon is an HTTP and WebDAV client library, with a C interface and the
1766 @item High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
1768 @item low-level interface to the HTTP request/response engine, allowing the use
1769 of arbitrary HTTP methods, headers, etc.;
1770 @item authentication support including Basic and Digest support, along with
1771 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
1772 @item SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
1773 verifying server certificates, handling client certificates, and examining
1774 certificate properties, smartcard-based client certificates are also
1775 supported via a PKCS#11 wrapper interface;
1776 @item abstract interface to parsing XML using libxml2 or expat, and wrappers for
1777 simplifying handling XML HTTP response bodies;
1778 @item WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
1779 property manipulation.
1781 (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+
1783 (define-public subversion
1789 (uri (string-append "mirror://apache/subversion/"
1790 "subversion-" version ".tar.bz2"))
1793 "1ag1hvcm9q92kgalzbbgcsq9clxnzmbj9nciz9lmabjx4lyajp9c"))))
1794 (build-system gnu-build-system)
1796 '(#:parallel-tests? #f ; TODO Seems to cause test failures on
1798 #:configure-flags '("--enable-static=no")
1800 (modify-phases %standard-phases
1801 (add-after 'configure 'patch-libtool-wrapper-ls
1802 (lambda* (#:key inputs #:allow-other-keys)
1803 ;; This substitution allows tests svnauthz_tests and svnlook_tests
1804 ;; to pass. These tests execute svnauthz and svnlook through
1805 ;; their libtool wrapper scripts from svn hooks, whose empty
1806 ;; environments cause "ls: command not found" errors. It would be
1807 ;; nice if this fix ultimately made its way into libtool.
1808 (let ((coreutils (assoc-ref inputs "coreutils")))
1809 (substitute* "libtool"
1810 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))
1812 (add-before 'build 'patch-test-sh
1814 (substitute* "subversion/tests/libsvn_repos/repos-test.c"
1815 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1817 (add-before 'check 'set-PARALLEL
1818 (lambda* (#:key parallel-tests? #:allow-other-keys)
1820 (setenv "PARALLEL" (number->string (parallel-job-count)))
1821 (simple-format #t "parallel-tests? are disabled\n"))
1823 (add-after 'install 'install-perl-bindings
1824 (lambda* (#:key outputs #:allow-other-keys)
1825 ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
1826 (let ((out (assoc-ref outputs "out")))
1827 (invoke "make" "swig-pl-lib")
1828 ;; FIXME: Test failures.
1829 ;; (invoke "make" "check-swig-pl")
1830 (invoke "make" "install-swig-pl-lib")
1832 ;; Set the right installation prefix.
1833 (with-directory-excursion
1834 "subversion/bindings/swig/perl/native"
1835 (invoke "perl" "Makefile.PL"
1837 (string-append "PREFIX=" out))
1838 (invoke "make" "install"
1839 (string-append "OTHERLDFLAGS="
1843 `(("pkg-config" ,pkg-config)
1844 ;; For the Perl bindings.
1848 ("apr-util" ,apr-util)
1852 ("python" ,python-wrapper)
1854 ("utf8proc" ,utf8proc)
1856 (home-page "https://subversion.apache.org/")
1857 (synopsis "Revision control system")
1859 "@dfn{Subversion} (svn) exists to be recognized and adopted as a
1860 centralized version control system characterized by its
1861 reliability as a safe haven for valuable data; the simplicity of its model and
1862 usage; and its ability to support the needs of a wide variety of users and
1863 projects, from individuals to large-scale enterprise operations.")
1864 (license license:asl2.0)))
1872 (uri (string-append "mirror://gnu/rcs/rcs-"
1876 "1if5pa4iip2p70gljm54nggfdnsfjxa4cqz8fpj07lvsijary39s"))
1877 (patches (search-patches "rcs-5.10.0-no-stdin.patch"))))
1878 (build-system gnu-build-system)
1879 (native-inputs `(("ed" ,ed)))
1880 (home-page "https://www.gnu.org/software/rcs/")
1881 (synopsis "Per-file local revision control system")
1883 "RCS is the original Revision Control System. It works on a
1884 file-by-file basis, in contrast to subsequent version control systems such as
1885 CVS, Subversion, and Git. This can make it suitable for system
1886 administration files, for example, which are often inherently local to one
1888 (license license:gpl3+)))
1897 "https://ftp.gnu.org/non-gnu/cvs/source/feature/"
1898 version "/cvs-" version ".tar.bz2"))
1899 (patches (search-patches "cvs-CVE-2017-12836.patch"))
1902 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
1903 (build-system gnu-build-system)
1905 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
1907 #:configure-flags (list "--with-external-zlib")))
1908 (inputs `(("zlib" ,zlib)
1909 ("nano" ,nano))) ; the default editor
1910 (home-page "http://cvs.nongnu.org")
1911 (synopsis "Historical centralized version control system")
1913 "CVS is a version control system, an important component of Source
1914 Configuration Management (SCM). Using it, you can record the history of
1915 sources files, and documents. It fills a similar role to the free software
1916 RCS, PRCS, and Aegis packages.")
1917 (license license:gpl1+)))
1919 (define-public cvs-fast-export
1921 (name "cvs-fast-export")
1925 (uri (string-append "http://www.catb.org/~esr/cvs-fast-export/"
1926 "cvs-fast-export-" version ".tar.gz"))
1929 "058bzp3npng48ascls943m16kgvrl0h197a10brf7mvx8zpfc7sc"))))
1930 (build-system gnu-build-system)
1933 (modify-phases %standard-phases
1934 (delete 'configure)) ; no configure script
1935 #:parallel-build? #f ; parallel a2x commands fail spectacularly
1937 (list "CC=gcc" (string-append "prefix?=" (assoc-ref %outputs "out")))))
1940 ("python" ,python-wrapper)))
1942 `(("asciidoc" ,asciidoc)
1943 ;; These are needed for the tests.
1946 (home-page "http://www.catb.org/esr/cvs-fast-export/")
1947 (synopsis "Export an RCS or CVS history as a fast-import stream")
1948 (description "This program analyzes a collection of RCS files in a CVS
1949 repository (or outside of one) and, when possible, emits an equivalent history
1950 in the form of a fast-import stream. Not all possible histories can be
1951 rendered this way; the program tries to emit useful warnings when it can't.
1953 The program can also produce a visualization of the resulting commit directed
1954 acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org,
1955 Graphviz}. The package also includes @command{cvssync}, a tool for mirroring
1956 masters from remote CVS hosts.")
1957 (license license:gpl2+)))
1959 (define-public vc-dwim
1965 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
1969 "0am6axxdvkm2vwgg0gjrd930yv4dlsdbf0rdv0zh5bhy1ir64rph"))))
1970 (build-system gnu-build-system)
1971 (inputs `(("perl" ,perl)))
1973 `(("emacs" ,emacs-minimal) ; for `ctags'
1974 ("inetutils" ,inetutils))) ; for `hostname', used in the tests
1975 (home-page "https://www.gnu.org/software/vc-dwim/")
1976 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
1978 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
1979 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
1980 using version control at the same time, for example by printing a reminder
1981 when a file change has been described in the ChangeLog but the file has not
1982 been added to the VC. vc-chlog scans changed files and generates
1983 standards-compliant ChangeLog entries based on the changes that it detects.")
1984 (license license:gpl3+)))
1986 (define-public diffstat
1994 (string-append "ftp://invisible-island.net/diffstat/"
1995 "diffstat-" version ".tgz")
1996 (string-append "http://invisible-mirror.net/archives/diffstat/"
1997 "diffstat-" version ".tgz")))
2000 "1z7pwcv48fjnhxrjcsjdy83x8b9ckl582mbbds90a79fkn6y7bmq"))))
2001 (build-system gnu-build-system)
2002 (home-page "https://invisible-island.net/diffstat/")
2003 (synopsis "Make histograms from the output of @command{diff}")
2005 "Diffstat reads the output of @command{diff} and displays a histogram of
2006 the insertions, deletions, and modifications per file. It is useful for
2007 reviewing large, complex patch files.")
2008 (license (license:x11-style "file://COPYING"))))
2016 (uri (string-append "mirror://gnu/" name "/CSSC-"
2020 "1vsisqq573xjr2qpn19iwmpqgl3mq03m790akpa4rvj60b4d1gni"))))
2021 (build-system gnu-build-system)
2024 (modify-phases %standard-phases
2025 (add-before 'check 'precheck
2028 (substitute* "tests/common/test-common"
2029 (("/bin/pwd") (which "pwd")))
2031 (substitute* "tests/prt/all-512.sh"
2032 (("/bin/sh") (which "sh")))
2034 ;; XXX: This test has no hope of passing until there is a "nogroup"
2035 ;; entry (or at least some group to which the guix builder does
2036 ;; not belong) in the /etc/group file of the build environment.
2037 ;; Currently we do not have such a group. Disable this test for now.
2038 (substitute* "tests/Makefile"
2039 (("test-delta ") ""))))))))
2040 ;; These are needed for the tests
2041 (native-inputs `(("git" ,git)
2043 (home-page "https://www.gnu.org/software/cssc/")
2044 (synopsis "File-based version control like SCCS")
2045 (description "GNU CSSC provides a replacement for the legacy Unix source
2046 code control system SCCS. This allows old code still under that system to be
2047 accessed and migrated on modern systems.")
2048 (license license:gpl3+)))
2050 ;; This package can unfortunately work only in -TEST mode, since Aegis
2051 ;; requires that it is installed setuid root.
2052 (define-public aegis
2058 (uri (string-append "mirror://sourceforge/aegis/aegis/" version
2059 "/aegis-" version ".tar.gz"))
2062 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
2063 (patches (search-patches "aegis-perl-tempdir1.patch"
2064 "aegis-perl-tempdir2.patch"
2065 "aegis-test-fixup-1.patch"
2066 "aegis-test-fixup-2.patch"
2067 "aegis-constness-error.patch"))))
2068 (build-system gnu-build-system)
2070 `(("e2fsprogs" ,e2fsprogs)
2073 ("libxml2" ,libxml2)
2075 ("gettext" ,gettext-minimal)))
2080 ;; Various tests require the following:
2084 ("subversion" ,subversion)
2088 `(#:configure-flags (list "--with-no-aegis-configured"
2089 "--sharedstatedir=/var/com/aegis"
2090 ;; Uses the old 'throw()' specifier with 'new'
2091 ;; which changed in C++11.
2092 "CXXFLAGS=-std=c++03")
2093 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
2095 (modify-phases %standard-phases
2096 (add-before 'configure 'pre-conf
2098 (substitute* (append '("configure"
2099 "etc/check-tar-gz.sh"
2103 "script/aebisect.in"
2104 "script/aeintegratq.in"
2106 "script/test_funcs.in"
2107 "web/eg_oss_templ.sh"
2109 "libaegis/getpw_cache.cc")
2110 (find-files "test" "\\.sh"))
2111 (("/bin/sh") (which "sh")))
2112 (setenv "SH" (which "sh"))
2116 (let ((home (string-append (getcwd) "/my-new-home")))
2117 ;; Some tests need to write to $HOME.
2119 (setenv "HOME" home)
2121 ;; This test assumes that flex has been symlinked to "lex".
2122 (substitute* "test/00/t0011a.sh"
2123 (("type lex") "type flex"))
2125 ;; XXX Disable tests that fail, for unknown reasons, ‘for now’.
2127 (lambda (test) (substitute* "Makefile"
2128 (((string-append "test/" test "\\.ES ")) "")))
2133 ;; The author decided to call the check rule "sure".
2134 (invoke "make" "sure")))))))
2135 (home-page "https://sourceforge.net/projects/aegis/")
2136 (synopsis "Project change supervisor")
2137 (description "Aegis is a project change supervisor, and performs some of
2138 the Software Configuration Management needed in a CASE environment. Aegis
2139 provides a framework within which a team of developers may work on many
2140 changes to a program independently, and Aegis coordinates integrating these
2141 changes back into the master source of the program, with as little disruption
2142 as possible. Resolution of contention for source files, a major headache for
2143 any project with more than one developer, is one of Aegis's major functions.")
2144 (license license:gpl3+)))
2146 (define-public reposurgeon
2148 (name "reposurgeon")
2152 (uri (string-append "http://www.catb.org/~esr/" name "/"
2153 name "-" version ".tar.xz"))
2156 "1af0z14wcm4bk5a9ysinbwq2fp3lf5f7i8mvwh7286hr3fnagcaz"))
2157 (patches (search-patches
2158 "reposurgeon-add-missing-docbook-files.patch"))))
2159 (build-system gnu-build-system)
2163 (string-append "target=" (assoc-ref %outputs "out")))
2165 (modify-phases %standard-phases
2166 (add-after 'unpack 'patch-inputs
2167 (lambda* (#:key inputs #:allow-other-keys)
2168 (let ((tzdata (assoc-ref inputs "tzdata")))
2169 (substitute* "reposurgeon"
2170 (("/usr/share/zoneinfo")
2171 (string-append tzdata "/share/zoneinfo")))
2172 (substitute* "test/svn-to-svn"
2173 (("/bin/echo") "echo"))
2175 (delete 'configure) ; no configure script
2176 (add-before 'build 'fix-docbook
2177 (lambda* (#:key inputs #:allow-other-keys)
2178 (substitute* (find-files "." "\\.xml$")
2179 (("docbook/docbookx.dtd")
2180 (string-append (assoc-ref inputs "docbook-xml")
2181 "/xml/dtd/docbook/docbookx.dtd")))
2183 (add-before 'check 'set-up-test-environment
2184 (lambda* (#:key inputs #:allow-other-keys)
2185 (let ((tzdata (assoc-ref inputs "tzdata")))
2186 (setenv "TZDIR" (string-append tzdata "/share/zoneinfo"))
2188 (add-after 'install 'install-emacs-data
2189 (lambda* (#:key outputs #:allow-other-keys)
2190 (install-file "reposurgeon-mode.el"
2191 (string-append (assoc-ref outputs "out")
2192 "/share/emacs/site-lisp"))
2195 `(("python" ,python-wrapper)
2196 ("tzdata" ,tzdata)))
2198 `( ;; For building documentation.
2199 ("asciidoc" ,asciidoc)
2200 ("docbook-xml" ,docbook-xml)
2201 ("docbook-xsl" ,docbook-xsl)
2202 ("libxml2" ,libxml2)
2208 ("mercurial" ,mercurial)
2209 ("subversion" ,subversion)))
2210 (home-page "http://www.catb.org/~esr/reposurgeon/")
2211 (synopsis "Edit version-control repository history")
2212 (description "Reposurgeon enables risky operations that version-control
2213 systems don't want to let you do, such as editing past comments and metadata
2214 and removing commits. It works with any version control system that can
2215 export and import Git fast-import streams, including Git, Mercurial, Fossil,
2216 Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly
2217 and can thus be used to script production of very high-quality conversions
2218 from Subversion to any supported Distributed Version Control System (DVCS).")
2219 ;; Most files are distributed under bsd-2, except 'repocutter' which is
2221 (license (list license:bsd-2 license:bsd-3))))
2230 "https://github.com/jonas/tig/releases/download/tig-"
2231 version "/tig-" version ".tar.gz"))
2234 "1p1575yh4daxjifywxkd0hgyfwciylqcm2qakawvwn6mk620ca75"))))
2235 (build-system gnu-build-system)
2237 `(("asciidoc" ,asciidoc)
2240 `(("ncurses" ,ncurses)
2241 ("readline" ,readline)))
2244 (modify-phases %standard-phases
2245 (add-after 'install 'install-doc
2247 (invoke "make" "install-doc"))))
2248 #:test-target "test"
2249 #:tests? #f)) ; tests require access to /dev/tty
2250 (home-page "https://jonas.github.io/tig/")
2251 (synopsis "Ncurses-based text user interface for Git")
2253 "Tig is an ncurses text user interface for Git, primarily intended as
2254 a history browser. It can also stage hunks for commit, or colorize the
2255 output of the @code{git} command.")
2256 (license license:gpl2+)))
2258 (define-public findnewest
2266 (url "https://github.com/0-wiz-0/findnewest")
2267 (commit (string-append "findnewest-" version))))
2268 (file-name (git-file-name name version))
2270 (base32 "1x1cbn2b27h5r0ah5xc06fkalfdci2ngrgd4wibxjw0h88h0nvgq"))))
2271 (build-system gnu-build-system)
2272 (native-inputs `(("autoconf" ,autoconf)
2273 ("automake" ,automake)))
2274 (home-page "https://github.com/0-wiz-0/findnewest/releases")
2275 (synopsis "Print the modification time of the latest file")
2277 "Recursively find the newest file in a file tree and print its
2278 modification time.")
2279 (license license:bsd-2)))
2281 (define-public myrepos
2284 (version "1.20180726")
2289 (url "git://myrepos.branchable.com/myrepos")
2291 (file-name (string-append name "-" version "-checkout"))
2293 (base32 "0jphw61plm8cgklja6hs639xhdvxgvjwbr6jpvjwpp7hc5gmhms5"))))
2294 (build-system gnu-build-system)
2296 '(#:test-target "test"
2297 #:make-flags (list (string-append "PREFIX=" %output))
2299 (modify-phases %standard-phases
2301 (add-after 'install 'wrap-webcheckout
2302 (lambda* (#:key inputs outputs #:allow-other-keys)
2303 (let ((out (assoc-ref outputs "out")))
2304 (wrap-program (string-append out "/bin/webcheckout")
2305 `("PERL5LIB" ":" prefix
2306 ,(map (lambda (i) (string-append (assoc-ref inputs i)
2307 "/lib/perl5/site_perl"))
2308 '("perl-encode-locale" "perl-http-date"
2309 "perl-http-message" "perl-html-parser" "perl-libwww"
2310 "perl-uri" "perl-try-tiny"))))
2314 ("perl-encode-locale" ,perl-encode-locale)
2315 ("perl-html-parser" ,perl-html-parser)
2316 ("perl-http-date" ,perl-http-date)
2317 ("perl-http-message" ,perl-http-message)
2318 ("perl-libwww" ,perl-libwww)
2319 ("perl-try-tiny" ,perl-try-tiny)
2320 ("perl-uri" ,perl-uri)))
2321 (home-page "https://myrepos.branchable.com/")
2322 (synopsis "Multiple repository management tool")
2324 "Myrepos provides the @code{mr} command, which maps an operation (e.g.,
2325 fetching updates) over a collection of version control repositories. It
2326 supports a large number of version control systems: Git, Subversion,
2327 Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
2328 (license license:gpl2+)))
2330 (define-public grokmirror
2338 (url (string-append "https://git.kernel.org/pub/scm/"
2339 "utils/grokmirror/grokmirror.git"))
2340 (commit (string-append "v" version))))
2341 (file-name (string-append name "-" version "-checkout"))
2343 (base32 "0zfiwjw02df3mzpawp9jx61iwp0nhcf6y03cs8022l0hkvc7blbr"))))
2344 (build-system python-build-system)
2346 `(#:tests? #f ; no test suite
2348 (modify-phases %standard-phases
2349 (add-after 'install 'install-manpages
2350 (lambda* (#:key outputs #:allow-other-keys)
2351 (let* ((man (string-append (assoc-ref outputs "out")
2354 (for-each (lambda (file) (install-file file man))
2355 (find-files "." "\\.1$")))
2358 `(("python-packaging" ,python-packaging)
2359 ("python-requests" ,python-requests)))
2361 "https://git.kernel.org/pub/scm/utils/grokmirror/grokmirror.git")
2362 (synopsis "Framework to smartly mirror git repositories")
2363 (description "Grokmirror enables replicating large git repository
2364 collections efficiently. Mirrors decide to clone and update repositories
2365 based on a manifest file published by servers.")
2366 (license license:gpl3+)))
2375 (uri (pypi-uri "b4" version))
2377 (base32 "1j904dy9cwxl85k2ngc498q5cdnqwsmw3jibjr1m55w8aqdck68z"))
2378 (modules '((guix build utils)))
2381 ;; Fixes issue with dependency requirements being too strict. See upstream commit:
2382 ;; https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?id=31348a14afdb1d39e7faf9576eaddea1ced76e19
2383 (substitute* "setup.py"
2386 (build-system python-build-system)
2387 (arguments '(#:tests? #f)) ; No tests.
2389 `(("python-dkimpy" ,python-dkimpy)
2390 ("python-dnspython" ,python-dnspython)
2391 ("python-requests" ,python-requests)))
2392 (home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git")
2393 (synopsis "Tool for working with patches in public-inbox archives")
2395 "The @code{b4} command is designed to make it easier to participate in
2396 patch-based workflows for projects that have public-inbox archives.
2400 @item downloading a thread's mbox given a message ID
2401 @item processing an mbox so that is ready to be fed to @code{git-am}
2402 @item creating templated replies for processed patches and pull requests
2403 @item submitting cryptographic attestation for patches.
2405 (license license:gpl2+)))
2407 (define-public git-annex-remote-rclone
2409 (name "git-annex-remote-rclone")
2415 (url "https://github.com/DanielDent/git-annex-remote-rclone")
2416 (commit (string-append "v" version))))
2417 (file-name (git-file-name name version))
2420 "0j0hlxji8d974fq7zd4xc02n0jpi31ylhxc7z4zp8iiwad5mkpxp"))))
2421 (build-system trivial-build-system)
2423 `(#:modules ((guix build utils))
2426 (use-modules (guix build utils))
2427 (let ((bash (string-append (assoc-ref %build-inputs "bash")
2429 (rclone (string-append (assoc-ref %build-inputs "rclone")
2431 (copy-file (string-append (assoc-ref %build-inputs "source")
2432 "/git-annex-remote-rclone")
2433 "git-annex-remote-rclone")
2434 (substitute* "git-annex-remote-rclone"
2435 (("/bin/bash") bash)
2436 (("runcmd rclone") (string-append "runcmd " rclone)))
2437 (install-file "git-annex-remote-rclone"
2438 (string-append %output "/bin"))
2442 ("rclone" ,rclone)))
2443 (home-page "https://github.com/DanielDent/git-annex-remote-rclone")
2444 (synopsis "Use rclone-supported cloud storage providers with git-annex")
2445 (description "This wrapper around rclone makes any destination supported
2446 by rclone usable with git-annex.")
2447 (license license:gpl3+)))
2449 (define-public fossil
2457 "https://www.fossil-scm.org/index.html/uv/"
2458 "fossil-src-" version ".tar.gz"))
2460 (base32 "0c9nzx42wxfmym9vf1pnbdb1c7gp7a7zqky60izxsph7w2xh8nix"))
2461 (modules '((guix build utils)))
2464 (delete-file-recursively "compat") #t))))
2465 (build-system gnu-build-system)
2467 `(("tcl" ,tcl) ;for configuration only
2468 ("which" ,which) ;for tests only
2471 `(("openssl" ,openssl)
2473 ("sqlite" ,sqlite)))
2475 `(#:configure-flags (list "--with-openssl=auto"
2476 "--disable-internal-sqlite")
2477 #:test-target "test"
2478 #:phases (modify-phases %standard-phases
2479 (add-after 'patch-source-shebangs 'patch-sh
2481 (substitute* '("auto.def")
2482 (("/bin/sh") (which "sh")))
2485 (lambda* (#:key outputs (configure-flags '())
2487 ;; The 'configure' script is not an autoconf script and
2488 ;; chokes on unrecognized options.
2491 (string-append "--prefix="
2492 (assoc-ref outputs "out"))
2495 (add-before 'check 'test-setup
2497 (setenv "USER" "guix")
2500 (home-page "https://fossil-scm.org")
2501 (synopsis "Software configuration management system")
2503 "Fossil is a distributed source control management system which supports
2504 access and administration over HTTP CGI or via a built-in HTTP server. It has
2505 a built-in wiki, built-in file browsing, built-in tickets system, etc.")
2506 (license (list license:public-domain ;src/miniz.c, src/shell.c
2509 (define-public stagit
2515 (uri (string-append "https://dl.2f30.org/releases/"
2516 name "-" version ".tar.gz"))
2519 "1m3s9g1z9szbjrhm8sic91xh6f2bfpi56rskdkqd5wc4wdycpyi5"))))
2520 (build-system gnu-build-system)
2522 `(#:tests? #f ; No tests
2523 #:make-flags (list "CC=gcc"
2524 (string-append "PREFIX=" %output))
2526 (modify-phases %standard-phases
2527 (delete 'configure)))) ; No configure script
2529 `(("libgit2" ,libgit2)))
2530 (home-page "https://2f30.org/")
2531 (synopsis "Static git page generator")
2532 (description "Stagit creates static pages for git repositories, the results can
2533 be served with a HTTP file server of your choice.")
2534 (license license:expat)))
2536 (define-public gource
2543 "https://github.com/acaudwell/Gource/releases/download"
2544 "/gource-" version "/gource-" version ".tar.gz"))
2547 "16p7b1x4r0915w883lp374jcdqqja37fnb7m8vnsfnl2n64gi8qr"))))
2548 (build-system gnu-build-system)
2551 (list (string-append "--with-boost-libdir="
2552 (assoc-ref %build-inputs "boost")
2555 `(("pkg-config" ,pkg-config)))
2565 ("sdl-union" ,(sdl-union (list sdl2 sdl2-image)))))
2566 (home-page "https://gource.io/")
2567 (synopsis "3D visualisation tool for source control repositories")
2568 (description "@code{gource} provides a software version control
2569 visualization. The repository is displayed as a tree where the root of the
2570 repository is the centre, directories are branches and files are leaves.
2571 Contributors to the source code appear and disappear as they contribute to
2572 specific files and directories.")
2573 (license license:gpl3+)))
2582 "http://www.catb.org/~esr/src/src-" version ".tar.gz"))
2585 "0n0skhvya8w2az45h2gsafxy8m2mvqas64nrgxifcmrzfv0rf26c"))))
2586 (build-system gnu-build-system)
2589 (list (string-append "prefix=" (assoc-ref %outputs "out")))
2591 (modify-phases %standard-phases
2592 (delete 'configure) ; no 'configure' script
2593 (add-after 'install 'wrap-program
2594 (lambda* (#:key inputs outputs #:allow-other-keys)
2595 (let* ((out (assoc-ref outputs "out"))
2596 (prog (string-append out "/bin/src"))
2597 (rcs (assoc-ref inputs "rcs")))
2599 `("PATH" ":" prefix (,(string-append rcs "/bin"))))
2603 (setenv "HOME" (getenv "TMPDIR"))
2604 (invoke "git" "config" "--global" "user.name" "guix")
2605 (invoke "git" "config" "--global" "user.email" "guix")
2606 (invoke "./srctest"))))))
2612 `(("python" ,python-wrapper)
2614 (synopsis "Simple revision control")
2615 (home-page "http://www.catb.org/~esr/src/")
2617 "SRC (or src) is simple revision control, a version-control system for
2618 single-file projects by solo developers and authors. It modernizes the
2619 venerable RCS, hence the anagrammatic acronym. The design is tuned for use
2620 cases like all those little scripts in your @file{~/bin} directory, or a
2621 directory full of HOWTOs.")
2622 (license license:bsd-2)))
2624 (define-public git-when-merged
2625 ;; Use an unreleased version to get a PY3 compatibility fix.
2626 (let ((commit "ab6af7865a0ba55ba364a6c507e0be6f84f31c6d"))
2628 (name "git-when-merged")
2629 (version (string-append "1.2.0-" (string-take commit 7)))
2633 (url "https://github.com/mhagger/git-when-merged/")
2635 (file-name (git-file-name name version))
2638 "0iyk2psf97bc9h43m89p3xjmm79fsx99i7px29g4lcnmdy5kmz0p"))))
2639 (build-system gnu-build-system)
2641 `(#:tests? #f ; there are no tests
2643 (modify-phases %standard-phases
2647 (lambda* (#:key outputs #:allow-other-keys)
2648 (install-file "bin/git-when-merged"
2649 (string-append (assoc-ref outputs "out")
2652 (add-before 'install 'patch-git
2653 (lambda* (#:key inputs #:allow-other-keys)
2654 (let ((git (string-append (assoc-ref inputs "git")
2656 (substitute* "bin/git-when-merged"
2657 (("'git'") (string-append "'" git "'")))
2659 (add-after 'install 'wrap-script
2660 (lambda* (#:key outputs #:allow-other-keys)
2661 (wrap-program (string-append (assoc-ref outputs "out")
2662 "/bin/git-when-merged")
2663 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2667 ("python" ,python-wrapper)))
2668 (home-page "https://github.com/mhagger/git-when-merged")
2669 (synopsis "Determine when a commit was merged into a Git branch")
2670 (description "This Git extension defines a subcommand,
2671 @code{when-merged}, whose core operation is to find the merge that brought a
2672 given commit into the specified ref(s). It has various options that control
2673 how information about the merge is displayed.")
2674 (license license:gpl2+))))
2676 (define-public git-imerge
2684 (url "https://github.com/mhagger/git-imerge")
2685 (commit (string-append "v" version))))
2686 (file-name (git-file-name name version))
2688 (base32 "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4"))))
2689 (build-system gnu-build-system)
2691 `(#:tests? #f ; only manual test scripts
2692 #:make-flags (list (string-append "DESTDIR=" %output)
2695 (modify-phases %standard-phases
2697 (add-before 'install 'patch-git
2698 (lambda* (#:key inputs #:allow-other-keys)
2699 (let ((git (string-append (assoc-ref inputs "git")
2701 (substitute* "git-imerge"
2702 (("'git'") (string-append "'" git "'")))
2704 (add-after 'install 'wrap-script
2705 (lambda* (#:key outputs #:allow-other-keys)
2706 (wrap-program (string-append (assoc-ref outputs "out")
2708 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2712 ("python" ,python-wrapper)))
2713 (home-page "https://github.com/mhagger/git-imerge")
2714 (synopsis "Incremental merge for Git")
2715 (description "This Git extension defines a subcommand, @code{imerge},
2716 which performs an incremental merge between two branches. Its two primary
2717 design goals are to reduce the pain of resolving merge conflicts by finding
2718 the smallest possible conflicts and to allow a merge to be saved, tested,
2719 interrupted, published, and collaborated on while in progress.")
2720 (license license:gpl2+)))
2722 (define-public git-lfs
2729 (url "https://github.com/git-lfs/git-lfs")
2730 (commit (string-append "v" version))))
2731 (file-name (git-file-name name version))
2734 "0r7dmqhkhz91d3n7qfpny483x8f1n88yya22j2fvx75rgg33z2sg"))))
2735 (build-system go-build-system)
2737 `(#:import-path "github.com/git-lfs/git-lfs"
2738 #:install-source? #f
2740 (modify-phases %standard-phases
2741 (add-before 'build 'man-gen
2742 ;; Without this, the binary generated in 'build
2743 ;; phase won't have any embedded usage-text.
2745 (with-directory-excursion "src/github.com/git-lfs/git-lfs"
2746 (invoke "make" "mangen"))))
2747 (add-after 'build 'build-man-pages
2749 (with-directory-excursion "src/github.com/git-lfs/git-lfs"
2750 (invoke "make" "man"))
2752 (add-after 'install 'install-man-pages
2754 (with-directory-excursion "src/github.com/git-lfs/git-lfs/man"
2755 (let ((out (assoc-ref %outputs "out")))
2758 (install-file manpage (string-append out "/share/man/man1")))
2759 (find-files "." "^git-lfs.*\\.1$"))))
2761 ;; make `ronn` available during build for man page generation
2762 (native-inputs `(("ronn-ng" ,ronn-ng)))
2763 (home-page "https://git-lfs.github.com/")
2764 (synopsis "Git extension for versioning large files")
2766 "Git Large File Storage (LFS) replaces large files such as audio samples,
2767 videos, datasets, and graphics with text pointers inside Git, while storing the
2768 file contents on a remote server.")
2769 (license license:expat)))
2771 (define-public git-open
2779 (url "https://github.com/paulirish/git-open")
2780 (commit (string-append "v" version))))
2781 (file-name (git-file-name name version))
2783 (base32 "11n46bngvca5wbdbfcxzjhjbfdbad7sgf7h9gf956cb1q8swsdm0"))))
2784 (build-system copy-build-system)
2786 `(("xdg-utils" ,xdg-utils)))
2789 (modify-phases %standard-phases
2790 (add-after 'install 'wrap-program
2791 (lambda* (#:key outputs inputs #:allow-other-keys)
2792 (let ((out (assoc-ref outputs "out"))
2793 (xdg-utils (assoc-ref inputs "xdg-utils")))
2794 (wrap-program (string-append out "/bin/git-open")
2795 `("PATH" ":" prefix (,(string-append xdg-utils "/bin"))))))))
2797 '(("git-open" "bin/git-open"))))
2798 (home-page "https://github.com/paulirish/git-open")
2799 (synopsis "Open a Git repository's homepage from the command-line")
2801 "@code{git open} opens the repository's website from the command-line,
2802 guessing the URL pattern from the @code{origin} remote.")
2803 (license license:expat)))
2811 (uri (string-append "https://ftp.gnu.org/old-gnu/gnu-arch/"
2812 "tla-" version ".tar.gz"))
2815 "01mfzj1i6p4s8191cgd5850hds1zls88hkf9rb6qx1vqjv585aj0"))
2816 (modules '((guix build utils)))
2819 ;; In tar 1.32, '--preserve' is ambiguous and leads to an
2820 ;; error, so address that.
2821 (substitute* "src/tla/libarch/archive.c"
2823 "\"--preserve-permissions\""))
2825 (build-system gnu-build-system)
2827 '(#:phases (modify-phases %standard-phases
2829 (lambda* (#:key inputs outputs #:allow-other-keys)
2830 (let ((out (assoc-ref outputs "out")))
2836 ;; For libneon's 'configure' script.
2837 ;; XXX: There's a bundled copy of neon.
2838 (setenv "CONFIG_SHELL" (which "sh"))
2840 (invoke "../configure" "--prefix" out
2841 "--config-shell" (which "sh")
2842 "--with-posix-shell" (which "sh")
2843 "--with-cc" "gcc")))))
2846 ;; There are build failures when building in parallel.
2847 #:parallel-build? #f
2848 #:parallel-tests? #f
2850 #:test-target "test"))
2852 `(("which" ,which)))
2853 (synopsis "Historical distributed version-control system")
2855 "GNU Arch, aka. @code{tla}, was one of the first free distributed
2856 version-control systems (DVCS). It saw its last release in 2006. This
2857 package is provided for users who need to recover @code{tla} repositories and
2859 (home-page "https://www.gnu.org/software/gnu-arch/")
2860 (license license:gpl2))) ;version 2 only
2862 (define-public diff-so-fancy
2864 (name "diff-so-fancy")
2869 (url "https://github.com/so-fancy/diff-so-fancy")
2870 (commit (string-append "v" version))))
2871 (file-name (git-file-name name version))
2874 "0aavxahzha2mms4vdwysk79pa6wzswpfwgsq2hwaxnaf66maahfl"))))
2877 ("ncurses" ,ncurses)))
2878 (build-system copy-build-system)
2881 (modify-phases %standard-phases
2882 (add-after 'unpack 'patch-lib-path
2883 (lambda* (#:key outputs #:allow-other-keys)
2884 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2885 (substitute* "diff-so-fancy"
2887 (string-append "use lib '" lib "';\n")))
2889 (add-after 'install 'symlink-executable
2890 (lambda* (#:key outputs inputs #:allow-other-keys)
2891 (let ((out (assoc-ref outputs "out"))
2892 (ncurses (assoc-ref inputs "ncurses"))
2893 (perl (assoc-ref inputs "perl")))
2894 (wrap-program (string-append out "/bin/diff-so-fancy")
2895 `("PATH" ":" prefix (,(string-append ncurses "/bin")
2896 ,(string-append perl "/bin"))))
2900 ("diff-so-fancy" "bin/"))))
2901 (home-page "https://github.com/so-fancy/diff-so-fancy")
2902 (synopsis "Makes diffs more human friendly and readable")
2904 "@code{diff-so-fancy} strives to make your diffs human readable instead
2905 of machine readable. This helps improve code quality and helps you spot
2907 (license license:expat)))
2909 (define-public go-github-go-git
2911 (name "go-github-go-git")
2916 (url "https://github.com/go-git/go-git")
2917 (commit (string-append "v" version))))
2918 (file-name (git-file-name name version))
2921 "1vkcmhh2qq8c38sjbnzf0wvg2rzr19wssaq177bsvrjwj1xz1qbs"))))
2922 (build-system go-build-system)
2924 `(#:tests? #f ;requires network connection
2925 #:import-path "github.com/go-git/go-git/v5"
2927 (modify-phases %standard-phases
2928 (add-before 'build 'setup
2929 (lambda* (#:key inputs #:allow-other-keys)
2930 (let* ((git (assoc-ref inputs "git"))
2931 (git-bin (string-append (assoc-ref inputs "git") "/bin"))
2932 (git-exe (string-append git-bin "/git")))
2933 (setenv "GIT_DIST_PATH=" git)
2934 (setenv "GIT_EXEC_PATH=" git-bin)
2935 (setenv "HOME" (getcwd))
2936 (invoke git-exe "config" "--global" "user.email" "gha@example.com")
2937 (invoke git-exe "config" "--global" "user.name" "GitHub Actions")
2941 `(("go-github-com-emirpasic-gods" ,go-github-com-emirpasic-gods)
2942 ("go-github-com-go-git-gcfg" ,go-github-com-go-git-gcfg)
2943 ("go-github-com-go-git-go-billy" ,go-github-com-go-git-go-billy)
2944 ("go-github-com-imdario-mergo" ,go-github-com-imdario-mergo)
2945 ("go-github-com-jbenet-go-context" ,go-github-com-jbenet-go-context)
2946 ("go-github-com-kevinburke-ssh-config" ,go-github-com-kevinburke-ssh-config)
2947 ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
2948 ("go-github-com-sergi-go-diff" ,go-github-com-sergi-go-diff)
2949 ("go-github-com-xanzy-ssh-agentf" ,go-github-com-xanzy-ssh-agent)
2950 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
2951 ("go-golang-org-x-net" ,go-golang-org-x-net)
2952 ("go-gopkg-in-warnings" ,go-gopkg-in-warnings)
2953 ("go-github-com-go-git-go-git-fixtures" ,go-github-com-go-git-go-git-fixtures)
2954 ("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)
2955 ("go-github-com-alcortesm-tgz" ,go-github-com-alcortesm-tgz)
2956 ("go-golang-org-x-text" ,go-golang-org-x-text)
2958 (home-page "https://github.com/go-git/")
2959 (synopsis "Git implementation library")
2960 (description "This package provides a Git implementation library.")
2961 (license license:asl2.0)))
2964 (let ((commit "e41b504dca90a25e9be27f296da7ce22e5782893")
2968 (version (git-version "0.12.9" revision commit))
2972 (url "https://github.com/nosarthur/gita")
2974 (file-name (git-file-name name version))
2977 "1k03zgcbhl91cgyh4k7ywyjp00y63q4bqbimncqh5b3lni8l8j5l"))))
2978 (build-system python-build-system)
2980 `(("git" ,git) ;for tests
2981 ("python-pytest" ,python-pytest)))
2983 `(("python-pyyaml" ,python-pyyaml)))
2986 (modify-phases %standard-phases
2988 (lambda* (#:key inputs outputs #:allow-other-keys)
2989 (substitute* "tests/test_main.py"
2990 (("'gita\\\\n'") "'source\\n'")
2991 (("'gita'") "'source'"))
2992 (invoke (string-append (assoc-ref inputs "git") "/bin/git")
2994 (add-installed-pythonpath inputs outputs)
2995 (invoke (string-append (assoc-ref inputs "python-pytest")
2998 (add-after 'install 'install-shell-completions
2999 (lambda* (#:key outputs #:allow-other-keys)
3000 (let* ((out (assoc-ref outputs "out"))
3001 (bash-completion (string-append out "/etc/bash_completion.d"))
3002 (zsh-completion (string-append out "/etc/zsh/site-functions")))
3003 (mkdir-p bash-completion)
3004 (copy-file ".gita-completion.bash"
3005 (string-append bash-completion "/gita"))
3006 (mkdir-p zsh-completion)
3007 (copy-file ".gita-completion.zsh"
3008 (string-append zsh-completion "/_gita"))))))))
3009 (home-page "https://github.com/nosarthur/gita")
3010 (synopsis "Command-line tool to manage multiple Git repos")
3011 (description "This package provides a command-line tool to manage
3014 This tool does two things:
3016 @item display the status of multiple Git repos such as branch, modification,
3017 commit message side by side
3018 @item (batch) delegate Git commands/aliases from any working directory
3021 If several repos are related, it helps to see their status together.")
3022 (license license:expat))))
3028 (home-page "https://github.com/x-motemen/ghq")
3033 (commit (string-append "v" version))))
3034 (file-name (git-file-name name version))
3037 "155sfmhmh4ia3iinm1s8fk7fxyn5dxdryad9xkbg7mr3i3ikqjwh"))))
3038 (build-system go-build-system)
3040 '(#:install-source? #f
3041 #:import-path "github.com/x-motemen/ghq"
3043 (modify-phases %standard-phases
3044 (add-after 'install 'install-completions
3045 (lambda* (#:key outputs import-path #:allow-other-keys)
3046 (let* ((out (assoc-ref outputs "out"))
3047 (bash-completion (string-append out "/etc/bash_completion.d"))
3048 (zsh-completion (string-append out "/share/zsh/site-functions")))
3049 (with-directory-excursion (string-append "src/" import-path)
3050 (mkdir-p bash-completion)
3051 (copy-file "misc/bash/_ghq"
3052 (string-append bash-completion "/ghq"))
3053 (mkdir-p zsh-completion)
3054 (copy-file "misc/zsh/_ghq"
3055 (string-append zsh-completion "/_ghq"))))
3058 `(("git" ,git-minimal)))
3060 `(("github.com/songmu/gitconfig" ,go-github-com-songmu-gitconfig)
3061 ("github.com/mattn/go-isatty" ,go-github-com-mattn-go-isatty)
3062 ("github.com/motemen/go-colorine" ,go-github-com-motemen-go-colorine)
3063 ("github.com/saracen/walker" ,go-github-com-saracen-walker)
3064 ("github.com/urfave/cli/v2" ,go-github-com-urfave-cli-v2)
3065 ("golang.org/x/net/html" ,go-golang-org-x-net-html)
3066 ("golang.org/x/sync/errgroup" ,go-golang.org-x-sync-errgroup)))
3067 (synopsis "Manage remote repository clones")
3069 "@code{ghq} provides a way to organize remote repository clones, like
3070 @code{go get} does. When you clone a remote repository by @code{ghq get}, ghq
3071 makes a directory under a specific root directory (by default @file{~/ghq})
3072 using the remote repository URL's host and path.")
3073 (license license:expat)))