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>
36 ;;; This file is part of GNU Guix.
38 ;;; GNU Guix is free software; you can redistribute it and/or modify it
39 ;;; under the terms of the GNU General Public License as published by
40 ;;; the Free Software Foundation; either version 3 of the License, or (at
41 ;;; your option) any later version.
43 ;;; GNU Guix is distributed in the hope that it will be useful, but
44 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
45 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46 ;;; GNU General Public License for more details.
48 ;;; You should have received a copy of the GNU General Public License
49 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51 (define-module (gnu packages version-control)
52 #:use-module ((guix licenses) #:prefix license:)
53 #:use-module (guix utils)
54 #:use-module (guix packages)
55 #:use-module (guix download)
56 #:use-module (guix git-download)
57 #:use-module (guix hg-download)
58 #:use-module (guix build-system cmake)
59 #:use-module (guix build-system copy)
60 #:use-module (guix build-system gnu)
61 #:use-module (guix build-system go)
62 #:use-module (guix build-system perl)
63 #:use-module (guix build-system python)
64 #:use-module (guix build-system trivial)
65 #:use-module (gnu packages apr)
66 #:use-module (gnu packages autotools)
67 #:use-module (gnu packages documentation)
68 #:use-module (gnu packages base)
69 #:use-module (gnu packages bash)
70 #:use-module (gnu packages bison)
71 #:use-module (gnu packages boost)
72 #:use-module (gnu packages check)
73 #:use-module (gnu packages cook)
74 #:use-module (gnu packages curl)
75 #:use-module (gnu packages docbook)
76 #:use-module (gnu packages ed)
77 #:use-module (gnu packages file)
78 #:use-module (gnu packages flex)
79 #:use-module (gnu packages freedesktop)
80 #:use-module (gnu packages gettext)
81 #:use-module (gnu packages gl)
82 #:use-module (gnu packages golang)
83 #:use-module (gnu packages groff)
84 #:use-module (gnu packages guile)
85 #:use-module (gnu packages image)
86 #:use-module (gnu packages linux)
87 #:use-module (gnu packages mail)
88 #:use-module (gnu packages maths)
89 #:use-module (gnu packages nano)
90 #:use-module (gnu packages ncurses)
91 #:use-module (gnu packages ssh)
92 #:use-module (gnu packages web)
93 #:use-module (gnu packages openstack)
94 #:use-module (gnu packages pcre)
95 #:use-module (gnu packages perl)
96 #:use-module (gnu packages perl-check)
97 #:use-module (gnu packages pkg-config)
98 #:use-module (gnu packages python)
99 #:use-module (gnu packages python-check)
100 #:use-module (gnu packages python-web)
101 #:use-module (gnu packages python-xyz)
102 #:use-module (gnu packages readline)
103 #:use-module (gnu packages rsync)
104 #:use-module (gnu packages sqlite)
105 #:use-module (gnu packages admin)
106 #:use-module (gnu packages xml)
107 #:use-module (gnu packages emacs)
108 #:use-module (gnu packages compression)
109 #:use-module (gnu packages sdl)
110 #:use-module (gnu packages swig)
111 #:use-module (gnu packages sync)
112 #:use-module (gnu packages tcl)
113 #:use-module (gnu packages textutils)
114 #:use-module (gnu packages time)
115 #:use-module (gnu packages tls)
116 #:use-module (gnu packages)
117 #:use-module (ice-9 match)
118 #:use-module (srfi srfi-1))
120 (define-public bazaar
127 (uri (string-append "https://launchpad.net/bzr/"
128 (version-major+minor version) "/" version
129 "/+download/bzr-" version ".tar.gz"))
130 (patches (search-patches "bazaar-CVE-2017-14176.patch"))
133 "1cysix5k3wa6y7jjck3ckq3abls4gvz570s0v0hxv805nwki4i8d"))))
134 (build-system python-build-system)
136 ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh'
138 `(("gettext" ,gettext-minimal)))
140 `(#:tests? #f ; no test target
141 #:python ,python-2 ; Python 3 apparently not yet supported, see
142 ; https://answers.launchpad.net/bzr/+question/229048
144 (modify-phases %standard-phases
145 (add-after 'unpack 'fix-mandir
147 (substitute* "setup.py"
148 (("man/man1") "share/man/man1"))
150 (home-page "https://gnu.org/software/bazaar")
151 (synopsis "Version control system supporting both distributed and centralized workflows")
153 "GNU Bazaar is a version control system that allows you to record
154 changes to project files over time. It supports both a distributed workflow
155 as well as the classic centralized workflow.")
156 (license license:gpl2+)))
158 (define git-cross-configure-flags
159 '("ac_cv_fread_reads_directories=yes"
160 "ac_cv_snprintf_returns_bogus=no"
161 "ac_cv_iconv_omits_bom=no"))
169 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
173 "1h87yv117ypnc0yi86941089c14n91gixk8b6shj2y35prp47z7j"))))
174 (build-system gnu-build-system)
176 `(("native-perl" ,perl)
177 ;; Add bash-minimal explicitly to ensure it comes before bash-for-tests,
178 ;; see <https://bugs.gnu.org/39513>.
179 ("bash" ,bash-minimal)
180 ("bash-for-tests" ,bash)
181 ("gettext" ,gettext-minimal)
186 "mirror://kernel.org/software/scm/git/git-manpages-"
190 "14npkg9rnp2yclsx5p622qpm6byzfy5k5wb209vkmm5r60m4mm72"))))
191 ;; For subtree documentation.
192 ("asciidoc" ,asciidoc-py3)
193 ("docbook-xsl" ,docbook-xsl)
200 ("python" ,python) ; for git-p4
203 ;; For PCRE support in git grep (USE_LIBPCRE2).
207 ("perl-cgi" ,perl-cgi)
210 ("subversion" ,subversion)
211 ("perl-term-readkey" ,perl-term-readkey)
213 ;; For 'git-send-email'.
214 ("perl-authen-sasl" ,perl-authen-sasl)
215 ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
216 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
218 ;; For 'git gui', 'gitk', and 'git citool'.
221 (outputs '("out" ; the core
222 "send-email" ; for git-send-email
224 "credential-netrc" ; git-credential-netrc
225 "subtree" ; git-subtree
226 "gui")) ; gitk, git gui
228 `(#:make-flags `("V=1" ;more verbose compilation
230 ,(string-append "SHELL_PATH="
231 (assoc-ref %build-inputs "bash")
234 ;; Tests require a bash with completion support.
235 ,(string-append "TEST_SHELL_PATH="
236 (assoc-ref %build-inputs "bash-for-tests")
241 ;; By default 'make install' creates hard links for
242 ;; things in 'libexec/git-core', which leads to huge
243 ;; nars; see <https://bugs.gnu.org/21949>.
244 "NO_INSTALL_HARDLINKS=indeed")
246 ;; Make sure the full bash does not end up in the final closure.
247 #:disallowed-references (,bash)
251 ;; The explicit --with-tcltk forces the build system to hardcode the
252 ;; absolute file name to 'wish'.
253 #:configure-flags (list (string-append "--with-tcltk="
254 (assoc-ref %build-inputs "tk")
255 "/bin/wish8.6") ; XXX
256 ,@(if (%current-target-system)
257 git-cross-configure-flags
260 #:modules ((srfi srfi-1)
262 ,@%gnu-build-system-modules)
264 (modify-phases %standard-phases
265 ,@(if (%current-target-system)
266 ;; The git build system assumes build == host
267 `((add-after 'unpack 'use-host-uname_S
269 (substitute* "config.mak.uname"
270 (("uname_S := .*" all)
271 (if (equal? ,(%current-target-system) "i586-pc-gnu")
275 ;; We do not have bash-for-tests when cross-compiling.
276 `((add-after 'unpack 'modify-PATH
277 (lambda* (#:key inputs #:allow-other-keys)
278 (let ((path (string-split (getenv "PATH") #\:))
279 (bash-full (assoc-ref inputs "bash-for-tests")))
280 ;; Drop the test bash from PATH so that (which "sh") and
281 ;; similar does the right thing.
282 (setenv "PATH" (string-join
283 (remove (cut string-prefix? bash-full <>) path)
286 ;; Add cross curl-config script to PATH when cross-compiling.
287 ,@(if (%current-target-system)
288 '((add-before 'configure 'add-cross-curl-config
289 (lambda* (#:key inputs #:allow-other-keys)
291 (string-append (assoc-ref inputs "curl") "/bin:"
295 (add-after 'configure 'patch-makefiles
297 (substitute* "Makefile"
298 (("/usr/bin/perl") (which "perl"))
299 (("/usr/bin/python") (which "python3")))
301 (add-after 'configure 'add-PM.stamp
303 ;; Add the "PM.stamp" to avoid "no rule to make target".
304 (call-with-output-file "perl/PM.stamp" (const #t))
306 (add-after 'build 'build-subtree
307 (lambda* (#:key inputs #:allow-other-keys)
308 (with-directory-excursion "contrib/subtree"
309 (substitute* "Makefile"
310 ;; Apparently `xmlto' does not bother to looks up the stylesheets
311 ;; specified in the XML, unlike the above substitution. Instead it
312 ;; uses a hard-coded URL. Work around it here, but if this is
313 ;; common perhaps we should hardcode this path in xmlto itself.
314 (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
315 (string-append "$(XMLTO) -x "
316 (string-append (assoc-ref inputs "docbook-xsl")
317 "/xml/xsl/docbook-xsl-"
318 ,(package-version docbook-xsl))
319 "/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
321 (invoke "make" "install")
322 (invoke "make" "install-doc")
323 (substitute* "git-subtree"
324 (("/bin/sh") (which "sh"))))
326 (add-before 'check 'patch-tests
328 (let ((store-directory (%store-directory)))
329 ;; These files contain some funny bytes that Guile is unable
330 ;; to decode for shebang patching. Just delete them.
331 (for-each delete-file '("t/t4201-shortlog.sh"
332 "t/t7813-grep-icase-iso.sh"))
333 ;; Many tests contain inline shell scripts (hooks etc).
334 (substitute* (find-files "t" "\\.sh$")
335 (("#!/bin/sh") (string-append "#!" (which "sh"))))
336 ;; Un-do shebang patching here to prevent checksum mismatch.
337 (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
338 (("^#!.*/bin/perl") "#!/usr/bin/perl"))
339 (substitute* "t/t5003-archive-zip.sh"
340 (("cp /bin/sh") (string-append "cp " (which "sh"))))
341 (substitute* "t/t6030-bisect-porcelain.sh"
342 (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
343 ;; FIXME: This test runs `git commit` with a bogus EDITOR
344 ;; and empty commit message, but does not fail the way it's
345 ;; expected to. The test passes when invoked interactively.
346 (substitute* "t/t7508-status.sh"
347 (("\tcommit_template_commented") "\ttrue"))
348 ;; More checksum mismatches due to odd shebangs.
349 (substitute* "t/t9100-git-svn-basic.sh"
350 (((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") )
351 (substitute* "t/t9300-fast-import.sh"
352 (((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh")
353 (((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh"))
354 ;; FIXME: Some hooks fail with "basename: command not found".
355 ;; See 't/trash directory.t9164.../svn-hook.log'.
356 (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
358 ;; XXX: These tests fail intermittently for unknown reasons:
359 ;; <https://bugs.gnu.org/29546>.
360 (for-each delete-file
361 '("t/t9128-git-svn-cmd-branch.sh"
362 "t/t9167-git-svn-cmd-branch-subproject.sh"
363 "t/t9141-git-svn-multiple-branches.sh"))
365 (add-after 'install 'install-shell-completion
366 (lambda* (#:key outputs #:allow-other-keys)
367 (let* ((out (assoc-ref outputs "out"))
368 (completions (string-append out "/etc/bash_completion.d")))
369 ;; TODO: Install the tcsh and zsh completions in the right place.
370 (mkdir-p completions)
371 (copy-file "contrib/completion/git-completion.bash"
372 (string-append completions "/git"))
374 (add-after 'install 'install-credential-netrc
375 (lambda* (#:key outputs #:allow-other-keys)
376 (let* ((netrc (assoc-ref outputs "credential-netrc")))
377 (install-file "contrib/credential/netrc/git-credential-netrc.perl"
378 (string-append netrc "/bin"))
379 (rename-file (string-append netrc "/bin/git-credential-netrc.perl")
380 (string-append netrc "/bin/git-credential-netrc"))
381 ;; Previously, Git.pm was automatically found by netrc.
382 ;; Perl 5.26 changed how it locates modules so that @INC no
383 ;; longer includes the current working directory (the Perl
384 ;; community calls this "dotless @INC").
385 (wrap-program (string-append netrc "/bin/git-credential-netrc")
386 `("PERL5LIB" ":" prefix
387 (,(string-append (assoc-ref outputs "out") "/share/perl5"))))
389 (add-after 'install 'install-subtree
390 (lambda* (#:key outputs #:allow-other-keys)
391 (let ((subtree (assoc-ref outputs "subtree")))
392 (install-file "contrib/subtree/git-subtree"
393 (string-append subtree "/bin"))
394 (install-file "contrib/subtree/git-subtree.1"
395 (string-append subtree "/share/man/man1"))
397 (add-after 'install 'restore-sample-hooks-shebang
398 (lambda* (#:key outputs #:allow-other-keys)
399 (let* ((out (assoc-ref outputs "out"))
400 (dir (string-append out "/share/git-core/templates/hooks")))
401 (for-each (lambda (file)
402 (format #t "restoring shebang on `~a'~%" file)
404 (("^#!.*/bin/sh") "#!/bin/sh")))
405 (find-files dir ".*"))
407 (add-after 'install 'split
408 (lambda* (#:key inputs outputs #:allow-other-keys)
409 ;; Split the binaries to the various outputs.
410 (let* ((out (assoc-ref outputs "out"))
411 (se (assoc-ref outputs "send-email"))
412 (svn (assoc-ref outputs "svn"))
413 (gui (assoc-ref outputs "gui"))
414 (gitk (string-append out "/bin/gitk"))
415 (gitk* (string-append gui "/bin/gitk"))
416 (git-gui (string-append out "/libexec/git-core/git-gui"))
417 (git-gui* (string-append gui "/libexec/git-core/git-gui"))
418 (git-cit (string-append out "/libexec/git-core/git-citool"))
419 (git-cit* (string-append gui "/libexec/git-core/git-citool"))
420 (git-se (string-append out "/libexec/git-core/git-send-email"))
421 (git-se* (string-append se "/libexec/git-core/git-send-email"))
422 (git-svn (string-append out "/libexec/git-core/git-svn"))
423 (git-svn* (string-append svn "/libexec/git-core/git-svn"))
424 (git-sm (string-append out
425 "/libexec/git-core/git-submodule")))
426 (mkdir-p (string-append gui "/bin"))
427 (mkdir-p (string-append gui "/libexec/git-core"))
428 (mkdir-p (string-append se "/libexec/git-core"))
429 (mkdir-p (string-append svn "/libexec/git-core"))
431 (for-each (lambda (old new)
435 (list gitk git-gui git-cit git-se git-svn)
436 (list gitk* git-gui* git-cit* git-se* git-svn*))
438 ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
439 (wrap-program git-svn*
441 (,(string-append (assoc-ref inputs "subversion")
443 `("PERL5LIB" ":" prefix
444 ,(map (lambda (i) (string-append (assoc-ref inputs i)
445 "/lib/perl5/site_perl"))
446 '("subversion" "perl-term-readkey")))
448 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
449 ;; help it find 'libsvn_client-1.so'.
450 `("LD_LIBRARY_PATH" ":" prefix
451 (,(string-append (assoc-ref inputs "subversion")
454 ;; Tell 'git-send-email' where perl modules are.
455 (wrap-program git-se*
456 `("PERL5LIB" ":" prefix
457 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
459 ,@(transitive-input-references
462 (assoc l (package-inputs this-package)))
465 "perl-io-socket-ssl")))))))
467 ;; Tell 'gitweb.cgi' where perl modules are.
468 (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
469 `("PERL5LIB" ":" prefix
470 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
472 ,@(transitive-input-references
475 (assoc l (package-inputs this-package)))
478 ;; Tell 'git-submodule' where Perl is.
481 (,(string-append (assoc-ref inputs "perl")
485 (add-after 'split 'install-man-pages
486 (lambda* (#:key inputs outputs #:allow-other-keys)
487 (let* ((out (assoc-ref outputs "out"))
488 (man (string-append out "/share/man"))
489 (manpages (assoc-ref inputs "git-manpages")))
491 (with-directory-excursion man
492 (invoke "tar" "xvf" manpages))))))))
495 ;; For HTTPS access, Git needs a single-file certificate bundle, specified
496 ;; with $GIT_SSL_CAINFO.
497 (list (search-path-specification
498 (variable "GIT_SSL_CAINFO")
500 (separator #f) ;single entry
501 (files '("etc/ssl/certs/ca-certificates.crt")))
502 (search-path-specification
503 (variable "GIT_EXEC_PATH")
504 (separator #f) ;single entry
505 (files '("libexec/git-core")))))
507 (synopsis "Distributed version control system")
509 "Git is a free distributed version control system designed to handle
510 everything from small to very large projects with speed and efficiency.")
511 (license license:gpl2)
512 (home-page "https://git-scm.com/")))
514 (define-public git-minimal
515 ;; The size of the closure of 'git-minimal' is two thirds that of 'git'.
516 ;; Its test suite runs slightly faster and most importantly it doesn't
517 ;; depend on packages that are expensive to build such as Subversion.
522 (substitute-keyword-arguments (package-arguments git)
524 `(modify-phases ,phases
525 (replace 'patch-makefiles
527 (substitute* "Makefile"
528 (("/usr/bin/perl") (which "perl")))
530 (delete 'build-subtree)
532 (delete 'install-man-pages)
533 (delete 'install-subtree)
534 (delete 'install-credential-netrc)
535 (add-after 'install 'remove-unusable-perl-commands
536 (lambda* (#:key outputs #:allow-other-keys)
537 (let* ((out (assoc-ref outputs "out"))
538 (bin (string-append out "/bin"))
539 (libexec (string-append out "/libexec")))
540 (for-each (lambda (file)
541 (delete-file (string-append libexec
543 '("git-svn" "git-cvsimport" "git-archimport"
544 "git-cvsserver" "git-request-pull"
545 "git-add--interactive" "git-cvsexportcommit"
546 "git-instaweb" "git-send-email"))
547 (delete-file (string-append bin "/git-cvsserver"))
549 ;; These templates typically depend on Perl. Remove them.
550 (delete-file-recursively
551 (string-append out "/share/git-core/templates/hooks"))
553 ;; Gitweb depends on Perl as well.
554 (delete-file-recursively
555 (string-append out "/share/gitweb"))
557 ((#:make-flags flags)
558 `(delete "USE_LIBPCRE2=yes" ,flags))
559 ((#:configure-flags flags)
561 ,@(if (%current-target-system)
562 git-cross-configure-flags
564 ((#:disallowed-references lst '())
568 `(("bash" ,bash-minimal)
569 ("bash-for-tests" ,bash)
570 ("native-perl" ,perl)
571 ("gettext" ,gettext-minimal)))
573 `(("curl" ,curl) ;for HTTP(S) access
574 ("expat" ,expat) ;for 'git push' over HTTP(S)
579 (define-public gitless
585 ;; The PyPI package lacks a test suite. Build directly from git.
588 (url "https://github.com/gitless-vcs/gitless")
589 (commit (string-append "v" version))))
591 (base32 "048kl27zjr68hgs70g3l98ci9765wxva6azzrhcdys7nsdd493n6"))
592 (file-name (git-file-name name version))))
593 (build-system python-build-system)
596 (modify-phases %standard-phases
597 (add-before 'build 'loosen-requirements
599 (substitute* "setup.py"
600 ;; Using Guix's python-pygit2 1.1.0 appears to work fine…
601 (("pygit2==") "pygit2>="))
603 (add-before 'check 'prepare-for-tests
605 ;; Find the 'gl' command.
606 (rename-file "gl.py" "gl")
607 (setenv "PATH" (string-append (getcwd) ":" (getenv "PATH")))
609 ;; The tests try to run git as if it were already set up.
610 (setenv "HOME" (getcwd))
611 (invoke "git" "config" "--global" "user.email" "git@example.com")
612 (invoke "git" "config" "--global" "user.name" "Guix")))
614 (lambda* (#:key inputs outputs #:allow-other-keys)
615 (let ((out (assoc-ref outputs "out"))
616 (git (assoc-ref inputs "git")))
617 (wrap-program (string-append out "/bin/gl")
618 `("PATH" ":" prefix (,(string-append git "/bin")))
620 (,(string-append out "/lib/python"
621 ,(version-major+minor
622 (package-version python))
624 ,(getenv "PYTHONPATH"))))
627 `(("git-for-tests" ,git-minimal)))
629 `(("git" ,git-minimal)
630 ("python-clint" ,python-clint)
631 ("python-pygit2" ,python-pygit2)
632 ("python-sh" ,python-sh)))
633 (home-page "https://gitless.com")
634 (synopsis "Simple version control system built on top of Git")
636 "Gitless is a Git-compatible version control system that aims to be easy to
637 learn and use. It simplifies the common workflow by committing changes to
638 tracked files by default and saving any uncommitted changes as part of a branch.
640 The friendly @command{gl} command-line interface gives feedback and helps you
641 figure out what to do next.
643 Gitless is implemented on top of Git and its commits and repositories are
644 indistinguishable from Git's. You (or other contributors) can always fall back
645 on @command{git}, and use any regular Git hosting service.")
646 (license license:expat)))
648 (define-public git-cal
655 (url "https://github.com/k4rthik/git-cal")
656 (commit (string-append "v" version))))
657 (file-name (git-file-name name version))
660 "08s9sif3qlk5n2dqpzq5yjczggnqlnxldljspjdqgpfydb2dqg3z"))))
661 (build-system perl-build-system)
662 (home-page "https://github.com/k4rthik/git-cal/")
663 (synopsis "GitHub like contributions calendar for terminal")
664 (description "@code{git-cal} is a script to view commits calendar similar
665 to GitHub contributions calendar.")
666 (license license:expat)))
668 (define-public libgit2
674 (uri (string-append "https://github.com/libgit2/libgit2/"
675 "releases/download/v" version
676 "/libgit2-" version ".tar.gz"))
679 "1fjdglkh04qv3b4alg621pxa689i0wlf8m7nf2755zawjr2zhwxd"))
680 (patches (search-patches "libgit2-mtime-0.patch"))
682 (delete-file-recursively "deps") #t))
683 (modules '((guix build utils)))))
684 (build-system cmake-build-system)
685 (outputs '("out" "debug"))
688 (list "-DUSE_NTLMCLIENT=OFF" ;TODO: package this
689 "-DREGEX_BACKEND=pcre2"
690 "-DUSE_HTTP_PARSER=system"
691 ,@(if (%current-target-system)
693 "-DPKG_CONFIG_EXECUTABLE="
694 (assoc-ref %build-inputs "pkg-config")
695 "/bin/" ,(%current-target-system) "-pkg-config"))
698 (modify-phases %standard-phases
699 (add-after 'unpack 'fix-hardcoded-paths
701 (substitute* "tests/repo/init.c"
702 (("#!/bin/sh") (string-append "#!" (which "sh"))))
703 (substitute* "tests/clar/fs.h"
704 (("/bin/cp") (which "cp"))
705 (("/bin/rm") (which "rm")))
707 ;; Run checks more verbosely, unless we are cross-compiling.
709 (lambda* (#:key (tests? #t) #:allow-other-keys)
711 (invoke "./libgit2_clar" "-v" "-Q")
712 ;; Tests may be disabled if cross-compiling.
713 (format #t "Test suite not run.~%")))))))
715 `(("libssh2" ,libssh2)
716 ("http-parser" ,http-parser)))
718 `(("pkg-config" ,pkg-config)
721 ;; These libraries are in 'Requires.private' in libgit2.pc.
722 `(("openssl" ,openssl)
725 (home-page "https://libgit2.org/")
726 (synopsis "Library providing Git core methods")
728 "Libgit2 is a portable, pure C implementation of the Git core methods
729 provided as a re-entrant linkable library with a solid API, allowing you to
730 write native speed custom Git applications in any language with bindings.")
731 ;; GPLv2 with linking exception
732 (license license:gpl2)))
734 (define-public libgit2-0.28
741 (uri (string-append "https://github.com/libgit2/libgit2/releases/"
743 "/libgit2-" version ".tar.gz"))
746 "0hjgpqjjmkciw1i8jqkx9q2vhdc4fc99qajhrj2bq8ziwsp6hyrb"))
747 (patches (search-patches "libgit2-mtime-0.patch"))
748 (modules '((guix build utils)))
750 (delete-file-recursively "deps") #t))))))
752 (define-public git-crypt
760 (url "https://github.com/AGWA/git-crypt")
762 (file-name (git-file-name name version))
764 (base32 "1ba5s0fvmd9hhnfhfsjrm40v0qpxfnwc8vmm55m0k4dryzkzx66q"))))
765 (build-system gnu-build-system)
768 ("openssl" ,openssl)))
770 `(("docbook-xsl" ,docbook-xsl)
771 ("libxslt" ,libxslt)))
773 `(#:tests? #f ; No tests.
775 (modify-phases %standard-phases
777 (add-after 'unpack 'patch-makefile
778 (lambda* (#:key inputs #:allow-other-keys)
779 (substitute* "Makefile"
780 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
781 (string-append (assoc-ref inputs "docbook-xsl")
782 "/xml/xsl/docbook-xsl-"
783 ,(package-version docbook-xsl)
784 "/manpages/docbook.xsl")))
788 (invoke "make" "ENABLE_MAN=yes")))
790 (lambda* (#:key outputs #:allow-other-keys)
791 (let ((out (assoc-ref outputs "out")))
792 (invoke "make" "install"
794 (string-append "PREFIX=" out))))))))
795 (home-page "https://www.agwa.name/projects/git-crypt/")
796 (synopsis "Transparent encryption of files in a git repository")
797 (description "git-crypt enables transparent encryption and decryption of
798 files in a git repository. Files which you choose to protect are encrypted when
799 committed, and decrypted when checked out. git-crypt lets you freely share a
800 repository containing a mix of public and private content. git-crypt gracefully
801 degrades, so developers without the secret key can still clone and commit to a
802 repository with encrypted files. This lets you store your secret material (such
803 as keys or passwords) in the same repository as your code, without requiring you
804 to lock down your entire repository.")
805 (license license:gpl3+)))
807 (define-public git-remote-gcrypt
809 (name "git-remote-gcrypt")
814 (url "https://git.spwhitton.name/git-remote-gcrypt")
816 (file-name (string-append name "-" version "-checkout"))
819 "0n8fzvr6y0pxrbvkywlky2bd8jvi0ayp4n9hwi84l1ldmv4a40dh"))))
820 (build-system trivial-build-system)
822 `(#:modules ((guix build utils))
824 (use-modules (guix build utils))
825 (let* ((source (assoc-ref %build-inputs "source"))
826 (output (assoc-ref %outputs "out"))
827 (bindir (string-append output "/bin")))
828 (install-file (string-append source "/git-remote-gcrypt")
831 (home-page "https://spwhitton.name/tech/code/git-remote-gcrypt/")
832 (synopsis "Whole remote repository encryption")
833 (description "git-remote-gcrypt is a Git remote helper to push and pull from
834 repositories encrypted with GnuPG. It works with the standard Git transports,
835 including repository hosting services like GitLab.
837 Remote helper programs are invoked by Git to handle network transport. This
838 helper handles @code{gcrypt:} URLs that access a remote repository encrypted
839 with GPG, using our custom format.
841 Supported locations are local, @code{rsync://} and @code{sftp://}, where the
842 repository is stored as a set of files, or instead any Git URL where gcrypt
843 will store the same representation in a Git repository, bridged over arbitrary
846 The aim is to provide confidential, authenticated Git storage and
847 collaboration using typical untrusted file hosts or services.")
848 (license license:gpl3+)))
853 ;; Update the ‘git-source’ input as well.
858 "https://git.zx2c4.com/cgit/snapshot/cgit-"
862 "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss"))))
863 (build-system gnu-build-system)
865 '(#:tests? #f ; XXX: fail to build the in-source git.
867 #:make-flags '("CC=gcc" "SHELL_PATH=sh")
869 (modify-phases %standard-phases
870 (add-after 'unpack 'unpack-git
871 (lambda* (#:key inputs #:allow-other-keys)
872 ;; Unpack the source of git into the 'git' directory.
873 (invoke "tar" "--strip-components=1" "-C" "git" "-xf"
874 (assoc-ref inputs "git-source"))))
875 (add-after 'unpack 'patch-absolute-file-names
876 (lambda* (#:key inputs #:allow-other-keys)
877 (define (quoted-file-name input path)
878 (string-append "\"" input path "\""))
879 (substitute* "ui-snapshot.c"
881 (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
883 (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
885 (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
887 (substitute* "filters/about-formatting.sh"
888 (("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out")
889 "/lib/cgit/filters"))
890 (("\\| tr") (string-append "| " (which "tr"))))
892 (substitute* "filters/html-converters/txt2html"
893 (("sed") (which "sed")))
895 (substitute* "filters/html-converters/man2html"
896 (("groff") (which "groff")))
898 (substitute* "filters/html-converters/rst2html"
899 (("rst2html\\.py") (which "rst2html.py")))
902 (delete 'configure) ; no configure script
903 (add-after 'build 'build-man
904 (lambda* (#:key make-flags #:allow-other-keys)
905 (apply invoke "make" "doc-man" make-flags)))
907 (lambda* (#:key make-flags outputs #:allow-other-keys)
908 (let ((out (assoc-ref outputs "out")))
910 "make" "install" "install-man"
911 (string-append "prefix=" out)
912 (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
914 ;; Move the platform-dependent 'cgit.cgi' into lib to get it
916 (rename-file (string-append out "/share/cgit/cgit.cgi")
917 (string-append out "/lib/cgit/cgit.cgi"))
919 (add-after 'install 'wrap-python-scripts
920 (lambda* (#:key outputs #:allow-other-keys)
923 (wrap-program (string-append (assoc-ref outputs "out")
924 "/lib/cgit/filters/" file)
925 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
926 '("syntax-highlighting.py"
927 "html-converters/md2html"))
930 ;; For building manpage.
931 `(("asciidoc" ,asciidoc)
936 `(;; Building cgit requires a Git source tree.
940 ;; cgit is tightly bound to git. Use GIT_VER from the Makefile,
941 ;; which may not match the current (package-version git).
942 (uri "mirror://kernel.org/software/scm/git/git-2.25.4.tar.xz")
944 (base32 "11am6s46wmn1yll5614smjhzlghbqq6gysgcs64igjr9y5wzpdxq"))))
948 ("python-docutils" ,python-docutils)
949 ("python-markdown" ,python-markdown)
950 ("python-pygments" ,python-pygments)
952 (home-page "https://git.zx2c4.com/cgit/")
953 (synopsis "Web frontend for git repositories")
955 "CGit is an attempt to create a fast web interface for the Git SCM, using
956 a built-in cache to decrease server I/O pressure.")
957 (license license:gpl2)))
959 (define-public python-git-multimail
961 (name "python-git-multimail")
962 (version "1.5.0.post1")
966 (uri (pypi-uri "git-multimail" version))
969 "1zkrbsa70anwpw86ysfwalrb7nsr064kygfiyikyq1pl9pcl969y"))))
970 (build-system python-build-system)
973 (modify-phases %standard-phases
974 (add-after 'unpack 'patch
975 (lambda* (#:key inputs #:allow-other-keys)
976 (substitute* "git-multimail/git_multimail.py"
977 (("GIT_EXECUTABLE = 'git'")
978 (string-append "GIT_EXECUTABLE = '"
979 (assoc-ref inputs "git") "/bin/git"
981 (("/usr/sbin/sendmail")
982 (string-append (assoc-ref inputs "sendmail")
983 "/usr/sbin/sendmail")))
987 ("sendmail" ,sendmail)))
988 (home-page "https://github.com/git-multimail/git-multimail")
989 (synopsis "Send notification emails for Git pushes")
991 "This hook sends emails describing changes introduced by pushes to a Git
992 repository. For each reference that was changed, it emits one ReferenceChange
993 email summarizing how the reference was changed, followed by one Revision
994 email for each new commit that was introduced by the reference change.
996 This script is designed to be used as a post-receive hook in a Git
998 (license license:gpl2)))
1000 (define-public python-ghp-import
1002 (name "python-ghp-import")
1008 (url "https://github.com/davisp/ghp-import")
1010 (file-name (git-file-name name version))
1012 (base32 "12pmw3zz3i57ljnm0rxdyjqdyhisbvy18mjwkb3bzp5pgzs2f45c"))))
1013 (build-system python-build-system)
1015 `(#:phases (modify-phases %standard-phases
1016 (add-after 'install 'install-documentation
1017 (lambda* (#:key outputs #:allow-other-keys)
1018 (let* ((out (assoc-ref outputs "out"))
1019 (doc (string-append out "/share/doc"))
1020 (licenses (string-append out "/share/licenses")))
1021 (install-file "README.md" doc)
1022 (install-file "LICENSE" licenses)))))))
1023 (home-page "https://github.com/davisp/ghp-import")
1024 (synopsis "Copy directory to the gh-pages branch")
1025 (description "Script that copies a directory to the gh-pages branch (by
1026 default) of the repository.")
1028 ;; See <https://bugs.gnu.org/27913>.
1029 (license (license:non-copyleft
1030 "https://raw.githubusercontent.com/davisp/ghp-import/master/LICENSE"
1031 "Tumbolia Public License"))))
1033 (define-public python2-ghp-import
1034 (package-with-python2
1035 (strip-python2-variant python-ghp-import)))
1037 (define-public python-gitdb
1039 (name "python-gitdb")
1043 (uri (pypi-uri "gitdb" version))
1046 "0l113fphn6msjl3cl3kyf332b6lal7daxdd0nfma0x9ipfb013jr"))))
1047 (build-system python-build-system)
1049 `(#:phases (modify-phases %standard-phases
1050 (add-before 'check 'create-test-repository
1052 (mkdir "/tmp/testrepo")
1053 ;; Some tests require a git repository, so create one.
1054 (with-directory-excursion "/tmp/testrepo"
1055 (do ((filecount 1 (1+ filecount)))
1056 ((> filecount 1000))
1057 (call-with-output-file (string-append
1058 "file" (number->string filecount))
1060 (format port "~a" filecount))))
1062 (invoke "git" "init")
1063 (invoke "git" "config" "user.name" "Total Git")
1064 (invoke "git" "config" "user.email" "git@localhost")
1065 (invoke "git" "add" "-A")
1066 (invoke "git" "commit" "-q" "-m" "dummy commit")))
1068 ;; The repository checkout must be a "bare" clone.
1069 (invoke "git" "clone" "--bare" "/tmp/testrepo"
1070 "/tmp/testrepo.git")))
1073 (setenv "GITDB_TEST_GIT_REPO_BASE" "/tmp/testrepo.git")
1074 ;; Skip tests that must be run from the gitdb repository.
1075 (setenv "TRAVIS" "1")
1076 (invoke "nosetests" "-v"))))))
1078 `(("python-smmap" ,python-smmap)))
1081 ("python-nose" ,python-nose)))
1082 (home-page "https://github.com/gitpython-developers/gitdb")
1083 (synopsis "Python implementation of the Git object database")
1085 "GitDB allows you to access @dfn{bare} Git repositories for reading and
1086 writing. It aims at allowing full access to loose objects as well as packs
1087 with performance and scalability in mind. It operates exclusively on streams,
1088 allowing to handle large objects with a small memory footprint.")
1089 (license license:bsd-3)))
1091 (define-public python-gitpython
1093 (name "python-gitpython")
1097 (uri (pypi-uri "GitPython" version))
1100 "1jzllsy9lwc9yibccgv7h9naxisazx2n3zmpy21c8n5xhysw69p4"))))
1101 (build-system python-build-system)
1103 `(#:tests? #f ;XXX: Tests can only be run within the GitPython repository.
1104 #:phases (modify-phases %standard-phases
1105 (add-after 'unpack 'embed-git-reference
1106 (lambda* (#:key inputs #:allow-other-keys)
1107 (substitute* "git/cmd.py"
1108 (("git_exec_name = \"git\"")
1109 (string-append "git_exec_name = \""
1110 (assoc-ref inputs "git")
1116 `(("python-gitdb" ,python-gitdb)))
1118 `(("python-ddt" ,python-ddt)
1119 ("python-nose" ,python-nose)))
1120 (home-page "https://github.com/gitpython-developers/GitPython")
1121 (synopsis "Python library for interacting with Git repositories")
1123 "GitPython is a python library used to interact with Git repositories,
1124 high-level like git-porcelain, or low-level like git-plumbing.
1126 It provides abstractions of Git objects for easy access of repository data,
1127 and additionally allows you to access the Git repository more directly using
1128 either a pure Python implementation, or the faster, but more resource intensive
1129 @command{git} command implementation.")
1130 (license license:bsd-3)))
1132 (define-public shflags
1139 (url "https://github.com/kward/shflags")
1140 (commit (string-append "v" version))))
1141 (file-name (git-file-name name version))
1144 "1ydx0sb6vz9s2dgp5bd64y7fpzh9qvmlfjxrbmzac8saknijrlly"))))
1145 (build-system gnu-build-system)
1147 `(#:tests? #f ; no tests
1149 (modify-phases %standard-phases
1150 (delete 'configure) ; nothing to configure
1151 (delete 'build) ; nothing to build
1153 (lambda* (#:key outputs #:allow-other-keys)
1154 (let* ((out (assoc-ref outputs "out"))
1155 (src (string-append out "/src")))
1156 (install-file "shflags" src)
1158 (home-page "https://github.com/kward/shflags")
1159 (synopsis "Command-line flags library for shell scripts")
1161 "Shell Flags (shFlags) is a library written to greatly simplify the
1162 handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
1163 ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
1164 different versions of getopt on various OSes make writing portable shell
1165 scripts difficult. shFlags instead provides an API that doesn't change across
1166 shell and OS versions so the script writer can be confident that the script
1168 (license license:lgpl2.1)))
1170 (define-public git-flow
1173 ;; This version has not be officially released yet, so we build it
1174 ;; directly from the git repository.
1179 (url "https://github.com/petervanderdoes/gitflow-avh/")
1181 (file-name (git-file-name name version))
1184 "13q4mnrxr03wz2dkhzy73j384g299m4d545cnhxcaznvdwfany4h"))))
1185 (build-system gnu-build-system)
1186 (inputs `(("shflags" ,shflags)))
1188 '(#:tests? #f ; no tests
1189 #:make-flags (list (string-append "prefix="
1190 (assoc-ref %outputs "out")))
1192 (modify-phases %standard-phases
1193 (add-after 'unpack 'reset-shFlags-link
1194 (lambda* (#:key inputs #:allow-other-keys)
1195 ;; The link points to a file in the shFlags submodule.
1196 ;; Redirect it to point to our system shFlags.
1197 (let ((shflags (assoc-ref inputs "shflags")))
1199 (delete-file "gitflow-shFlags")
1200 (symlink (string-append shflags "/src/shflags")
1201 "gitflow-shFlags")))))
1204 (home-page "https://nvie.com/posts/a-successful-git-branching-model/")
1205 (synopsis "Git extensions for Vincent Driessen's branching model")
1207 "Vincent Driessen's branching model is a git branching and release
1208 management strategy that helps developers keep track of features, hotfixes,
1209 and releases in bigger software projects. The git-flow library of git
1210 subcommands helps automate some parts of the flow to make working with it a
1212 (license license:bsd-2)))
1214 (define-public stgit
1222 (url "https://github.com/ctmarinas/stgit")
1223 (commit (string-append "v" version))))
1224 (file-name (git-file-name name version))
1226 (base32 "0bgxgsd6nj6gkk74c56vrjsyr7j19jrj6cx2ma6f7b20wriznhd5"))))
1227 (build-system python-build-system)
1234 (modify-phases %standard-phases
1235 (add-after 'unpack 'hard-code-version
1237 ;; setup.py tries to cleverly extract the version number from the
1238 ;; git history, which the source checkout lacks. Hard-code one.
1239 (substitute* "setup.py"
1241 (format #f "'~a'" ,version)))
1243 (add-before 'check 'patch-tests
1245 (substitute* (list "t/t1900-mail.sh"
1246 "t/t7504-commit-msg-hook.sh")
1254 (string-append "SHELL_PATH=" (which "bash"))
1256 (home-page "https://stacked-git.github.io/")
1257 (synopsis "Stacked Git")
1259 "StGit is a command-line application that provides functionality similar
1260 to Quilt (i.e., pushing/popping patches to/from a stack), but using Git
1261 instead of @command{diff} and @command{patch}. StGit stores its patches in a
1262 Git repository as normal Git commits, and provides a number of commands to
1263 manipulate them in various ways.")
1264 (license license:gpl2)))
1269 (version "1.20151229")
1274 (url "https://github.com/RichiH/vcsh")
1275 (commit (string-append "v" version))))
1276 (file-name (git-file-name name version))
1278 (base32 "1grpj45nbpv4j60vd2kg4rj53zrm0bc0h9l4pfd3c2mwbvywm6ab"))))
1279 (build-system gnu-build-system)
1281 `(("which" ,which)))
1285 ("perl-test-harness" ,perl-test-harness)
1286 ("perl-shell-command" ,perl-shell-command)
1287 ("perl-test-most" ,perl-test-most)))
1289 '(#:phases (modify-phases %standard-phases
1292 #:make-flags (list (string-append "PREFIX="
1293 (assoc-ref %outputs "out")))
1294 #:test-target "test"))
1295 (home-page "https://github.com/RichiH/vcsh")
1296 (synopsis "Version control system for @code{$HOME}")
1298 "vcsh version-controls configuration files in several Git repositories,
1299 all in one single directory. They all maintain their working trees without
1300 clobbering each other or interfering otherwise. By default, all Git
1301 repositories maintained via vcsh store the actual files in @code{$HOME},
1302 though this can be overridden.")
1303 (license license:gpl2+)))
1305 (define-public git-test-sequence
1306 (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76"))
1308 (name "git-test-sequence")
1309 (version (string-append "20140312." (string-take commit 7)))
1313 ;; There are many other scripts in this directory; we
1314 ;; are interested in just one for this package.
1315 (url "https://github.com/dustin/bindir")
1317 (file-name (git-file-name name version))
1320 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
1321 (build-system trivial-build-system)
1323 `(#:modules ((guix build utils))
1325 (use-modules (guix build utils))
1326 (let* ((source (assoc-ref %build-inputs "source"))
1327 (output (assoc-ref %outputs "out"))
1328 (bindir (string-append output "/bin"))
1329 (script "git-test-sequence"))
1330 (install-file (string-append source "/" script)
1333 (home-page "https://dustin.sallings.org/2010/03/28/git-test-sequence.html")
1334 (synopsis "Run a command over a sequence of commits")
1336 "git-test-sequence is similar to an automated git bisect except it’s
1337 linear. It will test every change between two points in the DAG. It will
1338 also walk each side of a merge and test those changes individually.")
1339 (license (license:x11-style "file://LICENSE")))))
1341 (define-public gitolite
1349 (url "https://github.com/sitaramc/gitolite")
1350 (commit (string-append "v" version))))
1351 (file-name (git-file-name name version))
1353 (base32 "05xw1pmagvkrbzga5pgl3xk9qyc6b5x73f842454f3w9ijspa8zy"))))
1354 (build-system gnu-build-system)
1356 '(#:tests? #f ; no tests
1357 #:phases (modify-phases %standard-phases
1360 (add-before 'install 'patch-scripts
1361 (lambda* (#:key inputs #:allow-other-keys)
1362 (let ((perl (string-append (assoc-ref inputs "perl")
1364 ;; This seems to take care of every shell script that
1366 (substitute* (find-files "." ".*")
1368 (string-append " " perl " -")))
1370 (substitute* (find-files "src/triggers" ".*")
1372 (string-append " " (which "sed") " ")))
1375 '("src/triggers/post-compile/update-gitweb-access-list"
1376 "src/triggers/post-compile/ssh-authkeys-split"
1377 "src/triggers/upstream")
1379 (string-append " " (which "grep") " ")))
1381 ;; Avoid references to the store in authorized_keys.
1382 ;; This works because gitolite-shell is in the PATH.
1383 (substitute* "src/triggers/post-compile/ssh-authkeys"
1384 (("\\$glshell \\$user")
1385 "gitolite-shell $user"))
1387 (add-before 'install 'patch-source
1388 (lambda* (#:key inputs #:allow-other-keys)
1389 ;; Gitolite uses cat to test the readability of the
1391 (substitute* "src/lib/Gitolite/Setup.pm"
1393 (string-append "\"" (which "cat") " "))
1395 (string-append "\"" (which "ssh-keygen"))))
1397 (substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
1398 "src/lib/Gitolite/Hooks/Update.pm")
1400 (string-append (assoc-ref inputs "perl")
1403 (substitute* "src/lib/Gitolite/Common.pm"
1405 (string-append "\"" (which "ssh-keygen")))
1408 (assoc-ref inputs "inetutils")
1413 (lambda* (#:key outputs #:allow-other-keys)
1414 (let* ((output (assoc-ref outputs "out"))
1415 (sharedir (string-append output "/share/gitolite"))
1416 (bindir (string-append output "/bin")))
1419 (invoke "./install" "-to" sharedir)
1420 ;; Create symlinks for executable scripts in /bin.
1421 (for-each (lambda (script)
1422 (symlink (string-append sharedir "/" script)
1423 (string-append bindir "/" script)))
1424 '("gitolite" "gitolite-shell"))
1426 (add-after 'install 'wrap-scripts
1427 (lambda* (#:key inputs outputs #:allow-other-keys)
1428 (let ((out (assoc-ref outputs "out"))
1429 (coreutils (assoc-ref inputs "coreutils"))
1430 (findutils (assoc-ref inputs "findutils"))
1431 (git (assoc-ref inputs "git")))
1432 (wrap-program (string-append out "/bin/gitolite")
1435 (string-append dir "/bin"))
1436 (list out coreutils findutils git))))
1440 ("coreutils" ,coreutils)
1441 ("findutils" ,findutils)
1442 ("inetutils" ,inetutils)))
1443 ;; git and openssh are propagated because trying to patch the source via
1444 ;; regexp matching is too brittle and prone to false positives.
1447 ("openssh" ,openssh)))
1448 (home-page "https://gitolite.com")
1449 (synopsis "Git access control layer")
1451 "Gitolite is an access control layer on top of Git, providing fine access
1452 control to Git repositories.")
1453 (license license:gpl2)))
1455 (define-public pre-commit
1461 ;; No tests in the PyPI tarball.
1464 (url "https://github.com/pre-commit/pre-commit")
1465 (commit (string-append "v" version))))
1466 (file-name (git-file-name name version))
1468 (base32 "0b3ks6viccq3n4p8i8zgfd40vp1k5nkhmmlz7p4nxcdizw8zxgn8"))))
1469 (build-system python-build-system)
1472 (modify-phases %standard-phases
1473 (add-before 'check 'set-up-git
1475 ;; Change from /homeless-shelter to /tmp for write permission.
1476 (setenv "HOME" "/tmp")
1477 ;; Environment variables used in the tests.
1478 (setenv "GIT_AUTHOR_NAME" "Your Name")
1479 (setenv "GIT_COMMITTER_NAME" "Your Name")
1480 (setenv "GIT_AUTHOR_EMAIL" "you@example.com")
1481 (setenv "GIT_COMMITTER_EMAIL" "you@example.com")
1482 (invoke "git" "config" "--global" "user.name" "Your Name")
1483 (invoke "git" "config" "--global" "user.email" "you@example.com")
1486 (lambda* (#:key inputs outputs #:allow-other-keys)
1487 (add-installed-pythonpath inputs outputs)
1488 (invoke "pytest" "tests" "-k"
1490 ;; Disable conda tests.
1491 "not test_conda_hook"
1492 " and not test_conda_with_additional_dependencies_hook"
1493 " and not test_local_conda_additional_dependencies"
1494 ;; Disable cpan tests.
1495 " and not test_local_perl_additional_dependencies"
1496 " and not test_perl_hook"
1497 ;; Disable Ruby tests.
1498 " and not test_additional_ruby_dependencies_installed"
1499 " and not test_install_rbenv"
1500 " and not test_install_rbenv_with_version"
1501 " and not test_run_a_ruby_hook"
1502 " and not test_run_ruby_hook_with_disable_shared_gems"
1503 " and not test_run_versioned_ruby_hook"
1504 ;; Disable Cargo tests.
1505 " and not test_additional_rust_cli_dependencies_installed"
1506 " and not test_additional_rust_lib_dependencies_installed"
1507 " and not test_local_rust_additional_dependencies"
1508 " and not test_rust_hook"
1509 ;; Disable dotnet tests.
1510 " and not test_dotnet_hook"
1511 ;; Disable nodejs tests.
1512 " and not test_unhealthy_if_system_node_goes_missing"
1513 " and not test_installs_without_links_outside_env"
1514 " and not test_healthy_system_node"
1515 ;; Disable python2 test.
1516 " and not test_switch_language_versions_doesnt_clobber"
1517 ;; These tests try to open a network socket.
1518 " and not test_additional_golang_dependencies_installed"
1519 " and not test_additional_node_dependencies_installed"
1520 " and not test_golang_hook"
1521 " and not test_golang_hook_still_works_when_gobin_is_set"
1522 " and not test_local_golang_additional_dependencies"
1523 " and not test_main"
1524 " and not test_node_hook_with_npm_userconfig_set"
1525 " and not test_run_a_node_hook"
1526 " and not test_run_versioned_node_hook"
1527 ;; Tests failing with a permission error.
1528 ;; They try to write to the filesystem.
1529 " and not test_autoupdate_hook_disappearing_repo"
1530 " and not test_hook_disppearing_repo_raises"
1531 " and not test_img_conflict"
1532 " and not test_img_something_unstaged"
1533 " and not test_installed_from_venv"
1534 " and not test_too_new_version"
1535 " and not test_try_repo_uncommitted_changes"
1536 " and not test_versions_ok"
1537 ;; This test tries to activate a virtualenv.
1538 " and not test_healthy_venv_creator"
1539 ;; Fatal error: Not a Git repository.
1540 " and not test_all_cmds"
1541 " and not test_try_repo"
1542 ;; No module named 'pip._internal.cli.main'.
1543 " and not test_additional_dependencies_roll_forward"
1544 ;; Assertion errors.
1545 " and not test_install_existing_hooks_no_overwrite"
1546 " and not test_uninstall_restores_legacy_hooks"))))
1547 (add-before 'reset-gzip-timestamps 'make-files-writable
1548 (lambda* (#:key outputs #:allow-other-keys)
1549 ;; Make sure .gz files are writable so that the
1550 ;; 'reset-gzip-timestamps' phase can do its work.
1551 (let ((out (assoc-ref outputs "out")))
1552 (for-each make-file-writable
1553 (find-files out "\\.gz$"))
1556 `(("git" ,git-minimal)
1557 ("python-pytest" ,python-pytest)
1558 ("python-re-assert" ,python-re-assert)))
1559 ;; Propagate because pre-commit is also used as a module.
1561 `(("python-cfgv" ,python-cfgv)
1562 ("python-identify" ,python-identify)
1563 ("python-nodeenv" ,python-nodeenv)
1564 ("python-pyyaml" ,python-pyyaml)
1565 ("python-toml" ,python-toml)
1566 ("python-virtualenv" ,python-virtualenv)))
1567 (home-page "https://pre-commit.com/")
1568 (synopsis "Framework for managing and maintaining multi-language pre-commit hooks")
1570 "Pre-commit is a multi-language package manager for pre-commit hooks. You
1571 specify a list of hooks you want and pre-commit manages the installation and
1572 execution of any hook written in any language before every commit.")
1573 (license license:expat)))
1575 (define-public mercurial
1581 (uri (string-append "https://www.mercurial-scm.org/"
1582 "release/mercurial-" version ".tar.gz"))
1585 "0x08yjs26j88kh1bvl2g3r24lnfc023ry3i1cxfq6haray6sv5ag"))))
1586 (build-system python-build-system)
1589 (modify-phases %standard-phases
1590 (add-after 'unpack 'patch-tests
1592 (substitute* '("tests/test-extdiff.t"
1593 "tests/test-logtoprocess.t"
1594 "tests/test-patchbomb.t"
1595 "tests/test-run-tests.t"
1596 "tests/test-transplant.t")
1601 (lambda* (#:key tests? #:allow-other-keys)
1602 (with-directory-excursion "tests"
1603 ;; The following tests are known to fail.
1604 (for-each delete-file
1605 '(;; XXX: This test calls 'run-tests.py --with-hg=
1606 ;; `which hg`' and fails because there is no hg on
1607 ;; PATH from before (that's why we are building it!)?
1610 ;; FIXME: Why does this fail in the build container, but
1611 ;; not in 'guix environment -C' (even without /bin/sh)?
1612 "test-nointerrupt.t"
1614 ;; FIXME: This gets killed but does not receive an interrupt.
1615 "test-commandserver.t"
1617 ;; Only works when run in a hg-repo, not in an
1618 ;; extracted tarball
1621 ;; TODO: the fqaddr() call fails in the build
1622 ;; container, causing these server tests to fail.
1624 "test-http-branchmap.t"
1625 "test-pull-bundle.t"
1628 "test-subrepo-deep-nested-change.t"
1629 "test-subrepo-recursion.t"))
1631 (invoke "./run-tests.py"
1632 ;; ‘make check’ does not respect ‘-j’.
1633 (string-append "-j" (number->string
1634 (parallel-job-count)))
1635 ;; The default time-outs are too low for many systems.
1636 ;; Raise them generously: Guix enforces its own.
1638 "--slowtimeout" "86400"
1639 ;; The test suite takes a long time and produces little
1640 ;; output by default. Prevent timeouts due to silence.
1643 ;; The following inputs are only needed to run the tests.
1645 `(("python-nose" ,python-nose)
1648 (home-page "https://www.mercurial-scm.org/")
1649 (synopsis "Decentralized version control system")
1651 "Mercurial is a free, distributed source control management tool.
1652 It efficiently handles projects of any size
1653 and offers an easy and intuitive interface.")
1654 (license license:gpl2+)))
1656 (define-public python-hg-evolve
1658 (name "python-hg-evolve")
1664 (url "https://www.mercurial-scm.org/repo/evolve")
1665 (changeset version)))
1666 (file-name (string-append name "-" version "-checkout"))
1669 "1lz407373lfam9n02gq0l0rc2sjvn0m96kbzy93ipia3ika8fa68"))))
1670 (build-system python-build-system)
1672 ;; Tests need mercurial source code.
1675 `(("mercurial" ,mercurial)))
1676 (home-page "https://www.mercurial-scm.org/doc/evolution/")
1677 (synopsis "Flexible evolution of Mercurial history")
1678 (description "Evolve is a Mercurial extension for faster and safer mutable
1679 history. It implements the changeset evolution concept for Mercurial.")
1680 (license license:gpl2)))
1688 (uri (string-append "http://www.webdav.org/neon/neon-"
1692 "1jpvczcx658vimqm7c8my2q41fnmjaf1j03g7bsli6rjxk6xh2yv"))))
1693 (build-system gnu-build-system)
1696 ("pkg-config" ,pkg-config)))
1698 `(("libxml2" ,libxml2)
1699 ("openssl" ,openssl)
1702 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
1703 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
1705 #:configure-flags '("--enable-shared"
1706 ;; requires libgnutils-config, deprecated
1708 ; "--with-ssl=gnutls")))
1709 "--with-ssl=openssl")))
1710 (home-page "http://www.webdav.org/neon/")
1711 (synopsis "HTTP and WebDAV client library")
1713 "Neon is an HTTP and WebDAV client library, with a C interface and the
1716 @item High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
1718 @item low-level interface to the HTTP request/response engine, allowing the use
1719 of arbitrary HTTP methods, headers, etc.;
1720 @item authentication support including Basic and Digest support, along with
1721 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
1722 @item SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
1723 verifying server certificates, handling client certificates, and examining
1724 certificate properties, smartcard-based client certificates are also
1725 supported via a PKCS#11 wrapper interface;
1726 @item abstract interface to parsing XML using libxml2 or expat, and wrappers for
1727 simplifying handling XML HTTP response bodies;
1728 @item WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
1729 property manipulation.
1731 (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+
1733 (define-public subversion
1739 (uri (string-append "mirror://apache/subversion/"
1740 "subversion-" version ".tar.bz2"))
1743 "00i1f88snlpcnsycpn6r315h6792l5nkr2p5k6kq6yprz4cf5a3b"))))
1744 (build-system gnu-build-system)
1746 '(#:parallel-tests? #f ; TODO Seems to cause test failures on
1748 #:configure-flags '("--enable-static=no")
1750 (modify-phases %standard-phases
1751 (add-after 'configure 'patch-libtool-wrapper-ls
1752 (lambda* (#:key inputs #:allow-other-keys)
1753 ;; This substitution allows tests svnauthz_tests and svnlook_tests
1754 ;; to pass. These tests execute svnauthz and svnlook through
1755 ;; their libtool wrapper scripts from svn hooks, whose empty
1756 ;; environments cause "ls: command not found" errors. It would be
1757 ;; nice if this fix ultimately made its way into libtool.
1758 (let ((coreutils (assoc-ref inputs "coreutils")))
1759 (substitute* "libtool"
1760 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))
1762 (add-before 'build 'patch-test-sh
1764 (substitute* "subversion/tests/libsvn_repos/repos-test.c"
1765 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1767 (add-before 'check 'set-PARALLEL
1768 (lambda* (#:key parallel-tests? #:allow-other-keys)
1770 (setenv "PARALLEL" (number->string (parallel-job-count)))
1771 (simple-format #t "parallel-tests? are disabled\n"))
1773 (add-after 'install 'install-perl-bindings
1774 (lambda* (#:key outputs #:allow-other-keys)
1775 ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
1776 (let ((out (assoc-ref outputs "out")))
1777 (invoke "make" "swig-pl-lib")
1778 ;; FIXME: Test failures.
1779 ;; (invoke "make" "check-swig-pl")
1780 (invoke "make" "install-swig-pl-lib")
1782 ;; Set the right installation prefix.
1783 (with-directory-excursion
1784 "subversion/bindings/swig/perl/native"
1785 (invoke "perl" "Makefile.PL"
1787 (string-append "PREFIX=" out))
1788 (invoke "make" "install"
1789 (string-append "OTHERLDFLAGS="
1793 `(("pkg-config" ,pkg-config)
1794 ;; For the Perl bindings.
1798 ("apr-util" ,apr-util)
1802 ("python" ,python-wrapper)
1804 ("utf8proc" ,utf8proc)
1806 (home-page "https://subversion.apache.org/")
1807 (synopsis "Revision control system")
1809 "@dfn{Subversion} (svn) exists to be recognized and adopted as a
1810 centralized version control system characterized by its
1811 reliability as a safe haven for valuable data; the simplicity of its model and
1812 usage; and its ability to support the needs of a wide variety of users and
1813 projects, from individuals to large-scale enterprise operations.")
1814 (license license:asl2.0)))
1822 (uri (string-append "mirror://gnu/rcs/rcs-"
1826 "1if5pa4iip2p70gljm54nggfdnsfjxa4cqz8fpj07lvsijary39s"))
1827 (patches (search-patches "rcs-5.10.0-no-stdin.patch"))))
1828 (build-system gnu-build-system)
1829 (native-inputs `(("ed" ,ed)))
1830 (home-page "https://www.gnu.org/software/rcs/")
1831 (synopsis "Per-file local revision control system")
1833 "RCS is the original Revision Control System. It works on a
1834 file-by-file basis, in contrast to subsequent version control systems such as
1835 CVS, Subversion, and Git. This can make it suitable for system
1836 administration files, for example, which are often inherently local to one
1838 (license license:gpl3+)))
1847 "https://ftp.gnu.org/non-gnu/cvs/source/feature/"
1848 version "/cvs-" version ".tar.bz2"))
1849 (patches (search-patches "cvs-CVE-2017-12836.patch"))
1852 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
1853 (build-system gnu-build-system)
1855 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
1857 #:configure-flags (list "--with-external-zlib")))
1858 (inputs `(("zlib" ,zlib)
1859 ("nano" ,nano))) ; the default editor
1860 (home-page "http://cvs.nongnu.org")
1861 (synopsis "Historical centralized version control system")
1863 "CVS is a version control system, an important component of Source
1864 Configuration Management (SCM). Using it, you can record the history of
1865 sources files, and documents. It fills a similar role to the free software
1866 RCS, PRCS, and Aegis packages.")
1867 (license license:gpl1+)))
1869 (define-public cvs-fast-export
1871 (name "cvs-fast-export")
1875 (uri (string-append "http://www.catb.org/~esr/cvs-fast-export/"
1876 "cvs-fast-export-" version ".tar.gz"))
1879 "06y2myhhv2ap08bq7d7shq0b7lq6wgznwrpz6622xq66cxkf2n5g"))))
1880 (build-system gnu-build-system)
1883 (modify-phases %standard-phases
1884 (delete 'configure)) ; no configure script
1885 #:parallel-build? #f ; parallel a2x commands fail spectacularly
1887 (list "CC=gcc" (string-append "prefix?=" (assoc-ref %outputs "out")))))
1890 ("python" ,python-wrapper)))
1892 `(("asciidoc" ,asciidoc)
1893 ;; These are needed for the tests.
1896 (home-page "http://www.catb.org/esr/cvs-fast-export/")
1897 (synopsis "Export an RCS or CVS history as a fast-import stream")
1898 (description "This program analyzes a collection of RCS files in a CVS
1899 repository (or outside of one) and, when possible, emits an equivalent history
1900 in the form of a fast-import stream. Not all possible histories can be
1901 rendered this way; the program tries to emit useful warnings when it can't.
1903 The program can also produce a visualization of the resulting commit directed
1904 acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org,
1905 Graphviz}. The package also includes @command{cvssync}, a tool for mirroring
1906 masters from remote CVS hosts.")
1907 (license license:gpl2+)))
1909 (define-public vc-dwim
1915 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
1919 "0am6axxdvkm2vwgg0gjrd930yv4dlsdbf0rdv0zh5bhy1ir64rph"))))
1920 (build-system gnu-build-system)
1921 (inputs `(("perl" ,perl)))
1923 `(("emacs" ,emacs-minimal) ; for `ctags'
1924 ("inetutils" ,inetutils))) ; for `hostname', used in the tests
1925 (home-page "https://www.gnu.org/software/vc-dwim/")
1926 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
1928 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
1929 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
1930 using version control at the same time, for example by printing a reminder
1931 when a file change has been described in the ChangeLog but the file has not
1932 been added to the VC. vc-chlog scans changed files and generates
1933 standards-compliant ChangeLog entries based on the changes that it detects.")
1934 (license license:gpl3+)))
1936 (define-public diffstat
1944 (string-append "ftp://invisible-island.net/diffstat/"
1945 "diffstat-" version ".tgz")
1946 (string-append "http://invisible-mirror.net/archives/diffstat/"
1947 "diffstat-" version ".tgz")))
1950 "0vyw200s5dv1257pmrh6c6fdkmw3slyz5szpqfx916xr04sdbpby"))))
1951 (build-system gnu-build-system)
1952 (home-page "https://invisible-island.net/diffstat/")
1953 (synopsis "Make histograms from the output of @command{diff}")
1955 "Diffstat reads the output of @command{diff} and displays a histogram of
1956 the insertions, deletions, and modifications per file. It is useful for
1957 reviewing large, complex patch files.")
1958 (license (license:x11-style "file://COPYING"))))
1966 (uri (string-append "mirror://gnu/" name "/CSSC-"
1970 "1vsisqq573xjr2qpn19iwmpqgl3mq03m790akpa4rvj60b4d1gni"))))
1971 (build-system gnu-build-system)
1974 (modify-phases %standard-phases
1975 (add-before 'check 'precheck
1978 (substitute* "tests/common/test-common"
1979 (("/bin/pwd") (which "pwd")))
1981 (substitute* "tests/prt/all-512.sh"
1982 (("/bin/sh") (which "sh")))
1984 ;; XXX: This test has no hope of passing until there is a "nogroup"
1985 ;; entry (or at least some group to which the guix builder does
1986 ;; not belong) in the /etc/group file of the build environment.
1987 ;; Currently we do not have such a group. Disable this test for now.
1988 (substitute* "tests/Makefile"
1989 (("test-delta ") ""))))))))
1990 ;; These are needed for the tests
1991 (native-inputs `(("git" ,git)
1993 (home-page "https://www.gnu.org/software/cssc/")
1994 (synopsis "File-based version control like SCCS")
1995 (description "GNU CSSC provides a replacement for the legacy Unix source
1996 code control system SCCS. This allows old code still under that system to be
1997 accessed and migrated on modern systems.")
1998 (license license:gpl3+)))
2000 ;; This package can unfortunately work only in -TEST mode, since Aegis
2001 ;; requires that it is installed setuid root.
2002 (define-public aegis
2008 (uri (string-append "mirror://sourceforge/aegis/aegis/" version
2009 "/aegis-" version ".tar.gz"))
2012 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
2013 (patches (search-patches "aegis-perl-tempdir1.patch"
2014 "aegis-perl-tempdir2.patch"
2015 "aegis-test-fixup-1.patch"
2016 "aegis-test-fixup-2.patch"
2017 "aegis-constness-error.patch"))))
2018 (build-system gnu-build-system)
2020 `(("e2fsprogs" ,e2fsprogs)
2023 ("libxml2" ,libxml2)
2025 ("gettext" ,gettext-minimal)))
2030 ;; Various tests require the following:
2034 ("subversion" ,subversion)
2038 `(#:configure-flags (list "--with-no-aegis-configured"
2039 "--sharedstatedir=/var/com/aegis"
2040 ;; Uses the old 'throw()' specifier with 'new'
2041 ;; which changed in C++11.
2042 "CXXFLAGS=-std=c++03")
2043 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
2045 (modify-phases %standard-phases
2046 (add-before 'configure 'pre-conf
2048 (substitute* (append '("configure"
2049 "etc/check-tar-gz.sh"
2053 "script/aebisect.in"
2054 "script/aeintegratq.in"
2056 "script/test_funcs.in"
2057 "web/eg_oss_templ.sh"
2059 "libaegis/getpw_cache.cc")
2060 (find-files "test" "\\.sh"))
2061 (("/bin/sh") (which "sh")))
2062 (setenv "SH" (which "sh"))
2066 (let ((home (string-append (getcwd) "/my-new-home")))
2067 ;; Some tests need to write to $HOME.
2069 (setenv "HOME" home)
2071 ;; This test assumes that flex has been symlinked to "lex".
2072 (substitute* "test/00/t0011a.sh"
2073 (("type lex") "type flex"))
2075 ;; XXX Disable tests that fail, for unknown reasons, ‘for now’.
2077 (lambda (test) (substitute* "Makefile"
2078 (((string-append "test/" test "\\.ES ")) "")))
2083 ;; The author decided to call the check rule "sure".
2084 (invoke "make" "sure")))))))
2085 (home-page "https://sourceforge.net/projects/aegis/")
2086 (synopsis "Project change supervisor")
2087 (description "Aegis is a project change supervisor, and performs some of
2088 the Software Configuration Management needed in a CASE environment. Aegis
2089 provides a framework within which a team of developers may work on many
2090 changes to a program independently, and Aegis coordinates integrating these
2091 changes back into the master source of the program, with as little disruption
2092 as possible. Resolution of contention for source files, a major headache for
2093 any project with more than one developer, is one of Aegis's major functions.")
2094 (license license:gpl3+)))
2096 (define-public reposurgeon
2098 (name "reposurgeon")
2102 (uri (string-append "http://www.catb.org/~esr/" name "/"
2103 name "-" version ".tar.xz"))
2106 "1af0z14wcm4bk5a9ysinbwq2fp3lf5f7i8mvwh7286hr3fnagcaz"))
2107 (patches (search-patches
2108 "reposurgeon-add-missing-docbook-files.patch"))))
2109 (build-system gnu-build-system)
2113 (string-append "target=" (assoc-ref %outputs "out")))
2115 (modify-phases %standard-phases
2116 (add-after 'unpack 'patch-inputs
2117 (lambda* (#:key inputs #:allow-other-keys)
2118 (let ((tzdata (assoc-ref inputs "tzdata")))
2119 (substitute* "reposurgeon"
2120 (("/usr/share/zoneinfo")
2121 (string-append tzdata "/share/zoneinfo")))
2122 (substitute* "test/svn-to-svn"
2123 (("/bin/echo") "echo"))
2125 (delete 'configure) ; no configure script
2126 (add-before 'build 'fix-docbook
2127 (lambda* (#:key inputs #:allow-other-keys)
2128 (substitute* (find-files "." "\\.xml$")
2129 (("docbook/docbookx.dtd")
2130 (string-append (assoc-ref inputs "docbook-xml")
2131 "/xml/dtd/docbook/docbookx.dtd")))
2133 (add-before 'check 'set-up-test-environment
2134 (lambda* (#:key inputs #:allow-other-keys)
2135 (let ((tzdata (assoc-ref inputs "tzdata")))
2136 (setenv "TZDIR" (string-append tzdata "/share/zoneinfo"))
2138 (add-after 'install 'install-emacs-data
2139 (lambda* (#:key outputs #:allow-other-keys)
2140 (install-file "reposurgeon-mode.el"
2141 (string-append (assoc-ref outputs "out")
2142 "/share/emacs/site-lisp"))
2145 `(("python" ,python-wrapper)
2146 ("tzdata" ,tzdata)))
2148 `( ;; For building documentation.
2149 ("asciidoc" ,asciidoc)
2150 ("docbook-xml" ,docbook-xml)
2151 ("docbook-xsl" ,docbook-xsl)
2152 ("libxml2" ,libxml2)
2158 ("mercurial" ,mercurial)
2159 ("subversion" ,subversion)))
2160 (home-page "http://www.catb.org/~esr/reposurgeon/")
2161 (synopsis "Edit version-control repository history")
2162 (description "Reposurgeon enables risky operations that version-control
2163 systems don't want to let you do, such as editing past comments and metadata
2164 and removing commits. It works with any version control system that can
2165 export and import Git fast-import streams, including Git, Mercurial, Fossil,
2166 Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly
2167 and can thus be used to script production of very high-quality conversions
2168 from Subversion to any supported Distributed Version Control System (DVCS).")
2169 ;; Most files are distributed under bsd-2, except 'repocutter' which is
2171 (license (list license:bsd-2 license:bsd-3))))
2180 "https://github.com/jonas/tig/releases/download/tig-"
2181 version "/tig-" version ".tar.gz"))
2184 "0r4y9hyvpkplaxrzslws3asz652d83qh3bjwvmp8assga8s5s3ah"))))
2185 (build-system gnu-build-system)
2187 `(("asciidoc" ,asciidoc)
2190 `(("ncurses" ,ncurses)
2191 ("readline" ,readline)))
2194 (modify-phases %standard-phases
2195 (add-after 'install 'install-doc
2197 (invoke "make" "install-doc"))))
2198 #:test-target "test"
2199 #:tests? #f)) ; tests require access to /dev/tty
2200 (home-page "https://jonas.github.io/tig/")
2201 (synopsis "Ncurses-based text user interface for Git")
2203 "Tig is an ncurses text user interface for Git, primarily intended as
2204 a history browser. It can also stage hunks for commit, or colorize the
2205 output of the @code{git} command.")
2206 (license license:gpl2+)))
2208 (define-public findnewest
2216 (url "https://github.com/0-wiz-0/findnewest")
2217 (commit (string-append "findnewest-" version))))
2218 (file-name (git-file-name name version))
2220 (base32 "1x1cbn2b27h5r0ah5xc06fkalfdci2ngrgd4wibxjw0h88h0nvgq"))))
2221 (build-system gnu-build-system)
2222 (native-inputs `(("autoconf" ,autoconf)
2223 ("automake" ,automake)))
2224 (home-page "https://github.com/0-wiz-0/findnewest/releases")
2225 (synopsis "Print the modification time of the latest file")
2227 "Recursively find the newest file in a file tree and print its
2228 modification time.")
2229 (license license:bsd-2)))
2231 (define-public myrepos
2234 (version "1.20180726")
2239 (url "git://myrepos.branchable.com/myrepos")
2241 (file-name (string-append name "-" version "-checkout"))
2243 (base32 "0jphw61plm8cgklja6hs639xhdvxgvjwbr6jpvjwpp7hc5gmhms5"))))
2244 (build-system gnu-build-system)
2246 '(#:test-target "test"
2247 #:make-flags (list (string-append "PREFIX=" %output))
2249 (modify-phases %standard-phases
2251 (add-after 'install 'wrap-webcheckout
2252 (lambda* (#:key inputs outputs #:allow-other-keys)
2253 (let ((out (assoc-ref outputs "out")))
2254 (wrap-program (string-append out "/bin/webcheckout")
2255 `("PERL5LIB" ":" prefix
2256 ,(map (lambda (i) (string-append (assoc-ref inputs i)
2257 "/lib/perl5/site_perl"))
2258 '("perl-encode-locale" "perl-http-date"
2259 "perl-http-message" "perl-html-parser" "perl-libwww"
2260 "perl-uri" "perl-try-tiny"))))
2264 ("perl-encode-locale" ,perl-encode-locale)
2265 ("perl-html-parser" ,perl-html-parser)
2266 ("perl-http-date" ,perl-http-date)
2267 ("perl-http-message" ,perl-http-message)
2268 ("perl-libwww" ,perl-libwww)
2269 ("perl-try-tiny" ,perl-try-tiny)
2270 ("perl-uri" ,perl-uri)))
2271 (home-page "https://myrepos.branchable.com/")
2272 (synopsis "Multiple repository management tool")
2274 "Myrepos provides the @code{mr} command, which maps an operation (e.g.,
2275 fetching updates) over a collection of version control repositories. It
2276 supports a large number of version control systems: Git, Subversion,
2277 Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
2278 (license license:gpl2+)))
2280 (define-public grokmirror
2288 (url (string-append "https://git.kernel.org/pub/scm/"
2289 "utils/grokmirror/grokmirror.git"))
2290 (commit (string-append "v" version))))
2291 (file-name (string-append name "-" version "-checkout"))
2293 (base32 "006ar3kc6fw1sq300ar9np4a63qzzsdama6cv30wh65v5mqw1mnv"))))
2294 (build-system python-build-system)
2296 `(#:tests? #f ; no test suite
2298 (modify-phases %standard-phases
2299 (add-after 'install 'install-manpages
2300 (lambda* (#:key outputs #:allow-other-keys)
2301 (let* ((man (string-append (assoc-ref outputs "out")
2304 (for-each (lambda (file) (install-file file man))
2305 (find-files "." "\\.1$")))
2308 `(("python-packaging" ,python-packaging)
2309 ("python-requests" ,python-requests)))
2311 "https://git.kernel.org/pub/scm/utils/grokmirror/grokmirror.git")
2312 (synopsis "Framework to smartly mirror git repositories")
2313 (description "Grokmirror enables replicating large git repository
2314 collections efficiently. Mirrors decide to clone and update repositories
2315 based on a manifest file published by servers.")
2316 (license license:gpl3+)))
2325 (uri (pypi-uri "b4" version))
2327 (base32 "01qid6mvddikcdpf2ihsyn8x3z5j2n64g0ip9pqbx42hrc50pmcz"))))
2328 (build-system python-build-system)
2329 (arguments '(#:tests? #f)) ; No tests.
2331 `(("python-dkimpy" ,python-dkimpy)
2332 ("python-dnspython" ,python-dnspython)
2333 ("python-requests" ,python-requests)))
2334 (home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git")
2335 (synopsis "Tool for working with patches in public-inbox archives")
2337 "The @code{b4} command is designed to make it easier to participate in
2338 patch-based workflows for projects that have public-inbox archives.
2342 @item downloading a thread's mbox given a message ID
2343 @item processing an mbox so that is ready to be fed to @code{git-am}
2344 @item creating templated replies for processed patches and pull requests
2345 @item submitting cryptographic attestation for patches.
2347 (license license:gpl2+)))
2349 (define-public git-annex-remote-rclone
2351 (name "git-annex-remote-rclone")
2357 (url "https://github.com/DanielDent/git-annex-remote-rclone")
2358 (commit (string-append "v" version))))
2359 (file-name (git-file-name name version))
2362 "0j0hlxji8d974fq7zd4xc02n0jpi31ylhxc7z4zp8iiwad5mkpxp"))))
2363 (build-system trivial-build-system)
2365 `(#:modules ((guix build utils))
2368 (use-modules (guix build utils))
2369 (let ((bash (string-append (assoc-ref %build-inputs "bash")
2371 (rclone (string-append (assoc-ref %build-inputs "rclone")
2373 (copy-file (string-append (assoc-ref %build-inputs "source")
2374 "/git-annex-remote-rclone")
2375 "git-annex-remote-rclone")
2376 (substitute* "git-annex-remote-rclone"
2377 (("/bin/bash") bash)
2378 (("runcmd rclone") (string-append "runcmd " rclone)))
2379 (install-file "git-annex-remote-rclone"
2380 (string-append %output "/bin"))
2384 ("rclone" ,rclone)))
2385 (home-page "https://github.com/DanielDent/git-annex-remote-rclone")
2386 (synopsis "Use rclone-supported cloud storage providers with git-annex")
2387 (description "This wrapper around rclone makes any destination supported
2388 by rclone usable with git-annex.")
2389 (license license:gpl3+)))
2391 (define-public fossil
2399 "https://www.fossil-scm.org/index.html/uv/"
2400 "fossil-src-" version ".tar.gz"))
2402 (base32 "0c9nzx42wxfmym9vf1pnbdb1c7gp7a7zqky60izxsph7w2xh8nix"))
2403 (modules '((guix build utils)))
2406 (delete-file-recursively "compat") #t))))
2407 (build-system gnu-build-system)
2409 `(("tcl" ,tcl) ;for configuration only
2410 ("which" ,which) ;for tests only
2413 `(("openssl" ,openssl)
2415 ("sqlite" ,sqlite)))
2417 `(#:configure-flags (list "--with-openssl=auto"
2418 "--disable-internal-sqlite")
2419 #:test-target "test"
2420 #:phases (modify-phases %standard-phases
2421 (add-after 'patch-source-shebangs 'patch-sh
2423 (substitute* '("auto.def")
2424 (("/bin/sh") (which "sh")))
2427 (lambda* (#:key outputs (configure-flags '())
2429 ;; The 'configure' script is not an autoconf script and
2430 ;; chokes on unrecognized options.
2433 (string-append "--prefix="
2434 (assoc-ref outputs "out"))
2437 (add-before 'check 'test-setup
2439 (setenv "USER" "guix")
2442 (home-page "https://fossil-scm.org")
2443 (synopsis "Software configuration management system")
2445 "Fossil is a distributed source control management system which supports
2446 access and administration over HTTP CGI or via a built-in HTTP server. It has
2447 a built-in wiki, built-in file browsing, built-in tickets system, etc.")
2448 (license (list license:public-domain ;src/miniz.c, src/shell.c
2451 (define-public stagit
2457 (uri (string-append "https://dl.2f30.org/releases/"
2458 name "-" version ".tar.gz"))
2461 "1m3s9g1z9szbjrhm8sic91xh6f2bfpi56rskdkqd5wc4wdycpyi5"))))
2462 (build-system gnu-build-system)
2464 `(#:tests? #f ; No tests
2465 #:make-flags (list "CC=gcc"
2466 (string-append "PREFIX=" %output))
2468 (modify-phases %standard-phases
2469 (delete 'configure)))) ; No configure script
2471 `(("libgit2" ,libgit2)))
2472 (home-page "https://2f30.org/")
2473 (synopsis "Static git page generator")
2474 (description "Stagit creates static pages for git repositories, the results can
2475 be served with a HTTP file server of your choice.")
2476 (license license:expat)))
2478 (define-public gource
2485 "https://github.com/acaudwell/Gource/releases/download"
2486 "/gource-" version "/gource-" version ".tar.gz"))
2489 "16p7b1x4r0915w883lp374jcdqqja37fnb7m8vnsfnl2n64gi8qr"))))
2490 (build-system gnu-build-system)
2493 (list (string-append "--with-boost-libdir="
2494 (assoc-ref %build-inputs "boost")
2497 `(("pkg-config" ,pkg-config)))
2507 ("sdl-union" ,(sdl-union (list sdl2 sdl2-image)))))
2508 (home-page "https://gource.io/")
2509 (synopsis "3D visualisation tool for source control repositories")
2510 (description "@code{gource} provides a software version control
2511 visualization. The repository is displayed as a tree where the root of the
2512 repository is the centre, directories are branches and files are leaves.
2513 Contributors to the source code appear and disappear as they contribute to
2514 specific files and directories.")
2515 (license license:gpl3+)))
2524 "http://www.catb.org/~esr/src/src-" version ".tar.gz"))
2527 "0n0skhvya8w2az45h2gsafxy8m2mvqas64nrgxifcmrzfv0rf26c"))))
2528 (build-system gnu-build-system)
2531 (list (string-append "prefix=" (assoc-ref %outputs "out")))
2533 (modify-phases %standard-phases
2534 (delete 'configure) ; no 'configure' script
2535 (add-after 'install 'wrap-program
2536 (lambda* (#:key inputs outputs #:allow-other-keys)
2537 (let* ((out (assoc-ref outputs "out"))
2538 (prog (string-append out "/bin/src"))
2539 (rcs (assoc-ref inputs "rcs")))
2541 `("PATH" ":" prefix (,(string-append rcs "/bin"))))
2545 (setenv "HOME" (getenv "TMPDIR"))
2546 (invoke "git" "config" "--global" "user.name" "guix")
2547 (invoke "git" "config" "--global" "user.email" "guix")
2548 (invoke "./srctest"))))))
2554 `(("python" ,python-wrapper)
2556 (synopsis "Simple revision control")
2557 (home-page "http://www.catb.org/~esr/src/")
2559 "SRC (or src) is simple revision control, a version-control system for
2560 single-file projects by solo developers and authors. It modernizes the
2561 venerable RCS, hence the anagrammatic acronym. The design is tuned for use
2562 cases like all those little scripts in your @file{~/bin} directory, or a
2563 directory full of HOWTOs.")
2564 (license license:bsd-2)))
2566 (define-public git-when-merged
2567 ;; Use an unreleased version to get a PY3 compatibility fix.
2568 (let ((commit "ab6af7865a0ba55ba364a6c507e0be6f84f31c6d"))
2570 (name "git-when-merged")
2571 (version (string-append "1.2.0-" (string-take commit 7)))
2575 (url "https://github.com/mhagger/git-when-merged/")
2577 (file-name (git-file-name name version))
2580 "0iyk2psf97bc9h43m89p3xjmm79fsx99i7px29g4lcnmdy5kmz0p"))))
2581 (build-system gnu-build-system)
2583 `(#:tests? #f ; there are no tests
2585 (modify-phases %standard-phases
2589 (lambda* (#:key outputs #:allow-other-keys)
2590 (install-file "bin/git-when-merged"
2591 (string-append (assoc-ref outputs "out")
2594 (add-before 'install 'patch-git
2595 (lambda* (#:key inputs #:allow-other-keys)
2596 (let ((git (string-append (assoc-ref inputs "git")
2598 (substitute* "bin/git-when-merged"
2599 (("'git'") (string-append "'" git "'")))
2601 (add-after 'install 'wrap-script
2602 (lambda* (#:key outputs #:allow-other-keys)
2603 (wrap-program (string-append (assoc-ref outputs "out")
2604 "/bin/git-when-merged")
2605 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2609 ("python" ,python-wrapper)))
2610 (home-page "https://github.com/mhagger/git-when-merged")
2611 (synopsis "Determine when a commit was merged into a Git branch")
2612 (description "This Git extension defines a subcommand,
2613 @code{when-merged}, whose core operation is to find the merge that brought a
2614 given commit into the specified ref(s). It has various options that control
2615 how information about the merge is displayed.")
2616 (license license:gpl2+))))
2618 (define-public git-imerge
2626 (url "https://github.com/mhagger/git-imerge")
2627 (commit (string-append "v" version))))
2628 (file-name (git-file-name name version))
2630 (base32 "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4"))))
2631 (build-system gnu-build-system)
2633 `(#:tests? #f ; only manual test scripts
2634 #:make-flags (list (string-append "DESTDIR=" %output)
2637 (modify-phases %standard-phases
2639 (add-before 'install 'patch-git
2640 (lambda* (#:key inputs #:allow-other-keys)
2641 (let ((git (string-append (assoc-ref inputs "git")
2643 (substitute* "git-imerge"
2644 (("'git'") (string-append "'" git "'")))
2646 (add-after 'install 'wrap-script
2647 (lambda* (#:key outputs #:allow-other-keys)
2648 (wrap-program (string-append (assoc-ref outputs "out")
2650 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2654 ("python" ,python-wrapper)))
2655 (home-page "https://github.com/mhagger/git-imerge")
2656 (synopsis "Incremental merge for Git")
2657 (description "This Git extension defines a subcommand, @code{imerge},
2658 which performs an incremental merge between two branches. Its two primary
2659 design goals are to reduce the pain of resolving merge conflicts by finding
2660 the smallest possible conflicts and to allow a merge to be saved, tested,
2661 interrupted, published, and collaborated on while in progress.")
2662 (license license:gpl2+)))
2664 (define-public git-lfs
2671 (url "https://github.com/git-lfs/git-lfs")
2672 (commit (string-append "v" version))))
2673 (file-name (git-file-name name version))
2676 "05qd96bn2cl7gn5qarbcv6scdpj28qiwdfzalamqk5jjiidpmng5"))))
2677 (build-system go-build-system)
2679 `(#:import-path "github.com/git-lfs/git-lfs"
2680 #:install-source? #f
2682 (modify-phases %standard-phases
2683 (add-before 'build 'man-gen
2684 ;; Without this, the binary generated in 'build
2685 ;; phase won't have any embedded usage-text.
2687 (with-directory-excursion "src/github.com/git-lfs/git-lfs"
2688 (invoke "make" "mangen"))))
2689 (add-after 'build 'build-man-pages
2691 (with-directory-excursion "src/github.com/git-lfs/git-lfs"
2692 (invoke "make" "man"))
2694 (add-after 'install 'install-man-pages
2696 (with-directory-excursion "src/github.com/git-lfs/git-lfs/man"
2697 (let ((out (assoc-ref %outputs "out")))
2700 (install-file manpage (string-append out "/share/man/man1")))
2701 (find-files "." "^git-lfs.*\\.1$"))))
2703 ;; make `ronn` available during build for man page generation
2704 (native-inputs `(("ronn-ng" ,ronn-ng)))
2705 (home-page "https://git-lfs.github.com/")
2706 (synopsis "Git extension for versioning large files")
2708 "Git Large File Storage (LFS) replaces large files such as audio samples,
2709 videos, datasets, and graphics with text pointers inside Git, while storing the
2710 file contents on a remote server.")
2711 (license license:expat)))
2713 (define-public git-open
2721 (url "https://github.com/paulirish/git-open")
2722 (commit (string-append "v" version))))
2723 (file-name (git-file-name name version))
2725 (base32 "11n46bngvca5wbdbfcxzjhjbfdbad7sgf7h9gf956cb1q8swsdm0"))))
2726 (build-system copy-build-system)
2728 `(("xdg-utils" ,xdg-utils)))
2731 (modify-phases %standard-phases
2732 (add-after 'install 'wrap-program
2733 (lambda* (#:key outputs inputs #:allow-other-keys)
2734 (let ((out (assoc-ref outputs "out"))
2735 (xdg-utils (assoc-ref inputs "xdg-utils")))
2736 (wrap-program (string-append out "/bin/git-open")
2737 `("PATH" ":" prefix (,(string-append xdg-utils "/bin"))))))))
2739 '(("git-open" "bin/git-open"))))
2740 (home-page "https://github.com/paulirish/git-open")
2741 (synopsis "Open a Git repository's homepage from the command-line")
2743 "@code{git open} opens the repository's website from the command-line,
2744 guessing the URL pattern from the @code{origin} remote.")
2745 (license license:expat)))
2753 (uri (string-append "https://ftp.gnu.org/old-gnu/gnu-arch/"
2754 "tla-" version ".tar.gz"))
2757 "01mfzj1i6p4s8191cgd5850hds1zls88hkf9rb6qx1vqjv585aj0"))
2758 (modules '((guix build utils)))
2761 ;; In tar 1.32, '--preserve' is ambiguous and leads to an
2762 ;; error, so address that.
2763 (substitute* "src/tla/libarch/archive.c"
2765 "\"--preserve-permissions\""))
2767 (build-system gnu-build-system)
2769 '(#:phases (modify-phases %standard-phases
2771 (lambda* (#:key inputs outputs #:allow-other-keys)
2772 (let ((out (assoc-ref outputs "out")))
2778 ;; For libneon's 'configure' script.
2779 ;; XXX: There's a bundled copy of neon.
2780 (setenv "CONFIG_SHELL" (which "sh"))
2782 (invoke "../configure" "--prefix" out
2783 "--config-shell" (which "sh")
2784 "--with-posix-shell" (which "sh")
2785 "--with-cc" "gcc")))))
2788 ;; There are build failures when building in parallel.
2789 #:parallel-build? #f
2790 #:parallel-tests? #f
2792 #:test-target "test"))
2794 `(("which" ,which)))
2795 (synopsis "Historical distributed version-control system")
2797 "GNU Arch, aka. @code{tla}, was one of the first free distributed
2798 version-control systems (DVCS). It saw its last release in 2006. This
2799 package is provided for users who need to recover @code{tla} repositories and
2801 (home-page "https://www.gnu.org/software/gnu-arch/")
2802 (license license:gpl2))) ;version 2 only
2804 (define-public diff-so-fancy
2806 (name "diff-so-fancy")
2811 (url "https://github.com/so-fancy/diff-so-fancy")
2812 (commit (string-append "v" version))))
2813 (file-name (git-file-name name version))
2816 "0aavxahzha2mms4vdwysk79pa6wzswpfwgsq2hwaxnaf66maahfl"))))
2819 ("ncurses" ,ncurses)))
2820 (build-system copy-build-system)
2823 (modify-phases %standard-phases
2824 (add-after 'unpack 'patch-lib-path
2825 (lambda* (#:key outputs #:allow-other-keys)
2826 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2827 (substitute* "diff-so-fancy"
2829 (string-append "use lib '" lib "';\n")))
2831 (add-after 'install 'symlink-executable
2832 (lambda* (#:key outputs inputs #:allow-other-keys)
2833 (let ((out (assoc-ref outputs "out"))
2834 (ncurses (assoc-ref inputs "ncurses"))
2835 (perl (assoc-ref inputs "perl")))
2836 (wrap-program (string-append out "/bin/diff-so-fancy")
2837 `("PATH" ":" prefix (,(string-append ncurses "/bin")
2838 ,(string-append perl "/bin"))))
2842 ("diff-so-fancy" "bin/"))))
2843 (home-page "https://github.com/so-fancy/diff-so-fancy")
2844 (synopsis "Makes diffs more human friendly and readable")
2846 "@code{diff-so-fancy} strives to make your diffs human readable instead
2847 of machine readable. This helps improve code quality and helps you spot
2849 (license license:expat)))
2851 (define-public go-github-go-git
2853 (name "go-github-go-git")
2858 (url "https://github.com/go-git/go-git")
2859 (commit (string-append "v" version))))
2860 (file-name (git-file-name name version))
2863 "1vkcmhh2qq8c38sjbnzf0wvg2rzr19wssaq177bsvrjwj1xz1qbs"))))
2864 (build-system go-build-system)
2866 `(#:tests? #f ;requires network connection
2867 #:import-path "github.com/go-git/go-git/v5"
2869 (modify-phases %standard-phases
2870 (add-before 'build 'setup
2871 (lambda* (#:key inputs #:allow-other-keys)
2872 (let* ((git (assoc-ref inputs "git"))
2873 (git-bin (string-append (assoc-ref inputs "git") "/bin"))
2874 (git-exe (string-append git-bin "/git")))
2875 (setenv "GIT_DIST_PATH=" git)
2876 (setenv "GIT_EXEC_PATH=" git-bin)
2877 (setenv "HOME" (getcwd))
2878 (invoke git-exe "config" "--global" "user.email" "gha@example.com")
2879 (invoke git-exe "config" "--global" "user.name" "GitHub Actions")
2883 `(("go-github-com-emirpasic-gods" ,go-github-com-emirpasic-gods)
2884 ("go-github-com-go-git-gcfg" ,go-github-com-go-git-gcfg)
2885 ("go-github-com-go-git-go-billy" ,go-github-com-go-git-go-billy)
2886 ("go-github-com-imdario-mergo" ,go-github-com-imdario-mergo)
2887 ("go-github-com-jbenet-go-context" ,go-github-com-jbenet-go-context)
2888 ("go-github-com-kevinburke-ssh-config" ,go-github-com-kevinburke-ssh-config)
2889 ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
2890 ("go-github-com-sergi-go-diff" ,go-github-com-sergi-go-diff)
2891 ("go-github-com-xanzy-ssh-agentf" ,go-github-com-xanzy-ssh-agent)
2892 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
2893 ("go-golang-org-x-net" ,go-golang-org-x-net)
2894 ("go-gopkg-in-warnings" ,go-gopkg-in-warnings)
2895 ("go-github-com-go-git-go-git-fixtures" ,go-github-com-go-git-go-git-fixtures)
2896 ("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)
2897 ("go-github-com-alcortesm-tgz" ,go-github-com-alcortesm-tgz)
2898 ("go-golang-org-x-text" ,go-golang-org-x-text)
2900 (home-page "https://github.com/go-git/")
2901 (synopsis "Git implementation library")
2902 (description "This package provides a Git implementation library.")
2903 (license license:asl2.0)))
2912 (url "https://github.com/nosarthur/gita")
2914 (file-name (git-file-name name version))
2917 "15hfr7zk41kqsnszlgddfhz717mw4bxqwsn0nvjwg53x1hnfxv7p"))))
2918 (build-system python-build-system)
2920 `(("git" ,git) ;for tests
2921 ("python-pytest" ,python-pytest)))
2923 `(("python-pyyaml" ,python-pyyaml)))
2926 (modify-phases %standard-phases
2928 (lambda* (#:key inputs outputs #:allow-other-keys)
2929 (substitute* "tests/test_main.py"
2930 (("'gita\\\\n'") "'source\\n'")
2931 (("'gita'") "'source'"))
2932 (invoke (string-append (assoc-ref inputs "git") "/bin/git")
2934 (add-installed-pythonpath inputs outputs)
2935 (invoke (string-append (assoc-ref inputs "python-pytest")
2938 (add-after 'install 'install-shell-completions
2939 (lambda* (#:key outputs #:allow-other-keys)
2940 (let* ((out (assoc-ref outputs "out"))
2941 (bash-completion (string-append out "/etc/bash_completion.d"))
2942 (zsh-completion (string-append out "/etc/zsh/site-functions")))
2943 (mkdir-p bash-completion)
2944 (copy-file ".gita-completion.bash"
2945 (string-append bash-completion "/gita"))
2946 (mkdir-p zsh-completion)
2947 (copy-file ".gita-completion.zsh"
2948 (string-append zsh-completion "/_gita"))))))))
2949 (home-page "https://github.com/nosarthur/gita")
2950 (synopsis "Command-line tool to manage multiple Git repos")
2951 (description "This package provides a command-line tool to manage
2954 This tool does two things:
2956 @item display the status of multiple Git repos such as branch, modification,
2957 commit message side by side
2958 @item (batch) delegate Git commands/aliases from any working directory
2961 If several repos are related, it helps to see their status together.")
2962 (license license:expat)))