1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
6 ;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
7 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
8 ;;; Copyright © 2014, 2016, 2019 Eric Bavier <bavier@member.fsf.org>
9 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
10 ;;; Copyright © 2015, 2018, 2020 Kyle Meyer <kyle@kyleam.com>
11 ;;; Copyright © 2015, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
13 ;;; Copyright © 2016, 2017, 2018 Nikita <nikita@n0.is>
14 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
15 ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
16 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
17 ;;; Copyright © 2017, 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>
37 ;;; This file is part of GNU Guix.
39 ;;; GNU Guix is free software; you can redistribute it and/or modify it
40 ;;; under the terms of the GNU General Public License as published by
41 ;;; the Free Software Foundation; either version 3 of the License, or (at
42 ;;; your option) any later version.
44 ;;; GNU Guix is distributed in the hope that it will be useful, but
45 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47 ;;; GNU General Public License for more details.
49 ;;; You should have received a copy of the GNU General Public License
50 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
52 (define-module (gnu packages version-control)
53 #:use-module ((guix licenses) #:prefix license:)
54 #:use-module (guix utils)
55 #:use-module (guix packages)
56 #:use-module (guix download)
57 #:use-module (guix git-download)
58 #:use-module (guix hg-download)
59 #:use-module (guix build-system cmake)
60 #:use-module (guix build-system copy)
61 #:use-module (guix build-system gnu)
62 #:use-module (guix build-system go)
63 #:use-module (guix build-system perl)
64 #:use-module (guix build-system python)
65 #:use-module (guix build-system trivial)
66 #:use-module (gnu packages apr)
67 #:use-module (gnu packages autotools)
68 #:use-module (gnu packages documentation)
69 #:use-module (gnu packages base)
70 #:use-module (gnu packages bash)
71 #:use-module (gnu packages bison)
72 #:use-module (gnu packages boost)
73 #:use-module (gnu packages check)
74 #:use-module (gnu packages cook)
75 #:use-module (gnu packages curl)
76 #:use-module (gnu packages docbook)
77 #:use-module (gnu packages ed)
78 #:use-module (gnu packages file)
79 #:use-module (gnu packages flex)
80 #:use-module (gnu packages freedesktop)
81 #:use-module (gnu packages gettext)
82 #:use-module (gnu packages gl)
83 #:use-module (gnu packages golang)
84 #:use-module (gnu packages groff)
85 #:use-module (gnu packages guile)
86 #:use-module (gnu packages image)
87 #:use-module (gnu packages linux)
88 #:use-module (gnu packages mail)
89 #:use-module (gnu packages maths)
90 #:use-module (gnu packages nano)
91 #:use-module (gnu packages ncurses)
92 #:use-module (gnu packages ssh)
93 #:use-module (gnu packages web)
94 #:use-module (gnu packages openstack)
95 #:use-module (gnu packages pcre)
96 #:use-module (gnu packages perl)
97 #:use-module (gnu packages perl-check)
98 #:use-module (gnu packages pkg-config)
99 #:use-module (gnu packages python)
100 #:use-module (gnu packages python-check)
101 #:use-module (gnu packages python-web)
102 #:use-module (gnu packages python-xyz)
103 #:use-module (gnu packages readline)
104 #:use-module (gnu packages rsync)
105 #:use-module (gnu packages sqlite)
106 #:use-module (gnu packages admin)
107 #:use-module (gnu packages xml)
108 #:use-module (gnu packages emacs)
109 #:use-module (gnu packages compression)
110 #:use-module (gnu packages sdl)
111 #:use-module (gnu packages swig)
112 #:use-module (gnu packages sync)
113 #:use-module (gnu packages tcl)
114 #:use-module (gnu packages textutils)
115 #:use-module (gnu packages time)
116 #:use-module (gnu packages tls)
117 #:use-module (gnu packages)
118 #:use-module (ice-9 match)
119 #:use-module (srfi srfi-1))
121 (define-public bazaar
128 (uri (string-append "https://launchpad.net/bzr/"
129 (version-major+minor version) "/" version
130 "/+download/bzr-" version ".tar.gz"))
131 (patches (search-patches "bazaar-CVE-2017-14176.patch"))
134 "1cysix5k3wa6y7jjck3ckq3abls4gvz570s0v0hxv805nwki4i8d"))))
135 (build-system python-build-system)
137 ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh'
139 `(("gettext" ,gettext-minimal)))
141 `(#:tests? #f ; no test target
142 #:python ,python-2 ; Python 3 apparently not yet supported, see
143 ; https://answers.launchpad.net/bzr/+question/229048
145 (modify-phases %standard-phases
146 (add-after 'unpack 'fix-mandir
148 (substitute* "setup.py"
149 (("man/man1") "share/man/man1"))
151 (home-page "https://gnu.org/software/bazaar")
152 (synopsis "Version control system supporting both distributed and centralized workflows")
154 "GNU Bazaar is a version control system that allows you to record
155 changes to project files over time. It supports both a distributed workflow
156 as well as the classic centralized workflow.")
157 (license license:gpl2+)))
159 (define git-cross-configure-flags
160 '("ac_cv_fread_reads_directories=yes"
161 "ac_cv_snprintf_returns_bogus=no"
162 "ac_cv_iconv_omits_bom=no"))
170 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
174 "06ad6dylgla34k9am7d5z8y3rryc8ln3ibq5z0d74rcm20hm0wsm"))))
175 (build-system gnu-build-system)
177 `(("native-perl" ,perl)
178 ;; Add bash-minimal explicitly to ensure it comes before bash-for-tests,
179 ;; see <https://bugs.gnu.org/39513>.
180 ("bash" ,bash-minimal)
181 ("bash-for-tests" ,bash)
182 ("gettext" ,gettext-minimal)
187 "mirror://kernel.org/software/scm/git/git-manpages-"
191 "0xngjg60rwzrb9x32d1qbdd8szkzwcyha5qni7ilkldxsl2q8avv"))))
192 ;; For subtree documentation.
193 ("asciidoc" ,asciidoc-py3)
194 ("docbook-xsl" ,docbook-xsl)
201 ("python" ,python) ; for git-p4
204 ;; For PCRE support in git grep (USE_LIBPCRE2).
208 ("perl-cgi" ,perl-cgi)
211 ("subversion" ,subversion)
212 ("perl-term-readkey" ,perl-term-readkey)
214 ;; For 'git-send-email'.
215 ("perl-authen-sasl" ,perl-authen-sasl)
216 ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
217 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
219 ;; For 'git gui', 'gitk', and 'git citool'.
222 (outputs '("out" ; the core
223 "send-email" ; for git-send-email
225 "credential-netrc" ; git-credential-netrc
226 "subtree" ; git-subtree
227 "gui")) ; gitk, git gui
229 `(#:make-flags `("V=1" ;more verbose compilation
231 ,(string-append "SHELL_PATH="
232 (assoc-ref %build-inputs "bash")
235 ;; Tests require a bash with completion support.
236 ,(string-append "TEST_SHELL_PATH="
237 (assoc-ref %build-inputs "bash-for-tests")
242 ;; By default 'make install' creates hard links for
243 ;; things in 'libexec/git-core', which leads to huge
244 ;; nars; see <https://bugs.gnu.org/21949>.
245 "NO_INSTALL_HARDLINKS=indeed")
247 ;; Make sure the full bash does not end up in the final closure.
248 #:disallowed-references (,bash)
252 ;; The explicit --with-tcltk forces the build system to hardcode the
253 ;; absolute file name to 'wish'.
254 #:configure-flags (list (string-append "--with-tcltk="
255 (assoc-ref %build-inputs "tk")
256 "/bin/wish8.6") ; XXX
257 ,@(if (%current-target-system)
258 git-cross-configure-flags
261 #:modules ((srfi srfi-1)
263 ,@%gnu-build-system-modules)
265 (modify-phases %standard-phases
266 ,@(if (%current-target-system)
267 ;; The git build system assumes build == host
268 `((add-after 'unpack 'use-host-uname_S
270 (substitute* "config.mak.uname"
271 (("uname_S := .*" all)
272 (if (equal? ,(%current-target-system) "i586-pc-gnu")
276 ;; We do not have bash-for-tests when cross-compiling.
277 `((add-after 'unpack 'modify-PATH
278 (lambda* (#:key inputs #:allow-other-keys)
279 (let ((path (string-split (getenv "PATH") #\:))
280 (bash-full (assoc-ref inputs "bash-for-tests")))
281 ;; Drop the test bash from PATH so that (which "sh") and
282 ;; similar does the right thing.
283 (setenv "PATH" (string-join
284 (remove (cut string-prefix? bash-full <>) path)
287 ;; Add cross curl-config script to PATH when cross-compiling.
288 ,@(if (%current-target-system)
289 '((add-before 'configure 'add-cross-curl-config
290 (lambda* (#:key inputs #:allow-other-keys)
292 (string-append (assoc-ref inputs "curl") "/bin:"
296 (add-after 'configure 'patch-makefiles
298 (substitute* "Makefile"
299 (("/usr/bin/perl") (which "perl"))
300 (("/usr/bin/python") (which "python3")))
302 (add-after 'configure 'add-PM.stamp
304 ;; Add the "PM.stamp" to avoid "no rule to make target".
305 (call-with-output-file "perl/PM.stamp" (const #t))
307 (add-after 'build 'build-subtree
308 (lambda* (#:key inputs #:allow-other-keys)
309 (with-directory-excursion "contrib/subtree"
310 (substitute* "Makefile"
311 ;; Apparently `xmlto' does not bother to looks up the stylesheets
312 ;; specified in the XML, unlike the above substitution. Instead it
313 ;; uses a hard-coded URL. Work around it here, but if this is
314 ;; common perhaps we should hardcode this path in xmlto itself.
315 (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
316 (string-append "$(XMLTO) -x "
317 (string-append (assoc-ref inputs "docbook-xsl")
318 "/xml/xsl/docbook-xsl-"
319 ,(package-version docbook-xsl))
320 "/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
322 (invoke "make" "install")
323 (invoke "make" "install-doc")
324 (substitute* "git-subtree"
325 (("/bin/sh") (which "sh"))))
327 (add-before 'check 'patch-tests
329 (let ((store-directory (%store-directory)))
330 ;; These files contain some funny bytes that Guile is unable
331 ;; to decode for shebang patching. Just delete them.
332 (for-each delete-file '("t/t4201-shortlog.sh"
333 "t/t7813-grep-icase-iso.sh"))
334 ;; Many tests contain inline shell scripts (hooks etc).
335 (substitute* (find-files "t" "\\.sh$")
336 (("#!/bin/sh") (string-append "#!" (which "sh"))))
337 ;; Un-do shebang patching here to prevent checksum mismatch.
338 (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
339 (("^#!.*/bin/perl") "#!/usr/bin/perl"))
340 (substitute* "t/t5003-archive-zip.sh"
341 (("cp /bin/sh") (string-append "cp " (which "sh"))))
342 (substitute* "t/t6030-bisect-porcelain.sh"
343 (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
344 ;; FIXME: This test runs `git commit` with a bogus EDITOR
345 ;; and empty commit message, but does not fail the way it's
346 ;; expected to. The test passes when invoked interactively.
347 (substitute* "t/t7508-status.sh"
348 (("\tcommit_template_commented") "\ttrue"))
349 ;; More checksum mismatches due to odd shebangs.
350 (substitute* "t/t9100-git-svn-basic.sh"
351 (((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") )
352 (substitute* "t/t9300-fast-import.sh"
353 (((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh")
354 (((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh"))
355 ;; FIXME: Some hooks fail with "basename: command not found".
356 ;; See 't/trash directory.t9164.../svn-hook.log'.
357 (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
359 ;; XXX: These tests fail intermittently for unknown reasons:
360 ;; <https://bugs.gnu.org/29546>.
361 (for-each delete-file
362 '("t/t9128-git-svn-cmd-branch.sh"
363 "t/t9167-git-svn-cmd-branch-subproject.sh"
364 "t/t9141-git-svn-multiple-branches.sh"))
366 (add-after 'install 'install-shell-completion
367 (lambda* (#:key outputs #:allow-other-keys)
368 (let* ((out (assoc-ref outputs "out"))
369 (completions (string-append out "/etc/bash_completion.d")))
370 ;; TODO: Install the tcsh and zsh completions in the right place.
371 (mkdir-p completions)
372 (copy-file "contrib/completion/git-completion.bash"
373 (string-append completions "/git"))
375 (add-after 'install 'install-credential-netrc
376 (lambda* (#:key outputs #:allow-other-keys)
377 (let* ((netrc (assoc-ref outputs "credential-netrc")))
378 (install-file "contrib/credential/netrc/git-credential-netrc.perl"
379 (string-append netrc "/bin"))
380 (rename-file (string-append netrc "/bin/git-credential-netrc.perl")
381 (string-append netrc "/bin/git-credential-netrc"))
382 ;; Previously, Git.pm was automatically found by netrc.
383 ;; Perl 5.26 changed how it locates modules so that @INC no
384 ;; longer includes the current working directory (the Perl
385 ;; community calls this "dotless @INC").
386 (wrap-program (string-append netrc "/bin/git-credential-netrc")
387 `("PERL5LIB" ":" prefix
388 (,(string-append (assoc-ref outputs "out") "/share/perl5"))))
390 (add-after 'install 'install-subtree
391 (lambda* (#:key outputs #:allow-other-keys)
392 (let ((subtree (assoc-ref outputs "subtree")))
393 (install-file "contrib/subtree/git-subtree"
394 (string-append subtree "/bin"))
395 (install-file "contrib/subtree/git-subtree.1"
396 (string-append subtree "/share/man/man1"))
398 (add-after 'install 'restore-sample-hooks-shebang
399 (lambda* (#:key outputs #:allow-other-keys)
400 (let* ((out (assoc-ref outputs "out"))
401 (dir (string-append out "/share/git-core/templates/hooks")))
402 (for-each (lambda (file)
403 (format #t "restoring shebang on `~a'~%" file)
405 (("^#!.*/bin/sh") "#!/bin/sh")))
406 (find-files dir ".*"))
408 (add-after 'install 'split
409 (lambda* (#:key inputs outputs #:allow-other-keys)
410 ;; Split the binaries to the various outputs.
411 (let* ((out (assoc-ref outputs "out"))
412 (se (assoc-ref outputs "send-email"))
413 (svn (assoc-ref outputs "svn"))
414 (gui (assoc-ref outputs "gui"))
415 (gitk (string-append out "/bin/gitk"))
416 (gitk* (string-append gui "/bin/gitk"))
417 (git-gui (string-append out "/libexec/git-core/git-gui"))
418 (git-gui* (string-append gui "/libexec/git-core/git-gui"))
419 (git-cit (string-append out "/libexec/git-core/git-citool"))
420 (git-cit* (string-append gui "/libexec/git-core/git-citool"))
421 (git-se (string-append out "/libexec/git-core/git-send-email"))
422 (git-se* (string-append se "/libexec/git-core/git-send-email"))
423 (git-svn (string-append out "/libexec/git-core/git-svn"))
424 (git-svn* (string-append svn "/libexec/git-core/git-svn"))
425 (git-sm (string-append out
426 "/libexec/git-core/git-submodule")))
427 (mkdir-p (string-append gui "/bin"))
428 (mkdir-p (string-append gui "/libexec/git-core"))
429 (mkdir-p (string-append se "/libexec/git-core"))
430 (mkdir-p (string-append svn "/libexec/git-core"))
432 (for-each (lambda (old new)
436 (list gitk git-gui git-cit git-se git-svn)
437 (list gitk* git-gui* git-cit* git-se* git-svn*))
439 ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
440 (wrap-program git-svn*
442 (,(string-append (assoc-ref inputs "subversion")
444 `("PERL5LIB" ":" prefix
445 ,(map (lambda (i) (string-append (assoc-ref inputs i)
446 "/lib/perl5/site_perl"))
447 '("subversion" "perl-term-readkey")))
449 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
450 ;; help it find 'libsvn_client-1.so'.
451 `("LD_LIBRARY_PATH" ":" prefix
452 (,(string-append (assoc-ref inputs "subversion")
455 ;; Tell 'git-send-email' where perl modules are.
456 (wrap-program git-se*
457 `("PERL5LIB" ":" prefix
458 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
460 ,@(transitive-input-references
463 (assoc l (package-inputs this-package)))
466 "perl-io-socket-ssl")))))))
468 ;; Tell 'gitweb.cgi' where perl modules are.
469 (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
470 `("PERL5LIB" ":" prefix
471 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
473 ,@(transitive-input-references
476 (assoc l (package-inputs this-package)))
479 ;; Tell 'git-submodule' where Perl is.
482 (,(string-append (assoc-ref inputs "perl")
486 (add-after 'split 'install-man-pages
487 (lambda* (#:key inputs outputs #:allow-other-keys)
488 (let* ((out (assoc-ref outputs "out"))
489 (man (string-append out "/share/man"))
490 (manpages (assoc-ref inputs "git-manpages")))
492 (with-directory-excursion man
493 (invoke "tar" "xvf" manpages))))))))
496 ;; For HTTPS access, Git needs a single-file certificate bundle, specified
497 ;; with $GIT_SSL_CAINFO.
498 (list (search-path-specification
499 (variable "GIT_SSL_CAINFO")
501 (separator #f) ;single entry
502 (files '("etc/ssl/certs/ca-certificates.crt")))
503 (search-path-specification
504 (variable "GIT_EXEC_PATH")
505 (separator #f) ;single entry
506 (files '("libexec/git-core")))))
508 (synopsis "Distributed version control system")
510 "Git is a free distributed version control system designed to handle
511 everything from small to very large projects with speed and efficiency.")
512 (license license:gpl2)
513 (home-page "https://git-scm.com/")))
515 (define-public git-minimal
516 ;; The size of the closure of 'git-minimal' is two thirds that of 'git'.
517 ;; Its test suite runs slightly faster and most importantly it doesn't
518 ;; depend on packages that are expensive to build such as Subversion.
523 (substitute-keyword-arguments (package-arguments git)
525 `(modify-phases ,phases
526 (replace 'patch-makefiles
528 (substitute* "Makefile"
529 (("/usr/bin/perl") (which "perl")))
531 (delete 'build-subtree)
533 (delete 'install-man-pages)
534 (delete 'install-subtree)
535 (delete 'install-credential-netrc)
536 (add-after 'install 'remove-unusable-perl-commands
537 (lambda* (#:key outputs #:allow-other-keys)
538 (let* ((out (assoc-ref outputs "out"))
539 (bin (string-append out "/bin"))
540 (libexec (string-append out "/libexec")))
541 (for-each (lambda (file)
542 (delete-file (string-append libexec
544 '("git-svn" "git-cvsimport" "git-archimport"
545 "git-cvsserver" "git-request-pull"
546 "git-add--interactive" "git-cvsexportcommit"
547 "git-instaweb" "git-send-email"))
548 (delete-file (string-append bin "/git-cvsserver"))
550 ;; These templates typically depend on Perl. Remove them.
551 (delete-file-recursively
552 (string-append out "/share/git-core/templates/hooks"))
554 ;; Gitweb depends on Perl as well.
555 (delete-file-recursively
556 (string-append out "/share/gitweb"))
558 ((#:make-flags flags)
559 `(delete "USE_LIBPCRE2=yes" ,flags))
560 ((#:configure-flags flags)
562 ,@(if (%current-target-system)
563 git-cross-configure-flags
565 ((#:disallowed-references lst '())
569 `(("bash" ,bash-minimal)
570 ("bash-for-tests" ,bash)
571 ("native-perl" ,perl)
572 ("gettext" ,gettext-minimal)))
574 `(("curl" ,curl) ;for HTTP(S) access
575 ("expat" ,expat) ;for 'git push' over HTTP(S)
580 (define-public gitless
586 ;; The PyPI package lacks a test suite. Build directly from git.
589 (url "https://github.com/gitless-vcs/gitless")
590 (commit (string-append "v" version))))
592 (base32 "048kl27zjr68hgs70g3l98ci9765wxva6azzrhcdys7nsdd493n6"))
593 (file-name (git-file-name name version))))
594 (build-system python-build-system)
597 (modify-phases %standard-phases
598 (add-before 'build 'loosen-requirements
600 (substitute* "setup.py"
601 ;; Using Guix's python-pygit2 1.1.0 appears to work fine…
602 (("pygit2==") "pygit2>="))
604 (add-before 'check 'prepare-for-tests
606 ;; Find the 'gl' command.
607 (rename-file "gl.py" "gl")
608 (setenv "PATH" (string-append (getcwd) ":" (getenv "PATH")))
610 ;; The tests try to run git as if it were already set up.
611 (setenv "HOME" (getcwd))
612 (invoke "git" "config" "--global" "user.email" "git@example.com")
613 (invoke "git" "config" "--global" "user.name" "Guix")))
615 (lambda* (#:key inputs outputs #:allow-other-keys)
616 (let ((out (assoc-ref outputs "out"))
617 (git (assoc-ref inputs "git")))
618 (wrap-program (string-append out "/bin/gl")
619 `("PATH" ":" prefix (,(string-append git "/bin")))
621 (,(string-append out "/lib/python"
622 ,(version-major+minor
623 (package-version python))
625 ,(getenv "PYTHONPATH"))))
628 `(("git-for-tests" ,git-minimal)))
630 `(("git" ,git-minimal)
631 ("python-clint" ,python-clint)
632 ("python-pygit2" ,python-pygit2)
633 ("python-sh" ,python-sh)))
634 (home-page "https://gitless.com")
635 (synopsis "Simple version control system built on top of Git")
637 "Gitless is a Git-compatible version control system that aims to be easy to
638 learn and use. It simplifies the common workflow by committing changes to
639 tracked files by default and saving any uncommitted changes as part of a branch.
641 The friendly @command{gl} command-line interface gives feedback and helps you
642 figure out what to do next.
644 Gitless is implemented on top of Git and its commits and repositories are
645 indistinguishable from Git's. You (or other contributors) can always fall back
646 on @command{git}, and use any regular Git hosting service.")
647 (license license:expat)))
649 (define-public git-cal
656 (url "https://github.com/k4rthik/git-cal")
657 (commit (string-append "v" version))))
658 (file-name (git-file-name name version))
661 "08s9sif3qlk5n2dqpzq5yjczggnqlnxldljspjdqgpfydb2dqg3z"))))
662 (build-system perl-build-system)
663 (home-page "https://github.com/k4rthik/git-cal/")
664 (synopsis "GitHub like contributions calendar for terminal")
665 (description "@code{git-cal} is a script to view commits calendar similar
666 to GitHub contributions calendar.")
667 (license license:expat)))
669 (define-public libgit2
675 (uri (string-append "https://github.com/libgit2/libgit2/"
676 "releases/download/v" version
677 "/libgit2-" version ".tar.gz"))
680 "1fjdglkh04qv3b4alg621pxa689i0wlf8m7nf2755zawjr2zhwxd"))
681 (patches (search-patches "libgit2-mtime-0.patch"))
683 (delete-file-recursively "deps") #t))
684 (modules '((guix build utils)))))
685 (build-system cmake-build-system)
686 (outputs '("out" "debug"))
689 (list "-DUSE_NTLMCLIENT=OFF" ;TODO: package this
690 "-DREGEX_BACKEND=pcre2"
691 "-DUSE_HTTP_PARSER=system"
692 ,@(if (%current-target-system)
694 "-DPKG_CONFIG_EXECUTABLE="
695 (assoc-ref %build-inputs "pkg-config")
696 "/bin/" ,(%current-target-system) "-pkg-config"))
699 (modify-phases %standard-phases
700 (add-after 'unpack 'fix-hardcoded-paths
702 (substitute* "tests/repo/init.c"
703 (("#!/bin/sh") (string-append "#!" (which "sh"))))
704 (substitute* "tests/clar/fs.h"
705 (("/bin/cp") (which "cp"))
706 (("/bin/rm") (which "rm")))
708 ;; Run checks more verbosely, unless we are cross-compiling.
710 (lambda* (#:key (tests? #t) #:allow-other-keys)
712 (invoke "./libgit2_clar" "-v" "-Q")
713 ;; Tests may be disabled if cross-compiling.
714 (format #t "Test suite not run.~%")))))))
716 `(("libssh2" ,libssh2)
717 ("http-parser" ,http-parser)))
719 `(("pkg-config" ,pkg-config)
722 ;; These libraries are in 'Requires.private' in libgit2.pc.
723 `(("openssl" ,openssl)
726 (home-page "https://libgit2.org/")
727 (synopsis "Library providing Git core methods")
729 "Libgit2 is a portable, pure C implementation of the Git core methods
730 provided as a re-entrant linkable library with a solid API, allowing you to
731 write native speed custom Git applications in any language with bindings.")
732 ;; GPLv2 with linking exception
733 (license license:gpl2)))
735 (define-public libgit2-0.28
742 (uri (string-append "https://github.com/libgit2/libgit2/releases/"
744 "/libgit2-" version ".tar.gz"))
747 "0hjgpqjjmkciw1i8jqkx9q2vhdc4fc99qajhrj2bq8ziwsp6hyrb"))
748 (patches (search-patches "libgit2-mtime-0.patch"))
749 (modules '((guix build utils)))
751 (delete-file-recursively "deps") #t))))))
753 (define-public git-crypt
761 (url "https://github.com/AGWA/git-crypt")
763 (file-name (git-file-name name version))
765 (base32 "1ba5s0fvmd9hhnfhfsjrm40v0qpxfnwc8vmm55m0k4dryzkzx66q"))))
766 (build-system gnu-build-system)
769 ("openssl" ,openssl)))
771 `(("docbook-xsl" ,docbook-xsl)
772 ("libxslt" ,libxslt)))
774 `(#:tests? #f ; No tests.
776 (modify-phases %standard-phases
778 (add-after 'unpack 'patch-makefile
779 (lambda* (#:key inputs #:allow-other-keys)
780 (substitute* "Makefile"
781 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
782 (string-append (assoc-ref inputs "docbook-xsl")
783 "/xml/xsl/docbook-xsl-"
784 ,(package-version docbook-xsl)
785 "/manpages/docbook.xsl")))
789 (invoke "make" "ENABLE_MAN=yes")))
791 (lambda* (#:key outputs #:allow-other-keys)
792 (let ((out (assoc-ref outputs "out")))
793 (invoke "make" "install"
795 (string-append "PREFIX=" out))))))))
796 (home-page "https://www.agwa.name/projects/git-crypt/")
797 (synopsis "Transparent encryption of files in a git repository")
798 (description "git-crypt enables transparent encryption and decryption of
799 files in a git repository. Files which you choose to protect are encrypted when
800 committed, and decrypted when checked out. git-crypt lets you freely share a
801 repository containing a mix of public and private content. git-crypt gracefully
802 degrades, so developers without the secret key can still clone and commit to a
803 repository with encrypted files. This lets you store your secret material (such
804 as keys or passwords) in the same repository as your code, without requiring you
805 to lock down your entire repository.")
806 (license license:gpl3+)))
808 (define-public git-remote-gcrypt
810 (name "git-remote-gcrypt")
815 (url "https://git.spwhitton.name/git-remote-gcrypt")
817 (file-name (string-append name "-" version "-checkout"))
820 "0n8fzvr6y0pxrbvkywlky2bd8jvi0ayp4n9hwi84l1ldmv4a40dh"))))
821 (build-system trivial-build-system)
823 `(#:modules ((guix build utils))
825 (use-modules (guix build utils))
826 (let* ((source (assoc-ref %build-inputs "source"))
827 (output (assoc-ref %outputs "out"))
828 (bindir (string-append output "/bin")))
829 (install-file (string-append source "/git-remote-gcrypt")
832 (home-page "https://spwhitton.name/tech/code/git-remote-gcrypt/")
833 (synopsis "Whole remote repository encryption")
834 (description "git-remote-gcrypt is a Git remote helper to push and pull from
835 repositories encrypted with GnuPG. It works with the standard Git transports,
836 including repository hosting services like GitLab.
838 Remote helper programs are invoked by Git to handle network transport. This
839 helper handles @code{gcrypt:} URLs that access a remote repository encrypted
840 with GPG, using our custom format.
842 Supported locations are local, @code{rsync://} and @code{sftp://}, where the
843 repository is stored as a set of files, or instead any Git URL where gcrypt
844 will store the same representation in a Git repository, bridged over arbitrary
847 The aim is to provide confidential, authenticated Git storage and
848 collaboration using typical untrusted file hosts or services.")
849 (license license:gpl3+)))
854 ;; Update the ‘git-source’ input as well.
859 "https://git.zx2c4.com/cgit/snapshot/cgit-"
863 "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss"))))
864 (build-system gnu-build-system)
866 '(#:tests? #f ; XXX: fail to build the in-source git.
868 #:make-flags '("CC=gcc" "SHELL_PATH=sh")
870 (modify-phases %standard-phases
871 (add-after 'unpack 'unpack-git
872 (lambda* (#:key inputs #:allow-other-keys)
873 ;; Unpack the source of git into the 'git' directory.
874 (invoke "tar" "--strip-components=1" "-C" "git" "-xf"
875 (assoc-ref inputs "git-source"))))
876 (add-after 'unpack 'patch-absolute-file-names
877 (lambda* (#:key inputs #:allow-other-keys)
878 (define (quoted-file-name input path)
879 (string-append "\"" input path "\""))
880 (substitute* "ui-snapshot.c"
882 (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
884 (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
886 (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
888 (substitute* "filters/about-formatting.sh"
889 (("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out")
890 "/lib/cgit/filters"))
891 (("\\| tr") (string-append "| " (which "tr"))))
893 (substitute* "filters/html-converters/txt2html"
894 (("sed") (which "sed")))
896 (substitute* "filters/html-converters/man2html"
897 (("groff") (which "groff")))
899 (substitute* "filters/html-converters/rst2html"
900 (("rst2html\\.py") (which "rst2html.py")))
903 (delete 'configure) ; no configure script
904 (add-after 'build 'build-man
905 (lambda* (#:key make-flags #:allow-other-keys)
906 (apply invoke "make" "doc-man" make-flags)))
908 (lambda* (#:key make-flags outputs #:allow-other-keys)
909 (let ((out (assoc-ref outputs "out")))
911 "make" "install" "install-man"
912 (string-append "prefix=" out)
913 (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
915 ;; Move the platform-dependent 'cgit.cgi' into lib to get it
917 (rename-file (string-append out "/share/cgit/cgit.cgi")
918 (string-append out "/lib/cgit/cgit.cgi"))
920 (add-after 'install 'wrap-python-scripts
921 (lambda* (#:key outputs #:allow-other-keys)
924 (wrap-program (string-append (assoc-ref outputs "out")
925 "/lib/cgit/filters/" file)
926 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
927 '("syntax-highlighting.py"
928 "html-converters/md2html"))
931 ;; For building manpage.
932 `(("asciidoc" ,asciidoc)
937 `(;; Building cgit requires a Git source tree.
941 ;; cgit is tightly bound to git. Use GIT_VER from the Makefile,
942 ;; which may not match the current (package-version git).
943 (uri "mirror://kernel.org/software/scm/git/git-2.25.4.tar.xz")
945 (base32 "11am6s46wmn1yll5614smjhzlghbqq6gysgcs64igjr9y5wzpdxq"))))
949 ("python-docutils" ,python-docutils)
950 ("python-markdown" ,python-markdown)
951 ("python-pygments" ,python-pygments)
953 (home-page "https://git.zx2c4.com/cgit/")
954 (synopsis "Web frontend for git repositories")
956 "CGit is an attempt to create a fast web interface for the Git SCM, using
957 a built-in cache to decrease server I/O pressure.")
958 (license license:gpl2)))
960 (define-public python-git-multimail
962 (name "python-git-multimail")
963 (version "1.5.0.post1")
967 (uri (pypi-uri "git-multimail" version))
970 "1zkrbsa70anwpw86ysfwalrb7nsr064kygfiyikyq1pl9pcl969y"))))
971 (build-system python-build-system)
974 (modify-phases %standard-phases
975 (add-after 'unpack 'patch
976 (lambda* (#:key inputs #:allow-other-keys)
977 (substitute* "git-multimail/git_multimail.py"
978 (("GIT_EXECUTABLE = 'git'")
979 (string-append "GIT_EXECUTABLE = '"
980 (assoc-ref inputs "git") "/bin/git"
982 (("/usr/sbin/sendmail")
983 (string-append (assoc-ref inputs "sendmail")
984 "/usr/sbin/sendmail")))
988 ("sendmail" ,sendmail)))
989 (home-page "https://github.com/git-multimail/git-multimail")
990 (synopsis "Send notification emails for Git pushes")
992 "This hook sends emails describing changes introduced by pushes to a Git
993 repository. For each reference that was changed, it emits one ReferenceChange
994 email summarizing how the reference was changed, followed by one Revision
995 email for each new commit that was introduced by the reference change.
997 This script is designed to be used as a post-receive hook in a Git
999 (license license:gpl2)))
1001 (define-public python-ghp-import
1003 (name "python-ghp-import")
1009 (url "https://github.com/davisp/ghp-import")
1011 (file-name (git-file-name name version))
1013 (base32 "12pmw3zz3i57ljnm0rxdyjqdyhisbvy18mjwkb3bzp5pgzs2f45c"))))
1014 (build-system python-build-system)
1016 `(#:phases (modify-phases %standard-phases
1017 (add-after 'install 'install-documentation
1018 (lambda* (#:key outputs #:allow-other-keys)
1019 (let* ((out (assoc-ref outputs "out"))
1020 (doc (string-append out "/share/doc"))
1021 (licenses (string-append out "/share/licenses")))
1022 (install-file "README.md" doc)
1023 (install-file "LICENSE" licenses)))))))
1024 (home-page "https://github.com/davisp/ghp-import")
1025 (synopsis "Copy directory to the gh-pages branch")
1026 (description "Script that copies a directory to the gh-pages branch (by
1027 default) of the repository.")
1029 ;; See <https://bugs.gnu.org/27913>.
1030 (license (license:non-copyleft
1031 "https://raw.githubusercontent.com/davisp/ghp-import/master/LICENSE"
1032 "Tumbolia Public License"))))
1034 (define-public python2-ghp-import
1035 (package-with-python2
1036 (strip-python2-variant python-ghp-import)))
1038 (define-public python-gitdb
1040 (name "python-gitdb")
1044 (uri (pypi-uri "gitdb" version))
1047 "0l113fphn6msjl3cl3kyf332b6lal7daxdd0nfma0x9ipfb013jr"))))
1048 (build-system python-build-system)
1050 `(#:phases (modify-phases %standard-phases
1051 (add-before 'check 'create-test-repository
1053 (mkdir "/tmp/testrepo")
1054 ;; Some tests require a git repository, so create one.
1055 (with-directory-excursion "/tmp/testrepo"
1056 (do ((filecount 1 (1+ filecount)))
1057 ((> filecount 1000))
1058 (call-with-output-file (string-append
1059 "file" (number->string filecount))
1061 (format port "~a" filecount))))
1063 (invoke "git" "init")
1064 (invoke "git" "config" "user.name" "Total Git")
1065 (invoke "git" "config" "user.email" "git@localhost")
1066 (invoke "git" "add" "-A")
1067 (invoke "git" "commit" "-q" "-m" "dummy commit")))
1069 ;; The repository checkout must be a "bare" clone.
1070 (invoke "git" "clone" "--bare" "/tmp/testrepo"
1071 "/tmp/testrepo.git")))
1074 (setenv "GITDB_TEST_GIT_REPO_BASE" "/tmp/testrepo.git")
1075 ;; Skip tests that must be run from the gitdb repository.
1076 (setenv "TRAVIS" "1")
1077 (invoke "nosetests" "-v"))))))
1079 `(("python-smmap" ,python-smmap)))
1082 ("python-nose" ,python-nose)))
1083 (home-page "https://github.com/gitpython-developers/gitdb")
1084 (synopsis "Python implementation of the Git object database")
1086 "GitDB allows you to access @dfn{bare} Git repositories for reading and
1087 writing. It aims at allowing full access to loose objects as well as packs
1088 with performance and scalability in mind. It operates exclusively on streams,
1089 allowing to handle large objects with a small memory footprint.")
1090 (license license:bsd-3)))
1092 (define-public python-gitpython
1094 (name "python-gitpython")
1098 (uri (pypi-uri "GitPython" version))
1101 "1jzllsy9lwc9yibccgv7h9naxisazx2n3zmpy21c8n5xhysw69p4"))))
1102 (build-system python-build-system)
1104 `(#:tests? #f ;XXX: Tests can only be run within the GitPython repository.
1105 #:phases (modify-phases %standard-phases
1106 (add-after 'unpack 'embed-git-reference
1107 (lambda* (#:key inputs #:allow-other-keys)
1108 (substitute* "git/cmd.py"
1109 (("git_exec_name = \"git\"")
1110 (string-append "git_exec_name = \""
1111 (assoc-ref inputs "git")
1117 `(("python-gitdb" ,python-gitdb)))
1119 `(("python-ddt" ,python-ddt)
1120 ("python-nose" ,python-nose)))
1121 (home-page "https://github.com/gitpython-developers/GitPython")
1122 (synopsis "Python library for interacting with Git repositories")
1124 "GitPython is a python library used to interact with Git repositories,
1125 high-level like git-porcelain, or low-level like git-plumbing.
1127 It provides abstractions of Git objects for easy access of repository data,
1128 and additionally allows you to access the Git repository more directly using
1129 either a pure Python implementation, or the faster, but more resource intensive
1130 @command{git} command implementation.")
1131 (license license:bsd-3)))
1133 (define-public shflags
1140 (url "https://github.com/kward/shflags")
1141 (commit (string-append "v" version))))
1142 (file-name (git-file-name name version))
1145 "1ydx0sb6vz9s2dgp5bd64y7fpzh9qvmlfjxrbmzac8saknijrlly"))))
1146 (build-system gnu-build-system)
1148 `(#:tests? #f ; no tests
1150 (modify-phases %standard-phases
1151 (delete 'configure) ; nothing to configure
1152 (delete 'build) ; nothing to build
1154 (lambda* (#:key outputs #:allow-other-keys)
1155 (let* ((out (assoc-ref outputs "out"))
1156 (src (string-append out "/src")))
1157 (install-file "shflags" src)
1159 (home-page "https://github.com/kward/shflags")
1160 (synopsis "Command-line flags library for shell scripts")
1162 "Shell Flags (shFlags) is a library written to greatly simplify the
1163 handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
1164 ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
1165 different versions of getopt on various OSes make writing portable shell
1166 scripts difficult. shFlags instead provides an API that doesn't change across
1167 shell and OS versions so the script writer can be confident that the script
1169 (license license:lgpl2.1)))
1171 (define-public git-flow
1174 ;; This version has not be officially released yet, so we build it
1175 ;; directly from the git repository.
1180 (url "https://github.com/petervanderdoes/gitflow-avh/")
1182 (file-name (git-file-name name version))
1185 "13q4mnrxr03wz2dkhzy73j384g299m4d545cnhxcaznvdwfany4h"))))
1186 (build-system gnu-build-system)
1187 (inputs `(("shflags" ,shflags)))
1189 '(#:tests? #f ; no tests
1190 #:make-flags (list (string-append "prefix="
1191 (assoc-ref %outputs "out")))
1193 (modify-phases %standard-phases
1194 (add-after 'unpack 'reset-shFlags-link
1195 (lambda* (#:key inputs #:allow-other-keys)
1196 ;; The link points to a file in the shFlags submodule.
1197 ;; Redirect it to point to our system shFlags.
1198 (let ((shflags (assoc-ref inputs "shflags")))
1200 (delete-file "gitflow-shFlags")
1201 (symlink (string-append shflags "/src/shflags")
1202 "gitflow-shFlags")))))
1205 (home-page "https://nvie.com/posts/a-successful-git-branching-model/")
1206 (synopsis "Git extensions for Vincent Driessen's branching model")
1208 "Vincent Driessen's branching model is a git branching and release
1209 management strategy that helps developers keep track of features, hotfixes,
1210 and releases in bigger software projects. The git-flow library of git
1211 subcommands helps automate some parts of the flow to make working with it a
1213 (license license:bsd-2)))
1215 (define-public stgit
1223 (url "https://github.com/ctmarinas/stgit")
1224 (commit (string-append "v" version))))
1225 (file-name (git-file-name name version))
1227 (base32 "0bgxgsd6nj6gkk74c56vrjsyr7j19jrj6cx2ma6f7b20wriznhd5"))))
1228 (build-system python-build-system)
1235 (modify-phases %standard-phases
1236 (add-after 'unpack 'hard-code-version
1238 ;; setup.py tries to cleverly extract the version number from the
1239 ;; git history, which the source checkout lacks. Hard-code one.
1240 (substitute* "setup.py"
1242 (format #f "'~a'" ,version)))
1244 (add-before 'check 'patch-tests
1246 (substitute* (list "t/t1900-mail.sh"
1247 "t/t7504-commit-msg-hook.sh")
1255 (string-append "SHELL_PATH=" (which "bash"))
1257 (home-page "https://stacked-git.github.io/")
1258 (synopsis "Stacked Git")
1260 "StGit is a command-line application that provides functionality similar
1261 to Quilt (i.e., pushing/popping patches to/from a stack), but using Git
1262 instead of @command{diff} and @command{patch}. StGit stores its patches in a
1263 Git repository as normal Git commits, and provides a number of commands to
1264 manipulate them in various ways.")
1265 (license license:gpl2)))
1270 (version "1.20151229")
1275 (url "https://github.com/RichiH/vcsh")
1276 (commit (string-append "v" version))))
1277 (file-name (git-file-name name version))
1279 (base32 "1grpj45nbpv4j60vd2kg4rj53zrm0bc0h9l4pfd3c2mwbvywm6ab"))))
1280 (build-system gnu-build-system)
1282 `(("which" ,which)))
1286 ("perl-test-harness" ,perl-test-harness)
1287 ("perl-shell-command" ,perl-shell-command)
1288 ("perl-test-most" ,perl-test-most)))
1290 '(#:phases (modify-phases %standard-phases
1293 #:make-flags (list (string-append "PREFIX="
1294 (assoc-ref %outputs "out")))
1295 #:test-target "test"))
1296 (home-page "https://github.com/RichiH/vcsh")
1297 (synopsis "Version control system for @code{$HOME}")
1299 "vcsh version-controls configuration files in several Git repositories,
1300 all in one single directory. They all maintain their working trees without
1301 clobbering each other or interfering otherwise. By default, all Git
1302 repositories maintained via vcsh store the actual files in @code{$HOME},
1303 though this can be overridden.")
1304 (license license:gpl2+)))
1306 (define-public git-test-sequence
1307 (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76"))
1309 (name "git-test-sequence")
1310 (version (string-append "20140312." (string-take commit 7)))
1314 ;; There are many other scripts in this directory; we
1315 ;; are interested in just one for this package.
1316 (url "https://github.com/dustin/bindir")
1318 (file-name (git-file-name name version))
1321 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
1322 (build-system trivial-build-system)
1324 `(#:modules ((guix build utils))
1326 (use-modules (guix build utils))
1327 (let* ((source (assoc-ref %build-inputs "source"))
1328 (output (assoc-ref %outputs "out"))
1329 (bindir (string-append output "/bin"))
1330 (script "git-test-sequence"))
1331 (install-file (string-append source "/" script)
1334 (home-page "https://dustin.sallings.org/2010/03/28/git-test-sequence.html")
1335 (synopsis "Run a command over a sequence of commits")
1337 "git-test-sequence is similar to an automated git bisect except it’s
1338 linear. It will test every change between two points in the DAG. It will
1339 also walk each side of a merge and test those changes individually.")
1340 (license (license:x11-style "file://LICENSE")))))
1342 (define-public gitolite
1350 (url "https://github.com/sitaramc/gitolite")
1351 (commit (string-append "v" version))))
1352 (file-name (git-file-name name version))
1354 (base32 "05xw1pmagvkrbzga5pgl3xk9qyc6b5x73f842454f3w9ijspa8zy"))))
1355 (build-system gnu-build-system)
1357 '(#:tests? #f ; no tests
1358 #:phases (modify-phases %standard-phases
1361 (add-before 'install 'patch-scripts
1362 (lambda* (#:key inputs #:allow-other-keys)
1363 (let ((perl (string-append (assoc-ref inputs "perl")
1365 ;; This seems to take care of every shell script that
1367 (substitute* (find-files "." ".*")
1369 (string-append " " perl " -")))
1371 (substitute* (find-files "src/triggers" ".*")
1373 (string-append " " (which "sed") " ")))
1376 '("src/triggers/post-compile/update-gitweb-access-list"
1377 "src/triggers/post-compile/ssh-authkeys-split"
1378 "src/triggers/upstream")
1380 (string-append " " (which "grep") " ")))
1382 ;; Avoid references to the store in authorized_keys.
1383 ;; This works because gitolite-shell is in the PATH.
1384 (substitute* "src/triggers/post-compile/ssh-authkeys"
1385 (("\\$glshell \\$user")
1386 "gitolite-shell $user"))
1388 (add-before 'install 'patch-source
1389 (lambda* (#:key inputs #:allow-other-keys)
1390 ;; Gitolite uses cat to test the readability of the
1392 (substitute* "src/lib/Gitolite/Setup.pm"
1394 (string-append "\"" (which "cat") " "))
1396 (string-append "\"" (which "ssh-keygen"))))
1398 (substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
1399 "src/lib/Gitolite/Hooks/Update.pm")
1401 (string-append (assoc-ref inputs "perl")
1404 (substitute* "src/lib/Gitolite/Common.pm"
1406 (string-append "\"" (which "ssh-keygen")))
1409 (assoc-ref inputs "inetutils")
1414 (lambda* (#:key outputs #:allow-other-keys)
1415 (let* ((output (assoc-ref outputs "out"))
1416 (sharedir (string-append output "/share/gitolite"))
1417 (bindir (string-append output "/bin")))
1420 (invoke "./install" "-to" sharedir)
1421 ;; Create symlinks for executable scripts in /bin.
1422 (for-each (lambda (script)
1423 (symlink (string-append sharedir "/" script)
1424 (string-append bindir "/" script)))
1425 '("gitolite" "gitolite-shell"))
1427 (add-after 'install 'wrap-scripts
1428 (lambda* (#:key inputs outputs #:allow-other-keys)
1429 (let ((out (assoc-ref outputs "out"))
1430 (coreutils (assoc-ref inputs "coreutils"))
1431 (findutils (assoc-ref inputs "findutils"))
1432 (git (assoc-ref inputs "git")))
1433 (wrap-program (string-append out "/bin/gitolite")
1436 (string-append dir "/bin"))
1437 (list out coreutils findutils git))))
1441 ("coreutils" ,coreutils)
1442 ("findutils" ,findutils)
1443 ("inetutils" ,inetutils)))
1444 ;; git and openssh are propagated because trying to patch the source via
1445 ;; regexp matching is too brittle and prone to false positives.
1448 ("openssh" ,openssh)))
1449 (home-page "https://gitolite.com")
1450 (synopsis "Git access control layer")
1452 "Gitolite is an access control layer on top of Git, providing fine access
1453 control to Git repositories.")
1454 (license license:gpl2)))
1456 (define-public pre-commit
1462 ;; No tests in the PyPI tarball.
1465 (url "https://github.com/pre-commit/pre-commit")
1466 (commit (string-append "v" version))))
1467 (file-name (git-file-name name version))
1469 (base32 "0b3ks6viccq3n4p8i8zgfd40vp1k5nkhmmlz7p4nxcdizw8zxgn8"))))
1470 (build-system python-build-system)
1473 (modify-phases %standard-phases
1474 (add-before 'check 'set-up-git
1476 ;; Change from /homeless-shelter to /tmp for write permission.
1477 (setenv "HOME" "/tmp")
1478 ;; Environment variables used in the tests.
1479 (setenv "GIT_AUTHOR_NAME" "Your Name")
1480 (setenv "GIT_COMMITTER_NAME" "Your Name")
1481 (setenv "GIT_AUTHOR_EMAIL" "you@example.com")
1482 (setenv "GIT_COMMITTER_EMAIL" "you@example.com")
1483 (invoke "git" "config" "--global" "user.name" "Your Name")
1484 (invoke "git" "config" "--global" "user.email" "you@example.com")
1487 (lambda* (#:key inputs outputs #:allow-other-keys)
1488 (add-installed-pythonpath inputs outputs)
1489 (invoke "pytest" "tests" "-k"
1491 ;; Disable conda tests.
1492 "not test_conda_hook"
1493 " and not test_conda_with_additional_dependencies_hook"
1494 " and not test_local_conda_additional_dependencies"
1495 ;; Disable cpan tests.
1496 " and not test_local_perl_additional_dependencies"
1497 " and not test_perl_hook"
1498 ;; Disable Ruby tests.
1499 " and not test_additional_ruby_dependencies_installed"
1500 " and not test_install_rbenv"
1501 " and not test_install_rbenv_with_version"
1502 " and not test_run_a_ruby_hook"
1503 " and not test_run_ruby_hook_with_disable_shared_gems"
1504 " and not test_run_versioned_ruby_hook"
1505 ;; Disable Cargo tests.
1506 " and not test_additional_rust_cli_dependencies_installed"
1507 " and not test_additional_rust_lib_dependencies_installed"
1508 " and not test_local_rust_additional_dependencies"
1509 " and not test_rust_hook"
1510 ;; Disable dotnet tests.
1511 " and not test_dotnet_hook"
1512 ;; Disable nodejs tests.
1513 " and not test_unhealthy_if_system_node_goes_missing"
1514 " and not test_installs_without_links_outside_env"
1515 " and not test_healthy_system_node"
1516 ;; Disable python2 test.
1517 " and not test_switch_language_versions_doesnt_clobber"
1518 ;; These tests try to open a network socket.
1519 " and not test_additional_golang_dependencies_installed"
1520 " and not test_additional_node_dependencies_installed"
1521 " and not test_golang_hook"
1522 " and not test_golang_hook_still_works_when_gobin_is_set"
1523 " and not test_local_golang_additional_dependencies"
1524 " and not test_main"
1525 " and not test_node_hook_with_npm_userconfig_set"
1526 " and not test_run_a_node_hook"
1527 " and not test_run_versioned_node_hook"
1528 ;; Tests failing with a permission error.
1529 ;; They try to write to the filesystem.
1530 " and not test_autoupdate_hook_disappearing_repo"
1531 " and not test_hook_disppearing_repo_raises"
1532 " and not test_img_conflict"
1533 " and not test_img_something_unstaged"
1534 " and not test_installed_from_venv"
1535 " and not test_too_new_version"
1536 " and not test_try_repo_uncommitted_changes"
1537 " and not test_versions_ok"
1538 ;; This test tries to activate a virtualenv.
1539 " and not test_healthy_venv_creator"
1540 ;; Fatal error: Not a Git repository.
1541 " and not test_all_cmds"
1542 " and not test_try_repo"
1543 ;; No module named 'pip._internal.cli.main'.
1544 " and not test_additional_dependencies_roll_forward"
1545 ;; Assertion errors.
1546 " and not test_install_existing_hooks_no_overwrite"
1547 " and not test_uninstall_restores_legacy_hooks"))))
1548 (add-before 'reset-gzip-timestamps 'make-files-writable
1549 (lambda* (#:key outputs #:allow-other-keys)
1550 ;; Make sure .gz files are writable so that the
1551 ;; 'reset-gzip-timestamps' phase can do its work.
1552 (let ((out (assoc-ref outputs "out")))
1553 (for-each make-file-writable
1554 (find-files out "\\.gz$"))
1557 `(("git" ,git-minimal)
1558 ("python-pytest" ,python-pytest)
1559 ("python-re-assert" ,python-re-assert)))
1560 ;; Propagate because pre-commit is also used as a module.
1562 `(("python-cfgv" ,python-cfgv)
1563 ("python-identify" ,python-identify)
1564 ("python-nodeenv" ,python-nodeenv)
1565 ("python-pyyaml" ,python-pyyaml)
1566 ("python-toml" ,python-toml)
1567 ("python-virtualenv" ,python-virtualenv)))
1568 (home-page "https://pre-commit.com/")
1569 (synopsis "Framework for managing and maintaining multi-language pre-commit hooks")
1571 "Pre-commit is a multi-language package manager for pre-commit hooks. You
1572 specify a list of hooks you want and pre-commit manages the installation and
1573 execution of any hook written in any language before every commit.")
1574 (license license:expat)))
1576 (define-public mercurial
1582 (uri (string-append "https://www.mercurial-scm.org/"
1583 "release/mercurial-" version ".tar.gz"))
1586 "0x08yjs26j88kh1bvl2g3r24lnfc023ry3i1cxfq6haray6sv5ag"))))
1587 (build-system python-build-system)
1590 (modify-phases %standard-phases
1591 (add-after 'unpack 'patch-tests
1593 (substitute* '("tests/test-extdiff.t"
1594 "tests/test-logtoprocess.t"
1595 "tests/test-patchbomb.t"
1596 "tests/test-run-tests.t"
1597 "tests/test-transplant.t")
1602 (lambda* (#:key tests? #:allow-other-keys)
1603 (with-directory-excursion "tests"
1604 ;; The following tests are known to fail.
1605 (for-each delete-file
1606 '(;; XXX: This test calls 'run-tests.py --with-hg=
1607 ;; `which hg`' and fails because there is no hg on
1608 ;; PATH from before (that's why we are building it!)?
1611 ;; FIXME: Why does this fail in the build container, but
1612 ;; not in 'guix environment -C' (even without /bin/sh)?
1613 "test-nointerrupt.t"
1615 ;; FIXME: This gets killed but does not receive an interrupt.
1616 "test-commandserver.t"
1618 ;; Only works when run in a hg-repo, not in an
1619 ;; extracted tarball
1622 ;; TODO: the fqaddr() call fails in the build
1623 ;; container, causing these server tests to fail.
1625 "test-http-branchmap.t"
1626 "test-pull-bundle.t"
1629 "test-subrepo-deep-nested-change.t"
1630 "test-subrepo-recursion.t"))
1632 (invoke "./run-tests.py"
1633 ;; ‘make check’ does not respect ‘-j’.
1634 (string-append "-j" (number->string
1635 (parallel-job-count)))
1636 ;; The default time-outs are too low for many systems.
1637 ;; Raise them generously: Guix enforces its own.
1639 "--slowtimeout" "86400"
1640 ;; The test suite takes a long time and produces little
1641 ;; output by default. Prevent timeouts due to silence.
1644 ;; The following inputs are only needed to run the tests.
1646 `(("python-nose" ,python-nose)
1649 (home-page "https://www.mercurial-scm.org/")
1650 (synopsis "Decentralized version control system")
1652 "Mercurial is a free, distributed source control management tool.
1653 It efficiently handles projects of any size
1654 and offers an easy and intuitive interface.")
1655 (license license:gpl2+)))
1657 (define-public python-hg-evolve
1659 (name "python-hg-evolve")
1665 (url "https://www.mercurial-scm.org/repo/evolve")
1666 (changeset version)))
1667 (file-name (string-append name "-" version "-checkout"))
1670 "1lz407373lfam9n02gq0l0rc2sjvn0m96kbzy93ipia3ika8fa68"))))
1671 (build-system python-build-system)
1673 ;; Tests need mercurial source code.
1676 `(("mercurial" ,mercurial)))
1677 (home-page "https://www.mercurial-scm.org/doc/evolution/")
1678 (synopsis "Flexible evolution of Mercurial history")
1679 (description "Evolve is a Mercurial extension for faster and safer mutable
1680 history. It implements the changeset evolution concept for Mercurial.")
1681 (license license:gpl2)))
1689 (uri (string-append "http://www.webdav.org/neon/neon-"
1693 "1jpvczcx658vimqm7c8my2q41fnmjaf1j03g7bsli6rjxk6xh2yv"))))
1694 (build-system gnu-build-system)
1697 ("pkg-config" ,pkg-config)))
1699 `(("libxml2" ,libxml2)
1700 ("openssl" ,openssl)
1703 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
1704 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
1706 #:configure-flags '("--enable-shared"
1707 ;; requires libgnutils-config, deprecated
1709 ; "--with-ssl=gnutls")))
1710 "--with-ssl=openssl")))
1711 (home-page "http://www.webdav.org/neon/")
1712 (synopsis "HTTP and WebDAV client library")
1714 "Neon is an HTTP and WebDAV client library, with a C interface and the
1717 @item High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
1719 @item low-level interface to the HTTP request/response engine, allowing the use
1720 of arbitrary HTTP methods, headers, etc.;
1721 @item authentication support including Basic and Digest support, along with
1722 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
1723 @item SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
1724 verifying server certificates, handling client certificates, and examining
1725 certificate properties, smartcard-based client certificates are also
1726 supported via a PKCS#11 wrapper interface;
1727 @item abstract interface to parsing XML using libxml2 or expat, and wrappers for
1728 simplifying handling XML HTTP response bodies;
1729 @item WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
1730 property manipulation.
1732 (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+
1734 (define-public subversion
1740 (uri (string-append "mirror://apache/subversion/"
1741 "subversion-" version ".tar.bz2"))
1744 "00i1f88snlpcnsycpn6r315h6792l5nkr2p5k6kq6yprz4cf5a3b"))))
1745 (build-system gnu-build-system)
1747 '(#:parallel-tests? #f ; TODO Seems to cause test failures on
1749 #:configure-flags '("--enable-static=no")
1751 (modify-phases %standard-phases
1752 (add-after 'configure 'patch-libtool-wrapper-ls
1753 (lambda* (#:key inputs #:allow-other-keys)
1754 ;; This substitution allows tests svnauthz_tests and svnlook_tests
1755 ;; to pass. These tests execute svnauthz and svnlook through
1756 ;; their libtool wrapper scripts from svn hooks, whose empty
1757 ;; environments cause "ls: command not found" errors. It would be
1758 ;; nice if this fix ultimately made its way into libtool.
1759 (let ((coreutils (assoc-ref inputs "coreutils")))
1760 (substitute* "libtool"
1761 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))
1763 (add-before 'build 'patch-test-sh
1765 (substitute* "subversion/tests/libsvn_repos/repos-test.c"
1766 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1768 (add-before 'check 'set-PARALLEL
1769 (lambda* (#:key parallel-tests? #:allow-other-keys)
1771 (setenv "PARALLEL" (number->string (parallel-job-count)))
1772 (simple-format #t "parallel-tests? are disabled\n"))
1774 (add-after 'install 'install-perl-bindings
1775 (lambda* (#:key outputs #:allow-other-keys)
1776 ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
1777 (let ((out (assoc-ref outputs "out")))
1778 (invoke "make" "swig-pl-lib")
1779 ;; FIXME: Test failures.
1780 ;; (invoke "make" "check-swig-pl")
1781 (invoke "make" "install-swig-pl-lib")
1783 ;; Set the right installation prefix.
1784 (with-directory-excursion
1785 "subversion/bindings/swig/perl/native"
1786 (invoke "perl" "Makefile.PL"
1788 (string-append "PREFIX=" out))
1789 (invoke "make" "install"
1790 (string-append "OTHERLDFLAGS="
1794 `(("pkg-config" ,pkg-config)
1795 ;; For the Perl bindings.
1799 ("apr-util" ,apr-util)
1803 ("python" ,python-wrapper)
1805 ("utf8proc" ,utf8proc)
1807 (home-page "https://subversion.apache.org/")
1808 (synopsis "Revision control system")
1810 "@dfn{Subversion} (svn) exists to be recognized and adopted as a
1811 centralized version control system characterized by its
1812 reliability as a safe haven for valuable data; the simplicity of its model and
1813 usage; and its ability to support the needs of a wide variety of users and
1814 projects, from individuals to large-scale enterprise operations.")
1815 (license license:asl2.0)))
1823 (uri (string-append "mirror://gnu/rcs/rcs-"
1827 "1if5pa4iip2p70gljm54nggfdnsfjxa4cqz8fpj07lvsijary39s"))
1828 (patches (search-patches "rcs-5.10.0-no-stdin.patch"))))
1829 (build-system gnu-build-system)
1830 (native-inputs `(("ed" ,ed)))
1831 (home-page "https://www.gnu.org/software/rcs/")
1832 (synopsis "Per-file local revision control system")
1834 "RCS is the original Revision Control System. It works on a
1835 file-by-file basis, in contrast to subsequent version control systems such as
1836 CVS, Subversion, and Git. This can make it suitable for system
1837 administration files, for example, which are often inherently local to one
1839 (license license:gpl3+)))
1848 "https://ftp.gnu.org/non-gnu/cvs/source/feature/"
1849 version "/cvs-" version ".tar.bz2"))
1850 (patches (search-patches "cvs-CVE-2017-12836.patch"))
1853 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
1854 (build-system gnu-build-system)
1856 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
1858 #:configure-flags (list "--with-external-zlib")))
1859 (inputs `(("zlib" ,zlib)
1860 ("nano" ,nano))) ; the default editor
1861 (home-page "http://cvs.nongnu.org")
1862 (synopsis "Historical centralized version control system")
1864 "CVS is a version control system, an important component of Source
1865 Configuration Management (SCM). Using it, you can record the history of
1866 sources files, and documents. It fills a similar role to the free software
1867 RCS, PRCS, and Aegis packages.")
1868 (license license:gpl1+)))
1870 (define-public cvs-fast-export
1872 (name "cvs-fast-export")
1876 (uri (string-append "http://www.catb.org/~esr/cvs-fast-export/"
1877 "cvs-fast-export-" version ".tar.gz"))
1880 "06y2myhhv2ap08bq7d7shq0b7lq6wgznwrpz6622xq66cxkf2n5g"))))
1881 (build-system gnu-build-system)
1884 (modify-phases %standard-phases
1885 (delete 'configure)) ; no configure script
1886 #:parallel-build? #f ; parallel a2x commands fail spectacularly
1888 (list "CC=gcc" (string-append "prefix?=" (assoc-ref %outputs "out")))))
1891 ("python" ,python-wrapper)))
1893 `(("asciidoc" ,asciidoc)
1894 ;; These are needed for the tests.
1897 (home-page "http://www.catb.org/esr/cvs-fast-export/")
1898 (synopsis "Export an RCS or CVS history as a fast-import stream")
1899 (description "This program analyzes a collection of RCS files in a CVS
1900 repository (or outside of one) and, when possible, emits an equivalent history
1901 in the form of a fast-import stream. Not all possible histories can be
1902 rendered this way; the program tries to emit useful warnings when it can't.
1904 The program can also produce a visualization of the resulting commit directed
1905 acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org,
1906 Graphviz}. The package also includes @command{cvssync}, a tool for mirroring
1907 masters from remote CVS hosts.")
1908 (license license:gpl2+)))
1910 (define-public vc-dwim
1916 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
1920 "0am6axxdvkm2vwgg0gjrd930yv4dlsdbf0rdv0zh5bhy1ir64rph"))))
1921 (build-system gnu-build-system)
1922 (inputs `(("perl" ,perl)))
1924 `(("emacs" ,emacs-minimal) ; for `ctags'
1925 ("inetutils" ,inetutils))) ; for `hostname', used in the tests
1926 (home-page "https://www.gnu.org/software/vc-dwim/")
1927 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
1929 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
1930 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
1931 using version control at the same time, for example by printing a reminder
1932 when a file change has been described in the ChangeLog but the file has not
1933 been added to the VC. vc-chlog scans changed files and generates
1934 standards-compliant ChangeLog entries based on the changes that it detects.")
1935 (license license:gpl3+)))
1937 (define-public diffstat
1945 (string-append "ftp://invisible-island.net/diffstat/"
1946 "diffstat-" version ".tgz")
1947 (string-append "http://invisible-mirror.net/archives/diffstat/"
1948 "diffstat-" version ".tgz")))
1951 "0vyw200s5dv1257pmrh6c6fdkmw3slyz5szpqfx916xr04sdbpby"))))
1952 (build-system gnu-build-system)
1953 (home-page "https://invisible-island.net/diffstat/")
1954 (synopsis "Make histograms from the output of @command{diff}")
1956 "Diffstat reads the output of @command{diff} and displays a histogram of
1957 the insertions, deletions, and modifications per file. It is useful for
1958 reviewing large, complex patch files.")
1959 (license (license:x11-style "file://COPYING"))))
1967 (uri (string-append "mirror://gnu/" name "/CSSC-"
1971 "1vsisqq573xjr2qpn19iwmpqgl3mq03m790akpa4rvj60b4d1gni"))))
1972 (build-system gnu-build-system)
1975 (modify-phases %standard-phases
1976 (add-before 'check 'precheck
1979 (substitute* "tests/common/test-common"
1980 (("/bin/pwd") (which "pwd")))
1982 (substitute* "tests/prt/all-512.sh"
1983 (("/bin/sh") (which "sh")))
1985 ;; XXX: This test has no hope of passing until there is a "nogroup"
1986 ;; entry (or at least some group to which the guix builder does
1987 ;; not belong) in the /etc/group file of the build environment.
1988 ;; Currently we do not have such a group. Disable this test for now.
1989 (substitute* "tests/Makefile"
1990 (("test-delta ") ""))))))))
1991 ;; These are needed for the tests
1992 (native-inputs `(("git" ,git)
1994 (home-page "https://www.gnu.org/software/cssc/")
1995 (synopsis "File-based version control like SCCS")
1996 (description "GNU CSSC provides a replacement for the legacy Unix source
1997 code control system SCCS. This allows old code still under that system to be
1998 accessed and migrated on modern systems.")
1999 (license license:gpl3+)))
2001 ;; This package can unfortunately work only in -TEST mode, since Aegis
2002 ;; requires that it is installed setuid root.
2003 (define-public aegis
2009 (uri (string-append "mirror://sourceforge/aegis/aegis/" version
2010 "/aegis-" version ".tar.gz"))
2013 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
2014 (patches (search-patches "aegis-perl-tempdir1.patch"
2015 "aegis-perl-tempdir2.patch"
2016 "aegis-test-fixup-1.patch"
2017 "aegis-test-fixup-2.patch"
2018 "aegis-constness-error.patch"))))
2019 (build-system gnu-build-system)
2021 `(("e2fsprogs" ,e2fsprogs)
2024 ("libxml2" ,libxml2)
2026 ("gettext" ,gettext-minimal)))
2031 ;; Various tests require the following:
2035 ("subversion" ,subversion)
2039 `(#:configure-flags (list "--with-no-aegis-configured"
2040 "--sharedstatedir=/var/com/aegis"
2041 ;; Uses the old 'throw()' specifier with 'new'
2042 ;; which changed in C++11.
2043 "CXXFLAGS=-std=c++03")
2044 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
2046 (modify-phases %standard-phases
2047 (add-before 'configure 'pre-conf
2049 (substitute* (append '("configure"
2050 "etc/check-tar-gz.sh"
2054 "script/aebisect.in"
2055 "script/aeintegratq.in"
2057 "script/test_funcs.in"
2058 "web/eg_oss_templ.sh"
2060 "libaegis/getpw_cache.cc")
2061 (find-files "test" "\\.sh"))
2062 (("/bin/sh") (which "sh")))
2063 (setenv "SH" (which "sh"))
2067 (let ((home (string-append (getcwd) "/my-new-home")))
2068 ;; Some tests need to write to $HOME.
2070 (setenv "HOME" home)
2072 ;; This test assumes that flex has been symlinked to "lex".
2073 (substitute* "test/00/t0011a.sh"
2074 (("type lex") "type flex"))
2076 ;; XXX Disable tests that fail, for unknown reasons, ‘for now’.
2078 (lambda (test) (substitute* "Makefile"
2079 (((string-append "test/" test "\\.ES ")) "")))
2084 ;; The author decided to call the check rule "sure".
2085 (invoke "make" "sure")))))))
2086 (home-page "https://sourceforge.net/projects/aegis/")
2087 (synopsis "Project change supervisor")
2088 (description "Aegis is a project change supervisor, and performs some of
2089 the Software Configuration Management needed in a CASE environment. Aegis
2090 provides a framework within which a team of developers may work on many
2091 changes to a program independently, and Aegis coordinates integrating these
2092 changes back into the master source of the program, with as little disruption
2093 as possible. Resolution of contention for source files, a major headache for
2094 any project with more than one developer, is one of Aegis's major functions.")
2095 (license license:gpl3+)))
2097 (define-public reposurgeon
2099 (name "reposurgeon")
2103 (uri (string-append "http://www.catb.org/~esr/" name "/"
2104 name "-" version ".tar.xz"))
2107 "1af0z14wcm4bk5a9ysinbwq2fp3lf5f7i8mvwh7286hr3fnagcaz"))
2108 (patches (search-patches
2109 "reposurgeon-add-missing-docbook-files.patch"))))
2110 (build-system gnu-build-system)
2114 (string-append "target=" (assoc-ref %outputs "out")))
2116 (modify-phases %standard-phases
2117 (add-after 'unpack 'patch-inputs
2118 (lambda* (#:key inputs #:allow-other-keys)
2119 (let ((tzdata (assoc-ref inputs "tzdata")))
2120 (substitute* "reposurgeon"
2121 (("/usr/share/zoneinfo")
2122 (string-append tzdata "/share/zoneinfo")))
2123 (substitute* "test/svn-to-svn"
2124 (("/bin/echo") "echo"))
2126 (delete 'configure) ; no configure script
2127 (add-before 'build 'fix-docbook
2128 (lambda* (#:key inputs #:allow-other-keys)
2129 (substitute* (find-files "." "\\.xml$")
2130 (("docbook/docbookx.dtd")
2131 (string-append (assoc-ref inputs "docbook-xml")
2132 "/xml/dtd/docbook/docbookx.dtd")))
2134 (add-before 'check 'set-up-test-environment
2135 (lambda* (#:key inputs #:allow-other-keys)
2136 (let ((tzdata (assoc-ref inputs "tzdata")))
2137 (setenv "TZDIR" (string-append tzdata "/share/zoneinfo"))
2139 (add-after 'install 'install-emacs-data
2140 (lambda* (#:key outputs #:allow-other-keys)
2141 (install-file "reposurgeon-mode.el"
2142 (string-append (assoc-ref outputs "out")
2143 "/share/emacs/site-lisp"))
2146 `(("python" ,python-wrapper)
2147 ("tzdata" ,tzdata)))
2149 `( ;; For building documentation.
2150 ("asciidoc" ,asciidoc)
2151 ("docbook-xml" ,docbook-xml)
2152 ("docbook-xsl" ,docbook-xsl)
2153 ("libxml2" ,libxml2)
2159 ("mercurial" ,mercurial)
2160 ("subversion" ,subversion)))
2161 (home-page "http://www.catb.org/~esr/reposurgeon/")
2162 (synopsis "Edit version-control repository history")
2163 (description "Reposurgeon enables risky operations that version-control
2164 systems don't want to let you do, such as editing past comments and metadata
2165 and removing commits. It works with any version control system that can
2166 export and import Git fast-import streams, including Git, Mercurial, Fossil,
2167 Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly
2168 and can thus be used to script production of very high-quality conversions
2169 from Subversion to any supported Distributed Version Control System (DVCS).")
2170 ;; Most files are distributed under bsd-2, except 'repocutter' which is
2172 (license (list license:bsd-2 license:bsd-3))))
2181 "https://github.com/jonas/tig/releases/download/tig-"
2182 version "/tig-" version ".tar.gz"))
2185 "0r4y9hyvpkplaxrzslws3asz652d83qh3bjwvmp8assga8s5s3ah"))))
2186 (build-system gnu-build-system)
2188 `(("asciidoc" ,asciidoc)
2191 `(("ncurses" ,ncurses)
2192 ("readline" ,readline)))
2195 (modify-phases %standard-phases
2196 (add-after 'install 'install-doc
2198 (invoke "make" "install-doc"))))
2199 #:test-target "test"
2200 #:tests? #f)) ; tests require access to /dev/tty
2201 (home-page "https://jonas.github.io/tig/")
2202 (synopsis "Ncurses-based text user interface for Git")
2204 "Tig is an ncurses text user interface for Git, primarily intended as
2205 a history browser. It can also stage hunks for commit, or colorize the
2206 output of the @code{git} command.")
2207 (license license:gpl2+)))
2209 (define-public findnewest
2217 (url "https://github.com/0-wiz-0/findnewest")
2218 (commit (string-append "findnewest-" version))))
2219 (file-name (git-file-name name version))
2221 (base32 "1x1cbn2b27h5r0ah5xc06fkalfdci2ngrgd4wibxjw0h88h0nvgq"))))
2222 (build-system gnu-build-system)
2223 (native-inputs `(("autoconf" ,autoconf)
2224 ("automake" ,automake)))
2225 (home-page "https://github.com/0-wiz-0/findnewest/releases")
2226 (synopsis "Print the modification time of the latest file")
2228 "Recursively find the newest file in a file tree and print its
2229 modification time.")
2230 (license license:bsd-2)))
2232 (define-public myrepos
2235 (version "1.20180726")
2240 (url "git://myrepos.branchable.com/myrepos")
2242 (file-name (string-append name "-" version "-checkout"))
2244 (base32 "0jphw61plm8cgklja6hs639xhdvxgvjwbr6jpvjwpp7hc5gmhms5"))))
2245 (build-system gnu-build-system)
2247 '(#:test-target "test"
2248 #:make-flags (list (string-append "PREFIX=" %output))
2250 (modify-phases %standard-phases
2252 (add-after 'install 'wrap-webcheckout
2253 (lambda* (#:key inputs outputs #:allow-other-keys)
2254 (let ((out (assoc-ref outputs "out")))
2255 (wrap-program (string-append out "/bin/webcheckout")
2256 `("PERL5LIB" ":" prefix
2257 ,(map (lambda (i) (string-append (assoc-ref inputs i)
2258 "/lib/perl5/site_perl"))
2259 '("perl-encode-locale" "perl-http-date"
2260 "perl-http-message" "perl-html-parser" "perl-libwww"
2261 "perl-uri" "perl-try-tiny"))))
2265 ("perl-encode-locale" ,perl-encode-locale)
2266 ("perl-html-parser" ,perl-html-parser)
2267 ("perl-http-date" ,perl-http-date)
2268 ("perl-http-message" ,perl-http-message)
2269 ("perl-libwww" ,perl-libwww)
2270 ("perl-try-tiny" ,perl-try-tiny)
2271 ("perl-uri" ,perl-uri)))
2272 (home-page "https://myrepos.branchable.com/")
2273 (synopsis "Multiple repository management tool")
2275 "Myrepos provides the @code{mr} command, which maps an operation (e.g.,
2276 fetching updates) over a collection of version control repositories. It
2277 supports a large number of version control systems: Git, Subversion,
2278 Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
2279 (license license:gpl2+)))
2281 (define-public grokmirror
2289 (url (string-append "https://git.kernel.org/pub/scm/"
2290 "utils/grokmirror/grokmirror.git"))
2291 (commit (string-append "v" version))))
2292 (file-name (string-append name "-" version "-checkout"))
2294 (base32 "006ar3kc6fw1sq300ar9np4a63qzzsdama6cv30wh65v5mqw1mnv"))))
2295 (build-system python-build-system)
2297 `(#:tests? #f ; no test suite
2299 (modify-phases %standard-phases
2300 (add-after 'install 'install-manpages
2301 (lambda* (#:key outputs #:allow-other-keys)
2302 (let* ((man (string-append (assoc-ref outputs "out")
2305 (for-each (lambda (file) (install-file file man))
2306 (find-files "." "\\.1$")))
2309 `(("python-packaging" ,python-packaging)
2310 ("python-requests" ,python-requests)))
2312 "https://git.kernel.org/pub/scm/utils/grokmirror/grokmirror.git")
2313 (synopsis "Framework to smartly mirror git repositories")
2314 (description "Grokmirror enables replicating large git repository
2315 collections efficiently. Mirrors decide to clone and update repositories
2316 based on a manifest file published by servers.")
2317 (license license:gpl3+)))
2326 (uri (pypi-uri "b4" version))
2328 (base32 "01qid6mvddikcdpf2ihsyn8x3z5j2n64g0ip9pqbx42hrc50pmcz"))))
2329 (build-system python-build-system)
2330 (arguments '(#:tests? #f)) ; No tests.
2332 `(("python-dkimpy" ,python-dkimpy)
2333 ("python-dnspython" ,python-dnspython)
2334 ("python-requests" ,python-requests)))
2335 (home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git")
2336 (synopsis "Tool for working with patches in public-inbox archives")
2338 "The @code{b4} command is designed to make it easier to participate in
2339 patch-based workflows for projects that have public-inbox archives.
2343 @item downloading a thread's mbox given a message ID
2344 @item processing an mbox so that is ready to be fed to @code{git-am}
2345 @item creating templated replies for processed patches and pull requests
2346 @item submitting cryptographic attestation for patches.
2348 (license license:gpl2+)))
2350 (define-public git-annex-remote-rclone
2352 (name "git-annex-remote-rclone")
2358 (url "https://github.com/DanielDent/git-annex-remote-rclone")
2359 (commit (string-append "v" version))))
2360 (file-name (git-file-name name version))
2363 "0j0hlxji8d974fq7zd4xc02n0jpi31ylhxc7z4zp8iiwad5mkpxp"))))
2364 (build-system trivial-build-system)
2366 `(#:modules ((guix build utils))
2369 (use-modules (guix build utils))
2370 (let ((bash (string-append (assoc-ref %build-inputs "bash")
2372 (rclone (string-append (assoc-ref %build-inputs "rclone")
2374 (copy-file (string-append (assoc-ref %build-inputs "source")
2375 "/git-annex-remote-rclone")
2376 "git-annex-remote-rclone")
2377 (substitute* "git-annex-remote-rclone"
2378 (("/bin/bash") bash)
2379 (("runcmd rclone") (string-append "runcmd " rclone)))
2380 (install-file "git-annex-remote-rclone"
2381 (string-append %output "/bin"))
2385 ("rclone" ,rclone)))
2386 (home-page "https://github.com/DanielDent/git-annex-remote-rclone")
2387 (synopsis "Use rclone-supported cloud storage providers with git-annex")
2388 (description "This wrapper around rclone makes any destination supported
2389 by rclone usable with git-annex.")
2390 (license license:gpl3+)))
2392 (define-public fossil
2400 "https://www.fossil-scm.org/index.html/uv/"
2401 "fossil-src-" version ".tar.gz"))
2403 (base32 "0c9nzx42wxfmym9vf1pnbdb1c7gp7a7zqky60izxsph7w2xh8nix"))
2404 (modules '((guix build utils)))
2407 (delete-file-recursively "compat") #t))))
2408 (build-system gnu-build-system)
2410 `(("tcl" ,tcl) ;for configuration only
2411 ("which" ,which) ;for tests only
2414 `(("openssl" ,openssl)
2416 ("sqlite" ,sqlite)))
2418 `(#:configure-flags (list "--with-openssl=auto"
2419 "--disable-internal-sqlite")
2420 #:test-target "test"
2421 #:phases (modify-phases %standard-phases
2422 (add-after 'patch-source-shebangs 'patch-sh
2424 (substitute* '("auto.def")
2425 (("/bin/sh") (which "sh")))
2428 (lambda* (#:key outputs (configure-flags '())
2430 ;; The 'configure' script is not an autoconf script and
2431 ;; chokes on unrecognized options.
2434 (string-append "--prefix="
2435 (assoc-ref outputs "out"))
2438 (add-before 'check 'test-setup
2440 (setenv "USER" "guix")
2443 (home-page "https://fossil-scm.org")
2444 (synopsis "Software configuration management system")
2446 "Fossil is a distributed source control management system which supports
2447 access and administration over HTTP CGI or via a built-in HTTP server. It has
2448 a built-in wiki, built-in file browsing, built-in tickets system, etc.")
2449 (license (list license:public-domain ;src/miniz.c, src/shell.c
2452 (define-public stagit
2458 (uri (string-append "https://dl.2f30.org/releases/"
2459 name "-" version ".tar.gz"))
2462 "1m3s9g1z9szbjrhm8sic91xh6f2bfpi56rskdkqd5wc4wdycpyi5"))))
2463 (build-system gnu-build-system)
2465 `(#:tests? #f ; No tests
2466 #:make-flags (list "CC=gcc"
2467 (string-append "PREFIX=" %output))
2469 (modify-phases %standard-phases
2470 (delete 'configure)))) ; No configure script
2472 `(("libgit2" ,libgit2)))
2473 (home-page "https://2f30.org/")
2474 (synopsis "Static git page generator")
2475 (description "Stagit creates static pages for git repositories, the results can
2476 be served with a HTTP file server of your choice.")
2477 (license license:expat)))
2479 (define-public gource
2486 "https://github.com/acaudwell/Gource/releases/download"
2487 "/gource-" version "/gource-" version ".tar.gz"))
2490 "16p7b1x4r0915w883lp374jcdqqja37fnb7m8vnsfnl2n64gi8qr"))))
2491 (build-system gnu-build-system)
2494 (list (string-append "--with-boost-libdir="
2495 (assoc-ref %build-inputs "boost")
2498 `(("pkg-config" ,pkg-config)))
2508 ("sdl-union" ,(sdl-union (list sdl2 sdl2-image)))))
2509 (home-page "https://gource.io/")
2510 (synopsis "3D visualisation tool for source control repositories")
2511 (description "@code{gource} provides a software version control
2512 visualization. The repository is displayed as a tree where the root of the
2513 repository is the centre, directories are branches and files are leaves.
2514 Contributors to the source code appear and disappear as they contribute to
2515 specific files and directories.")
2516 (license license:gpl3+)))
2525 "http://www.catb.org/~esr/src/src-" version ".tar.gz"))
2528 "0n0skhvya8w2az45h2gsafxy8m2mvqas64nrgxifcmrzfv0rf26c"))))
2529 (build-system gnu-build-system)
2532 (list (string-append "prefix=" (assoc-ref %outputs "out")))
2534 (modify-phases %standard-phases
2535 (delete 'configure) ; no 'configure' script
2536 (add-after 'install 'wrap-program
2537 (lambda* (#:key inputs outputs #:allow-other-keys)
2538 (let* ((out (assoc-ref outputs "out"))
2539 (prog (string-append out "/bin/src"))
2540 (rcs (assoc-ref inputs "rcs")))
2542 `("PATH" ":" prefix (,(string-append rcs "/bin"))))
2546 (setenv "HOME" (getenv "TMPDIR"))
2547 (invoke "git" "config" "--global" "user.name" "guix")
2548 (invoke "git" "config" "--global" "user.email" "guix")
2549 (invoke "./srctest"))))))
2555 `(("python" ,python-wrapper)
2557 (synopsis "Simple revision control")
2558 (home-page "http://www.catb.org/~esr/src/")
2560 "SRC (or src) is simple revision control, a version-control system for
2561 single-file projects by solo developers and authors. It modernizes the
2562 venerable RCS, hence the anagrammatic acronym. The design is tuned for use
2563 cases like all those little scripts in your @file{~/bin} directory, or a
2564 directory full of HOWTOs.")
2565 (license license:bsd-2)))
2567 (define-public git-when-merged
2568 ;; Use an unreleased version to get a PY3 compatibility fix.
2569 (let ((commit "ab6af7865a0ba55ba364a6c507e0be6f84f31c6d"))
2571 (name "git-when-merged")
2572 (version (string-append "1.2.0-" (string-take commit 7)))
2576 (url "https://github.com/mhagger/git-when-merged/")
2578 (file-name (git-file-name name version))
2581 "0iyk2psf97bc9h43m89p3xjmm79fsx99i7px29g4lcnmdy5kmz0p"))))
2582 (build-system gnu-build-system)
2584 `(#:tests? #f ; there are no tests
2586 (modify-phases %standard-phases
2590 (lambda* (#:key outputs #:allow-other-keys)
2591 (install-file "bin/git-when-merged"
2592 (string-append (assoc-ref outputs "out")
2595 (add-before 'install 'patch-git
2596 (lambda* (#:key inputs #:allow-other-keys)
2597 (let ((git (string-append (assoc-ref inputs "git")
2599 (substitute* "bin/git-when-merged"
2600 (("'git'") (string-append "'" git "'")))
2602 (add-after 'install 'wrap-script
2603 (lambda* (#:key outputs #:allow-other-keys)
2604 (wrap-program (string-append (assoc-ref outputs "out")
2605 "/bin/git-when-merged")
2606 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2610 ("python" ,python-wrapper)))
2611 (home-page "https://github.com/mhagger/git-when-merged")
2612 (synopsis "Determine when a commit was merged into a Git branch")
2613 (description "This Git extension defines a subcommand,
2614 @code{when-merged}, whose core operation is to find the merge that brought a
2615 given commit into the specified ref(s). It has various options that control
2616 how information about the merge is displayed.")
2617 (license license:gpl2+))))
2619 (define-public git-imerge
2627 (url "https://github.com/mhagger/git-imerge")
2628 (commit (string-append "v" version))))
2629 (file-name (git-file-name name version))
2631 (base32 "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4"))))
2632 (build-system gnu-build-system)
2634 `(#:tests? #f ; only manual test scripts
2635 #:make-flags (list (string-append "DESTDIR=" %output)
2638 (modify-phases %standard-phases
2640 (add-before 'install 'patch-git
2641 (lambda* (#:key inputs #:allow-other-keys)
2642 (let ((git (string-append (assoc-ref inputs "git")
2644 (substitute* "git-imerge"
2645 (("'git'") (string-append "'" git "'")))
2647 (add-after 'install 'wrap-script
2648 (lambda* (#:key outputs #:allow-other-keys)
2649 (wrap-program (string-append (assoc-ref outputs "out")
2651 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2655 ("python" ,python-wrapper)))
2656 (home-page "https://github.com/mhagger/git-imerge")
2657 (synopsis "Incremental merge for Git")
2658 (description "This Git extension defines a subcommand, @code{imerge},
2659 which performs an incremental merge between two branches. Its two primary
2660 design goals are to reduce the pain of resolving merge conflicts by finding
2661 the smallest possible conflicts and to allow a merge to be saved, tested,
2662 interrupted, published, and collaborated on while in progress.")
2663 (license license:gpl2+)))
2665 (define-public git-lfs
2672 (url "https://github.com/git-lfs/git-lfs")
2673 (commit (string-append "v" version))))
2674 (file-name (git-file-name name version))
2677 "05qd96bn2cl7gn5qarbcv6scdpj28qiwdfzalamqk5jjiidpmng5"))))
2678 (build-system go-build-system)
2680 `(#:import-path "github.com/git-lfs/git-lfs"
2681 #:install-source? #f
2683 (modify-phases %standard-phases
2684 (add-before 'build 'man-gen
2685 ;; Without this, the binary generated in 'build
2686 ;; phase won't have any embedded usage-text.
2688 (with-directory-excursion "src/github.com/git-lfs/git-lfs"
2689 (invoke "make" "mangen"))))
2690 (add-after 'build 'build-man-pages
2692 (with-directory-excursion "src/github.com/git-lfs/git-lfs"
2693 (invoke "make" "man"))
2695 (add-after 'install 'install-man-pages
2697 (with-directory-excursion "src/github.com/git-lfs/git-lfs/man"
2698 (let ((out (assoc-ref %outputs "out")))
2701 (install-file manpage (string-append out "/share/man/man1")))
2702 (find-files "." "^git-lfs.*\\.1$"))))
2704 ;; make `ronn` available during build for man page generation
2705 (native-inputs `(("ronn-ng" ,ronn-ng)))
2706 (home-page "https://git-lfs.github.com/")
2707 (synopsis "Git extension for versioning large files")
2709 "Git Large File Storage (LFS) replaces large files such as audio samples,
2710 videos, datasets, and graphics with text pointers inside Git, while storing the
2711 file contents on a remote server.")
2712 (license license:expat)))
2714 (define-public git-open
2722 (url "https://github.com/paulirish/git-open")
2723 (commit (string-append "v" version))))
2724 (file-name (git-file-name name version))
2726 (base32 "11n46bngvca5wbdbfcxzjhjbfdbad7sgf7h9gf956cb1q8swsdm0"))))
2727 (build-system copy-build-system)
2729 `(("xdg-utils" ,xdg-utils)))
2732 (modify-phases %standard-phases
2733 (add-after 'install 'wrap-program
2734 (lambda* (#:key outputs inputs #:allow-other-keys)
2735 (let ((out (assoc-ref outputs "out"))
2736 (xdg-utils (assoc-ref inputs "xdg-utils")))
2737 (wrap-program (string-append out "/bin/git-open")
2738 `("PATH" ":" prefix (,(string-append xdg-utils "/bin"))))))))
2740 '(("git-open" "bin/git-open"))))
2741 (home-page "https://github.com/paulirish/git-open")
2742 (synopsis "Open a Git repository's homepage from the command-line")
2744 "@code{git open} opens the repository's website from the command-line,
2745 guessing the URL pattern from the @code{origin} remote.")
2746 (license license:expat)))
2754 (uri (string-append "https://ftp.gnu.org/old-gnu/gnu-arch/"
2755 "tla-" version ".tar.gz"))
2758 "01mfzj1i6p4s8191cgd5850hds1zls88hkf9rb6qx1vqjv585aj0"))
2759 (modules '((guix build utils)))
2762 ;; In tar 1.32, '--preserve' is ambiguous and leads to an
2763 ;; error, so address that.
2764 (substitute* "src/tla/libarch/archive.c"
2766 "\"--preserve-permissions\""))
2768 (build-system gnu-build-system)
2770 '(#:phases (modify-phases %standard-phases
2772 (lambda* (#:key inputs outputs #:allow-other-keys)
2773 (let ((out (assoc-ref outputs "out")))
2779 ;; For libneon's 'configure' script.
2780 ;; XXX: There's a bundled copy of neon.
2781 (setenv "CONFIG_SHELL" (which "sh"))
2783 (invoke "../configure" "--prefix" out
2784 "--config-shell" (which "sh")
2785 "--with-posix-shell" (which "sh")
2786 "--with-cc" "gcc")))))
2789 ;; There are build failures when building in parallel.
2790 #:parallel-build? #f
2791 #:parallel-tests? #f
2793 #:test-target "test"))
2795 `(("which" ,which)))
2796 (synopsis "Historical distributed version-control system")
2798 "GNU Arch, aka. @code{tla}, was one of the first free distributed
2799 version-control systems (DVCS). It saw its last release in 2006. This
2800 package is provided for users who need to recover @code{tla} repositories and
2802 (home-page "https://www.gnu.org/software/gnu-arch/")
2803 (license license:gpl2))) ;version 2 only
2805 (define-public diff-so-fancy
2807 (name "diff-so-fancy")
2812 (url "https://github.com/so-fancy/diff-so-fancy")
2813 (commit (string-append "v" version))))
2814 (file-name (git-file-name name version))
2817 "0aavxahzha2mms4vdwysk79pa6wzswpfwgsq2hwaxnaf66maahfl"))))
2820 ("ncurses" ,ncurses)))
2821 (build-system copy-build-system)
2824 (modify-phases %standard-phases
2825 (add-after 'unpack 'patch-lib-path
2826 (lambda* (#:key outputs #:allow-other-keys)
2827 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2828 (substitute* "diff-so-fancy"
2830 (string-append "use lib '" lib "';\n")))
2832 (add-after 'install 'symlink-executable
2833 (lambda* (#:key outputs inputs #:allow-other-keys)
2834 (let ((out (assoc-ref outputs "out"))
2835 (ncurses (assoc-ref inputs "ncurses"))
2836 (perl (assoc-ref inputs "perl")))
2837 (wrap-program (string-append out "/bin/diff-so-fancy")
2838 `("PATH" ":" prefix (,(string-append ncurses "/bin")
2839 ,(string-append perl "/bin"))))
2843 ("diff-so-fancy" "bin/"))))
2844 (home-page "https://github.com/so-fancy/diff-so-fancy")
2845 (synopsis "Makes diffs more human friendly and readable")
2847 "@code{diff-so-fancy} strives to make your diffs human readable instead
2848 of machine readable. This helps improve code quality and helps you spot
2850 (license license:expat)))
2852 (define-public go-github-go-git
2854 (name "go-github-go-git")
2859 (url "https://github.com/go-git/go-git")
2860 (commit (string-append "v" version))))
2861 (file-name (git-file-name name version))
2864 "1vkcmhh2qq8c38sjbnzf0wvg2rzr19wssaq177bsvrjwj1xz1qbs"))))
2865 (build-system go-build-system)
2867 `(#:tests? #f ;requires network connection
2868 #:import-path "github.com/go-git/go-git/v5"
2870 (modify-phases %standard-phases
2871 (add-before 'build 'setup
2872 (lambda* (#:key inputs #:allow-other-keys)
2873 (let* ((git (assoc-ref inputs "git"))
2874 (git-bin (string-append (assoc-ref inputs "git") "/bin"))
2875 (git-exe (string-append git-bin "/git")))
2876 (setenv "GIT_DIST_PATH=" git)
2877 (setenv "GIT_EXEC_PATH=" git-bin)
2878 (setenv "HOME" (getcwd))
2879 (invoke git-exe "config" "--global" "user.email" "gha@example.com")
2880 (invoke git-exe "config" "--global" "user.name" "GitHub Actions")
2884 `(("go-github-com-emirpasic-gods" ,go-github-com-emirpasic-gods)
2885 ("go-github-com-go-git-gcfg" ,go-github-com-go-git-gcfg)
2886 ("go-github-com-go-git-go-billy" ,go-github-com-go-git-go-billy)
2887 ("go-github-com-imdario-mergo" ,go-github-com-imdario-mergo)
2888 ("go-github-com-jbenet-go-context" ,go-github-com-jbenet-go-context)
2889 ("go-github-com-kevinburke-ssh-config" ,go-github-com-kevinburke-ssh-config)
2890 ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
2891 ("go-github-com-sergi-go-diff" ,go-github-com-sergi-go-diff)
2892 ("go-github-com-xanzy-ssh-agentf" ,go-github-com-xanzy-ssh-agent)
2893 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
2894 ("go-golang-org-x-net" ,go-golang-org-x-net)
2895 ("go-gopkg-in-warnings" ,go-gopkg-in-warnings)
2896 ("go-github-com-go-git-go-git-fixtures" ,go-github-com-go-git-go-git-fixtures)
2897 ("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)
2898 ("go-github-com-alcortesm-tgz" ,go-github-com-alcortesm-tgz)
2899 ("go-golang-org-x-text" ,go-golang-org-x-text)
2901 (home-page "https://github.com/go-git/")
2902 (synopsis "Git implementation library")
2903 (description "This package provides a Git implementation library.")
2904 (license license:asl2.0)))
2907 (let ((commit "62eb3d69874f75bdd6f95743e57315bc59890f70")
2911 (version (git-version "0.10.10" revision commit))
2915 (url "https://github.com/nosarthur/gita")
2917 (file-name (git-file-name name version))
2920 "1jn5wnmjbdrrgz9fif7s81pv3g92q0wjcqy5qxl77kjy7iv0kpfp"))))
2921 (build-system python-build-system)
2923 `(("git" ,git) ;for tests
2924 ("python-pytest" ,python-pytest)))
2926 `(("python-pyyaml" ,python-pyyaml)))
2929 (modify-phases %standard-phases
2931 (lambda* (#:key inputs outputs #:allow-other-keys)
2932 (substitute* "tests/test_main.py"
2933 (("'gita\\\\n'") "'source\\n'")
2934 (("'gita'") "'source'"))
2935 (invoke (string-append (assoc-ref inputs "git") "/bin/git")
2937 (add-installed-pythonpath inputs outputs)
2938 (invoke (string-append (assoc-ref inputs "python-pytest")
2941 (add-after 'install 'install-shell-completions
2942 (lambda* (#:key outputs #:allow-other-keys)
2943 (let* ((out (assoc-ref outputs "out"))
2944 (bash-completion (string-append out "/etc/bash_completion.d"))
2945 (zsh-completion (string-append out "/etc/zsh/site-functions")))
2946 (mkdir-p bash-completion)
2947 (copy-file ".gita-completion.bash"
2948 (string-append bash-completion "/gita"))
2949 (mkdir-p zsh-completion)
2950 (copy-file ".gita-completion.zsh"
2951 (string-append zsh-completion "/_gita"))))))))
2952 (home-page "https://github.com/nosarthur/gita")
2953 (synopsis "Command-line tool to manage multiple Git repos")
2954 (description "This package provides a command-line tool to manage
2957 This tool does two things:
2959 @item display the status of multiple Git repos such as branch, modification,
2960 commit message side by side
2961 @item (batch) delegate Git commands/aliases from any working directory
2964 If several repos are related, it helps to see their status together.")
2965 (license license:expat))))