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