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