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