Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / version-control.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
6 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
7 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages version-control)
25 #:use-module ((guix licenses)
26 #:select (asl2.0 bsd-2
27 gpl1+ gpl2 gpl2+ gpl3+ lgpl2.1
28 x11-style))
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix git-download)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix build-system python)
34 #:use-module (guix build-system trivial)
35 #:use-module (guix build utils)
36 #:use-module (gnu packages apr)
37 #:use-module (gnu packages base)
38 #:use-module (gnu packages bison)
39 #:use-module (gnu packages cook)
40 #:use-module (gnu packages curl)
41 #:use-module (gnu packages ed)
42 #:use-module (gnu packages file)
43 #:use-module (gnu packages flex)
44 #:use-module (gnu packages gettext)
45 #:use-module (gnu packages groff)
46 #:use-module (gnu packages linux)
47 #:use-module (gnu packages nano)
48 #:use-module (gnu packages ncurses)
49 #:use-module (gnu packages ssh)
50 #:use-module (gnu packages web)
51 #:use-module (gnu packages perl)
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages python)
54 #:use-module (gnu packages databases)
55 #:use-module (gnu packages admin)
56 #:use-module (gnu packages xml)
57 #:use-module (gnu packages emacs)
58 #:use-module (gnu packages compression)
59 #:use-module (gnu packages swig)
60 #:use-module (gnu packages tcl)
61 #:use-module (gnu packages tls)
62 #:use-module (gnu packages)
63 #:use-module (ice-9 match)
64 #:use-module (srfi srfi-1))
65
66 (define-public bazaar
67 (package
68 (name "bazaar")
69 (version "2.6.0")
70 (source
71 (origin
72 (method url-fetch)
73 (uri (string-append "https://launchpad.net/bzr/2.6/" version
74 "/+download/bzr-" version ".tar.gz"))
75 (sha256
76 (base32
77 "1c6sj77h5f97qimjc14kr532kgc0jk3wq778xrkqi0pbh9qpk509"))))
78 (build-system python-build-system)
79 (inputs
80 ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh'
81 ;; require Zsh.
82 `(("gettext" ,gnu-gettext)))
83 (arguments
84 `(#:tests? #f ; no test target
85 #:python ,python-2 ; Python 3 apparently not yet supported, see
86 ; https://answers.launchpad.net/bzr/+question/229048
87 #:phases (alist-cons-after
88 'unpack 'fix-mandir
89 (lambda _
90 (substitute* "setup.py"
91 (("man/man1") "share/man/man1")))
92 %standard-phases)))
93 (home-page "https://gnu.org/software/bazaar")
94 (synopsis "Version control system supporting both distributed and centralized workflows")
95 (description
96 "GNU Bazaar is a version control system that allows you to record
97 changes to project files over time. It supports both a distributed workflow
98 as well as the classic centralized workflow.")
99 (license gpl2+)))
100
101 (define (package-transitive-propagated-labels* package)
102 "Return a list of the input labels of PACKAGE and its transitive inputs."
103 (let ((name (package-name package)))
104 `(,name
105 ,@(map (match-lambda
106 ((label (? package? _) . _)
107 label))
108 (package-transitive-propagated-inputs package)))))
109
110 (define (package-propagated-input-refs inputs packages)
111 "Return a list of (assoc-ref INPUTS <package-name>) for each package in
112 PACKAGES and their propagated inputs."
113 (map (lambda (l)
114 `(assoc-ref ,inputs ,l))
115 (delete-duplicates ;XXX: efficiency
116 (append-map package-transitive-propagated-labels*
117 packages))))
118
119 (define-public git
120 ;; Keep in sync with 'git-manpages'!
121 (package
122 (name "git")
123 (version "2.4.3")
124 (source (origin
125 (method url-fetch)
126 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
127 version ".tar.xz"))
128 (sha256
129 (base32
130 "056qh112f2afnbc4sjzkf8idzhi9bp7ggpci83cc6a7gs6lhfl7h"))))
131 (build-system gnu-build-system)
132 (native-inputs
133 `(("native-perl" ,perl)
134 ("gettext" ,gnu-gettext)))
135 (inputs
136 `(("curl" ,curl)
137 ("expat" ,expat)
138 ("openssl" ,openssl)
139 ("perl" ,perl)
140 ("python" ,python-2) ; CAVEAT: incompatible with python-3 according to INSTALL
141 ("zlib" ,zlib)
142
143 ;; For 'git-svn'.
144 ("subversion" ,subversion)
145
146 ;; For 'git-send-email'
147 ("perl-authen-sasl" ,perl-authen-sasl)
148 ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
149 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
150
151 ;; For 'git gui', 'gitk', and 'git citool'.
152 ("tcl" ,tcl)
153 ("tk" ,tk)))
154 (outputs '("out" ; the core
155 "send-email" ; for git-send-email
156 "svn" ; git-svn
157 "gui")) ; gitk, git gui
158 (arguments
159 `(#:make-flags `("V=1") ; more verbose compilation
160 #:test-target "test"
161 #:tests? #f ; FIXME: Many tests are failing
162
163 ;; The explicit --with-tcltk forces the build system to hardcode the
164 ;; absolute file name to 'wish'.
165 #:configure-flags (list (string-append "--with-tcltk="
166 (assoc-ref %build-inputs "tk")
167 "/bin/wish8.6")) ; XXX
168
169 #:modules ((srfi srfi-1)
170 ,@%gnu-build-system-modules)
171 #:phases
172 (alist-cons-after
173 'configure 'patch-makefile-shebangs
174 (lambda _
175 (substitute* "Makefile"
176 (("/bin/sh") (which "sh"))
177 (("/usr/bin/perl") (which "perl"))
178 (("/usr/bin/python") (which "python"))))
179 (alist-cons-after
180 'install 'install-shell-completion
181 (lambda* (#:key outputs #:allow-other-keys)
182 (let* ((out (assoc-ref outputs "out"))
183 (completions (string-append out "/etc/bash_completion.d")))
184 ;; TODO: Install the tcsh and zsh completions in the right place.
185 (mkdir-p completions)
186 (copy-file "contrib/completion/git-completion.bash"
187 (string-append completions "/git"))
188 #t))
189 (alist-cons-after
190 'install 'split
191 (lambda* (#:key inputs outputs #:allow-other-keys)
192 ;; Split the binaries to the various outputs.
193 (let* ((out (assoc-ref outputs "out"))
194 (se (assoc-ref outputs "send-email"))
195 (svn (assoc-ref outputs "svn"))
196 (gui (assoc-ref outputs "gui"))
197 (gitk (string-append out "/bin/gitk"))
198 (gitk* (string-append gui "/bin/gitk"))
199 (git-gui (string-append out "/libexec/git-core/git-gui"))
200 (git-gui* (string-append gui "/libexec/git-core/git-gui"))
201 (git-cit (string-append out "/libexec/git-core/git-citool"))
202 (git-cit* (string-append gui "/libexec/git-core/git-citool"))
203 (git-se (string-append out "/libexec/git-core/git-send-email"))
204 (git-se* (string-append se "/libexec/git-core/git-send-email"))
205 (git-svn (string-append out "/libexec/git-core/git-svn"))
206 (git-svn* (string-append svn "/libexec/git-core/git-svn"))
207 (git-sm (string-append out
208 "/libexec/git-core/git-submodule")))
209 (mkdir-p (string-append gui "/bin"))
210 (mkdir-p (string-append gui "/libexec/git-core"))
211 (mkdir-p (string-append se "/libexec/git-core"))
212 (mkdir-p (string-append svn "/libexec/git-core"))
213
214 (for-each (lambda (old new)
215 (copy-file old new)
216 (delete-file old)
217 (chmod new #o555))
218 (list gitk git-gui git-cit git-se git-svn)
219 (list gitk* git-gui* git-cit* git-se* git-svn*))
220
221 ;; Tell 'git-svn' where Subversion is.
222 (wrap-program git-svn*
223 `("PATH" ":" prefix
224 (,(string-append (assoc-ref inputs "subversion")
225 "/bin")))
226 `("PERL5LIB" ":" prefix
227 (,(string-append (assoc-ref inputs "subversion")
228 "/lib/perl5/site_perl")))
229
230 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
231 ;; help it find 'libsvn_client-1.so'.
232 `("LD_LIBRARY_PATH" ":" prefix
233 (,(string-append (assoc-ref inputs "subversion")
234 "/lib"))))
235
236 ;; Tell 'git-send-email' where perl modules are.
237 (wrap-program git-se*
238 `("PERL5LIB" ":" prefix
239 ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
240 (list
241 ,@(package-propagated-input-refs
242 'inputs
243 (list perl-authen-sasl
244 perl-net-smtp-ssl
245 perl-io-socket-ssl))))))
246
247 ;; Tell 'git-submodule' where Perl is.
248 (wrap-program git-sm
249 `("PATH" ":" prefix
250 (,(string-append (assoc-ref inputs "perl")
251 "/bin"))))
252
253 ;; Tell 'git' to look for core programs in the user's profile.
254 ;; This allows user to install other outputs of this package and
255 ;; have them transparently taken into account. There's a
256 ;; 'GIT_EXEC_PATH' environment variable, but it's supposed to
257 ;; specify a single directory, not a search path.
258 (wrap-program (string-append out "/bin/git")
259 `("PATH" ":" prefix
260 ("$HOME/.guix-profile/libexec/git-core")))))
261 %standard-phases)))))
262
263 (native-search-paths
264 ;; For HTTPS access, Git needs a single-file certificate bundle, specified
265 ;; with $GIT_SSL_CAINFO.
266 ;; FIXME: This variable designates a single file; it is not a search path.
267 (list (search-path-specification
268 (variable "GIT_SSL_CAINFO")
269 (files '("etc/ssl/certs/ca-certificates.crt")))))
270
271 (synopsis "Distributed version control system")
272 (description
273 "Git is a free distributed version control system designed to handle
274 everything from small to very large projects with speed and efficiency.")
275 (license gpl2)
276 (home-page "http://git-scm.com/")))
277
278 (define-public git-manpages
279 ;; Keep in sync with 'git'!
280
281 ;; Granted, we could build the man pages from the 'git' package itself,
282 ;; which contains the real source. However, it would add a dependency on a
283 ;; full XML tool chain, and building it actually takes ages. So we use this
284 ;; lazy approach.
285 (package
286 (name "git-manpages")
287 (version (package-version git))
288 (source (origin
289 (method url-fetch)
290 (uri (string-append
291 "mirror://kernel.org/software/scm/git/git-manpages-"
292 version ".tar.xz"))
293 (sha256
294 (base32
295 "1k24p33v9hvmpkx4l818x1vbdv090kfgwqshhyyl3h9m9b5skqci"))))
296 (build-system trivial-build-system)
297 (arguments
298 '(#:modules ((guix build utils))
299 #:builder
300 (begin
301 (use-modules (guix build utils))
302
303 (let* ((xz (assoc-ref %build-inputs "xz"))
304 (tar (assoc-ref %build-inputs "tar"))
305 (out (assoc-ref %outputs "out"))
306 (man (string-append out "/share/man")))
307 (setenv "PATH" (string-append tar "/bin:" xz "/bin"))
308
309 (mkdir-p man)
310 (with-directory-excursion man
311 (zero? (system* "tar" "xvf"
312 (assoc-ref %build-inputs "source"))))))))
313
314 (native-inputs `(("tar" ,tar)
315 ("xz" ,xz)))
316 (home-page (package-home-page git))
317 (license (package-license git))
318 (synopsis "Man pages of the Git version control system")
319 (description
320 "This package provides the man pages of the Git version control system.
321 This is the documentation displayed when using the '--help' option of a 'git'
322 command.")))
323
324 (define-public shflags
325 (package
326 (name "shflags")
327 (version "1.0.3")
328 (source (origin
329 (method url-fetch)
330 (uri (string-append "https://shflags.googlecode.com/files/"
331 "shflags-" version ".tgz"))
332 (sha256
333 (base32
334 "08laxhf1hifh3w4j0hri5ppcklaqz0mnkmbaz8j0wxih29vi8slm"))))
335 (build-system trivial-build-system)
336 (native-inputs `(("tar" ,tar)
337 ("gzip" ,gzip)))
338 (arguments
339 `(#:modules ((guix build utils))
340 #:builder (begin
341 (use-modules (guix build utils))
342 (let* ((source (assoc-ref %build-inputs "source"))
343 (tar (assoc-ref %build-inputs "tar"))
344 (gzip (assoc-ref %build-inputs "gzip"))
345 (output (assoc-ref %outputs "out"))
346 (srcdir (string-append output "/src")))
347 (begin
348 (setenv "PATH" (string-append gzip "/bin"))
349 (system* (string-append tar "/bin/tar") "xzf"
350 source)
351 (chdir ,(string-append name "-" version))
352 (mkdir-p srcdir)
353 (copy-file "src/shflags"
354 (string-append srcdir "/shflags"))
355 #t)))))
356 (home-page "https://code.google.com/p/shflags/")
357 (synopsis "Command-line flags library for shell scripts")
358 (description
359 "Shell Flags (shFlags) is a library written to greatly simplify the
360 handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
361 ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
362 different versions of getopt on various OSes make writing portable shell
363 scripts difficult. shFlags instead provides an API that doesn't change across
364 shell and OS versions so the script writer can be confident that the script
365 will work.")
366 (license lgpl2.1)))
367
368 (define-public git-flow
369 (package
370 (name "git-flow")
371 ;; This version has not be officially released yet, so we build it
372 ;; directly from the git repository.
373 (version "0.4.2-pre")
374 (source (origin
375 (method git-fetch)
376 (uri (git-reference
377 (url "https://github.com/nvie/gitflow/")
378 (commit "15aab26")))
379 (sha256
380 (base32
381 "01fs97q76fdfnvmrh2cyjhywcs3pykf1dg58sy0frflnsdzs6prx"))))
382 (build-system gnu-build-system)
383 (inputs `(("shflags" ,shflags)))
384 (arguments
385 '(#:tests? #f ; no tests
386 #:make-flags (list (string-append "prefix="
387 (assoc-ref %outputs "out")))
388 #:phases (alist-cons-after
389 'unpack 'reset-shFlags-link
390 (lambda* (#:key inputs #:allow-other-keys)
391 ;; The link points to a file in the shFlags submodule.
392 ;; Redirect it to point to our system shFlags.
393 (let ((shflags (assoc-ref inputs "shflags")))
394 (begin
395 (delete-file "gitflow-shFlags")
396 (symlink (string-append shflags "/src/shflags")
397 "gitflow-shFlags"))))
398 (alist-delete
399 'configure
400 (alist-delete 'build %standard-phases)))))
401 (home-page "http://nvie.com/posts/a-successful-git-branching-model/")
402 (synopsis "Git extensions for Vincent Driessen's branching model")
403 (description
404 "Vincent Driessen's branching model is a git branching and release
405 management strategy that helps developers keep track of features, hotfixes,
406 and releases in bigger software projects. The git-flow library of git
407 subcommands helps automate some parts of the flow to make working with it a
408 lot easier.")
409 (license bsd-2)))
410
411 (define-public git-test-sequence
412 (let ((commit "48e5a2f"))
413 (package
414 (name "git-test-sequence")
415 (version (string-append "20140312." commit))
416 (source (origin
417 (method git-fetch)
418 (uri (git-reference
419 ;; There are many other scripts in this directory; we
420 ;; are interested in just one for this package.
421 (url "https://github.com/dustin/bindir")
422 (commit commit)))
423 (sha256
424 (base32
425 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
426 (build-system trivial-build-system)
427 (arguments
428 `(#:modules ((guix build utils))
429 #:builder (begin
430 (use-modules (guix build utils))
431 (let* ((source (assoc-ref %build-inputs "source"))
432 (output (assoc-ref %outputs "out"))
433 (bindir (string-append output "/bin"))
434 (script "git-test-sequence"))
435 (begin
436 (mkdir-p bindir)
437 (copy-file (string-append source "/" script)
438 (string-append bindir "/" script))
439 #t)))))
440 (home-page "http://dustin.sallings.org/2010/03/28/git-test-sequence.html")
441 (synopsis "Run a command over a sequence of commits")
442 (description
443 "git-test-sequence is similar to an automated git bisect except it’s
444 linear. It will test every change between two points in the DAG. It will
445 also walk each side of a merge and test those changes individually.")
446 (license (x11-style "file://LICENSE")))))
447
448 (define-public gitolite
449 (package
450 (name "gitolite")
451 (version "3.6.2")
452 (source (origin
453 (method url-fetch)
454 (uri (string-append
455 "https://github.com/sitaramc/gitolite/archive/v"
456 version ".tar.gz"))
457 (file-name (string-append name "-" version ".tar.gz"))
458 ;; Commit ed807a4 upstream
459 (patches
460 (list (search-patch "gitolite-openssh-6.8-compat.patch")))
461 (sha256
462 (base32
463 "1gsgzi9ayb4rablki3mqr11b0h8db4xg43df660marfpacmkfb01"))))
464 (build-system gnu-build-system)
465 (arguments
466 '(#:tests? #f ; no tests
467 #:phases (modify-phases %standard-phases
468 (delete 'configure)
469 (delete 'build)
470 (add-before 'install 'patch-scripts
471 (lambda* (#:key inputs #:allow-other-keys)
472 (let ((perl (string-append (assoc-ref inputs "perl")
473 "/bin/perl")))
474 ;; This seems to take care of every shell script that
475 ;; invokes Perl.
476 (substitute* (find-files "." ".*")
477 ((" perl -")
478 (string-append " " perl " -"))))))
479 (replace 'install
480 (lambda* (#:key outputs #:allow-other-keys)
481 (let* ((output (assoc-ref outputs "out"))
482 (sharedir (string-append output "/share/gitolite"))
483 (bindir (string-append output "/bin")))
484 (mkdir-p sharedir)
485 (mkdir-p bindir)
486 (system* "./install" "-to" sharedir)
487 ;; Create symlinks for executable scripts in /bin.
488 (for-each (lambda (script)
489 (symlink (string-append sharedir "/" script)
490 (string-append bindir "/" script)))
491 '("gitolite" "gitolite-shell"))
492 #t))))))
493 (inputs
494 `(("perl" ,perl)))
495 ;; git and openssh are propagated because trying to patch the source via
496 ;; regexp matching is too brittle and prone to false positives.
497 (propagated-inputs
498 `(("git" ,git)
499 ("openssh" ,openssh)))
500 (home-page "http://gitolite.com")
501 (synopsis "Git access control layer")
502 (description
503 "Gitolite is an access control layer on top of Git, providing fine access
504 control to Git repositories.")
505 (license gpl2)))
506
507 (define-public mercurial
508 (package
509 (name "mercurial")
510 (version "3.2.4")
511 (source (origin
512 (method url-fetch)
513 (uri (string-append "http://mercurial.selenic.com/release/mercurial-"
514 version ".tar.gz"))
515 (sha256
516 (base32
517 "1g7nfvapxj5k44dyp0p08v37s0zmrj2vl0rjgfd8297x0afidm08"))))
518 (build-system python-build-system)
519 (arguments
520 `(;; Restrict to Python 2, as Python 3 would require
521 ;; the argument --c2to3.
522 #:python ,python-2
523 ;; FIXME: Disabled tests because they require the nose unit
524 ;; testing framework: https://nose.readthedocs.org/en/latest/ .
525 #:tests? #f))
526 (home-page "http://mercurial.selenic.com")
527 (synopsis "Decentralized version control system")
528 (description
529 "Mercurial is a free, distributed source control management tool.
530 It efficiently handles projects of any size
531 and offers an easy and intuitive interface.")
532 (license gpl2+)))
533
534 (define-public neon
535 (package
536 (name "neon")
537 (version "0.30.0")
538 (source (origin
539 (method url-fetch)
540 (uri (string-append "http://www.webdav.org/neon/neon-"
541 version ".tar.gz"))
542 (sha256
543 (base32
544 "1hlhg5w505jxdvaf7bq17057f6a48dry981g7lp2gwrhbp5wyqi9"))))
545 (build-system gnu-build-system)
546 (native-inputs
547 `(("perl" ,perl)
548 ("pkg-config" ,pkg-config)))
549 (inputs
550 `(("libxml2" ,libxml2)
551 ("openssl" ,openssl)
552 ("zlib" ,zlib)))
553 (arguments
554 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
555 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
556 #:tests? #f
557 #:configure-flags '("--enable-shared"
558 ;; requires libgnutils-config, deprecated
559 ;; in gnutls 2.8.
560 ; "--with-ssl=gnutls")))
561 "--with-ssl=openssl")))
562 (home-page "http://www.webdav.org/neon/")
563 (synopsis "HTTP and WebDAV client library")
564 (description "Neon is an HTTP and WebDAV client library, with a
565 C interface. Features:
566 High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
567 DELETE, etc.);
568 low-level interface to the HTTP request/response engine, allowing the use
569 of arbitrary HTTP methods, headers, etc.;
570 authentication support including Basic and Digest support, along with
571 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
572 SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
573 verifying server certificates, handling client certificates, and examining
574 certificate properties, smartcard-based client certificates are also
575 supported via a PKCS#11 wrapper interface;
576 abstract interface to parsing XML using libxml2 or expat, and wrappers for
577 simplifying handling XML HTTP response bodies;
578 WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
579 property manipulation.")
580 (license gpl2+))) ; for documentation and tests; source under lgpl2.0+
581
582 (define-public subversion
583 (package
584 (name "subversion")
585 (version "1.8.13")
586 (source (origin
587 (method url-fetch)
588 (uri (string-append "http://archive.apache.org/dist/subversion/"
589 "subversion-" version ".tar.bz2"))
590 (sha256
591 (base32
592 "0ybmc0yq83jhblp42wdqvn2cryra3sypx8mkxn5b8lq7hilcr68h"))
593 (patches
594 (list (search-patch "subversion-sqlite-3.8.9-fix.patch")))
595 (patch-flags '("-p0"))))
596 (build-system gnu-build-system)
597 (arguments
598 '(#:phases (alist-cons-after
599 'configure 'patch-libtool-wrapper-ls
600 (lambda* (#:key inputs #:allow-other-keys)
601 ;; This substitution allows tests svnauthz_tests and
602 ;; svnlook_tests to pass. These tests execute svnauthz and
603 ;; svnlook through their libtool wrapper scripts from svn
604 ;; hooks, whose empty environments cause "ls: command not
605 ;; found" errors. It would be nice if this fix ultimately
606 ;; made its way into libtool.
607 (let ((coreutils (assoc-ref inputs "coreutils")))
608 (substitute* "libtool"
609 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))))
610 (alist-cons-after
611 'install 'install-perl-bindings
612 (lambda* (#:key outputs #:allow-other-keys)
613 ;; Follow the instructions from
614 ;; 'subversion/bindings/swig/INSTALL'.
615 (let ((out (assoc-ref outputs "out")))
616 (and (zero? (system* "make" "swig-pl-lib"))
617 ;; FIXME: Test failures.
618 ;; (zero? (system* "make" "check-swig-pl"))
619 (zero? (system* "make" "install-swig-pl-lib"))
620
621 ;; Set the right installation prefix.
622 (with-directory-excursion
623 "subversion/bindings/swig/perl/native"
624 (and (zero?
625 (system* "perl" "Makefile.PL"
626 (string-append "PREFIX=" out)))
627 (zero?
628 (system* "make" "install"
629 (string-append "OTHERLDFLAGS="
630 "-Wl,-rpath="
631 out "/lib"))))))))
632 %standard-phases))))
633 (native-inputs
634 `(("pkg-config" ,pkg-config)
635 ;; For the Perl bindings.
636 ("swig" ,swig)))
637 (inputs
638 `(("apr" ,apr)
639 ("apr-util" ,apr-util)
640 ("serf" ,serf)
641 ("perl" ,perl)
642 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
643 ("sqlite" ,sqlite)
644 ("zlib" ,zlib)))
645 (home-page "http://subversion.apache.org/")
646 (synopsis "Revision control system")
647 (description
648 "Subversion exists to be universally recognized and adopted as a
649 centralized version control system characterized by its
650 reliability as a safe haven for valuable data; the simplicity of its model and
651 usage; and its ability to support the needs of a wide variety of users and
652 projects, from individuals to large-scale enterprise operations.")
653 (license asl2.0)))
654
655 (define-public rcs
656 (package
657 (name "rcs")
658 (version "5.9.4")
659 (source (origin
660 (method url-fetch)
661 (uri (string-append "mirror://gnu/rcs/rcs-"
662 version ".tar.xz"))
663 (sha256
664 (base32
665 "1zsx7bb0rgvvvisiy4zlixf56ay8wbd9qqqcp1a1g0m1gl6mlg86"))))
666 (build-system gnu-build-system)
667 (native-inputs `(("ed" ,ed)))
668 (home-page "http://www.gnu.org/software/rcs/")
669 (synopsis "Per-file local revision control system")
670 (description
671 "RCS is the original Revision Control System. It works on a
672 file-by-file basis, in contrast to subsequent version control systems such as
673 CVS, Subversion, and Git. This can make it suitable for system
674 administration files, for example, which are often inherently local to one
675 machine.")
676 (license gpl3+)))
677
678 (define-public cvs
679 (package
680 (name "cvs")
681 (version "1.12.13")
682 (source (origin
683 (method url-fetch)
684 (uri (string-append
685 "http://ftp.gnu.org/non-gnu/cvs/source/feature/"
686 version "/cvs-" version ".tar.bz2"))
687 (sha256
688 (base32
689 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
690 (build-system gnu-build-system)
691 (arguments
692 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
693 '(#:tests? #f))
694 (inputs `(("zlib" ,zlib)
695 ("nano" ,nano))) ; the default editor
696 (home-page "http://cvs.nongnu.org")
697 (synopsis "Historical centralized version control system")
698 (description
699 "CVS is a version control system, an important component of Source
700 Configuration Management (SCM). Using it, you can record the history of
701 sources files, and documents. It fills a similar role to the free software
702 RCS, PRCS, and Aegis packages.")
703 (license gpl1+)))
704
705 (define-public vc-dwim
706 (package
707 (name "vc-dwim")
708 (version "1.7")
709 (source (origin
710 (method url-fetch)
711 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
712 version ".tar.xz"))
713 (sha256
714 (base32
715 "094pjwshvazlgagc254in2xvrp93vhcj0kb5ms17qs7sch99x9z2"))))
716 (build-system gnu-build-system)
717 (inputs `(("perl" ,perl)
718 ("inetutils" ,inetutils) ; for `hostname', used in the tests
719 ("emacs" ,emacs-no-x))) ; for `ctags'
720 (home-page "http://www.gnu.org/software/vc-dwim/")
721 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
722 (description
723 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
724 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
725 using version control at the same time, for example by printing a reminder
726 when a file change has been described in the ChangeLog but the file has not
727 been added to the VC. vc-chlog scans changed files and generates
728 standards-compliant ChangeLog entries based on the changes that it detects.")
729 (license gpl3+)))
730
731 (define-public diffstat
732 (package
733 (name "diffstat")
734 (version "1.58")
735 (source (origin
736 (method url-fetch)
737 (uri (string-append
738 "ftp://invisible-island.net/diffstat/diffstat-"
739 version ".tgz"))
740 (sha256
741 (base32
742 "14rpf5c05ff30f6vn6pn6pzy0k4g4is5im656ahsxff3k58i7mgs"))))
743 (build-system gnu-build-system)
744 (home-page "http://invisible-island.net/diffstat/")
745 (synopsis "Make histograms from the output of 'diff'")
746 (description
747 "Diffstat reads the output of 'diff' and displays a histogram of the
748 insertions, deletions, and modifications per-file. It is useful for reviewing
749 large, complex patch files.")
750 (license (x11-style "file://COPYING"))))
751
752 (define-public cssc
753 (package
754 (name "cssc")
755 (version "1.3.0")
756 (source (origin
757 (method url-fetch)
758 (uri (string-append "mirror://gnu/" name "/CSSC-"
759 version ".tar.gz"))
760 (sha256
761 (base32
762 "0bkw6fjh20ppvn54smv05461lm1vcwvn02avx941c4acafmkl1cm"))
763 (patches (list (search-patch "cssc-gets-undeclared.patch")
764 (search-patch "cssc-missing-include.patch")))))
765 (build-system gnu-build-system)
766 (arguments
767 `(#:phases (alist-cons-before
768 'check 'precheck
769 (lambda _
770 (begin
771 (substitute* "tests/common/test-common"
772 (("/bin/pwd") (which "pwd")))
773
774 (substitute* "tests/prt/all-512.sh"
775 (("/bin/sh") (which "sh")))
776
777 ;; XXX: This test has no hope of passing until there is a "nogroup"
778 ;; entry (or at least some group to which the guix builder does
779 ;; not belong) in the /etc/group file of the build environment.
780 ;; Currently we do not have such a group. Disable this test for now.
781 (substitute* "tests/Makefile"
782 (("test-delta ") ""))))
783 %standard-phases)))
784 ;; These are needed for the tests
785 (native-inputs `(("git" ,git)
786 ("cvs" ,cvs)))
787 (home-page "http://www.gnu.org/software/cssc/")
788 (synopsis "File-based version control like SCCS")
789 (description "GNU CSSC provides a replacement for the legacy Unix source
790 code control system SCCS. This allows old code still under that system to be
791 accessed and migrated on modern systems.")
792 (license gpl3+)))
793
794 ;; This package can unfortunately work only in -TEST mode, since Aegis
795 ;; requires that it is installed setuid root.
796 (define-public aegis
797 (package
798 (name "aegis")
799 (version "4.24")
800 (source (origin
801 (method url-fetch)
802 (uri (string-append "mirror://sourceforge/aegis/aegis-"
803 version ".tar.gz"))
804 (sha256
805 (base32
806 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
807 (patches (list (search-patch "aegis-perl-tempdir1.patch")
808 (search-patch "aegis-perl-tempdir2.patch")
809 (search-patch "aegis-test-fixup-1.patch")
810 (search-patch "aegis-test-fixup-2.patch")
811 (search-patch "aegis-constness-error.patch")))))
812 (build-system gnu-build-system)
813 (inputs
814 `(("e2fsprogs" ,e2fsprogs)
815 ("curl" ,curl)
816 ("file" ,file)
817 ("libxml2" ,libxml2)
818 ("zlib" ,zlib)
819 ("gettext" ,gnu-gettext)))
820 (native-inputs
821 `(("bison" ,bison)
822 ("groff" ,groff)
823 ("perl" ,perl)
824 ;; Various tests require the following:
825 ("cvs" ,cvs)
826 ("flex" ,flex)
827 ("cook" ,cook)
828 ("subversion" ,subversion)
829 ("rcs" ,rcs)
830 ("ed" ,ed)))
831 (arguments
832 `(#:configure-flags (list "--with-no-aegis-configured"
833 "--sharedstatedir=/var/com/aegis")
834 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
835 #:phases
836 (alist-cons-before
837 'configure 'pre-conf
838 (lambda _
839 (substitute* (append '("configure"
840 "etc/check-tar-gz.sh"
841 "etc/patches.sh"
842 "etc/test.sh"
843 "script/aexver.in"
844 "script/aebisect.in"
845 "script/aeintegratq.in"
846 "script/tkaegis.in"
847 "script/test_funcs.in"
848 "web/eg_oss_templ.sh"
849 "web/webiface.html"
850 "libaegis/getpw_cache.cc")
851 (find-files "test" "\\.sh"))
852 (("/bin/sh") (which "sh")))
853 (setenv "SH" (which "sh")))
854 (alist-replace
855 'check
856 (lambda _
857 (let ((home (string-append (getcwd) "/my-new-home")))
858 ;; Some tests need to write to $HOME.
859 (mkdir home)
860 (setenv "HOME" home)
861
862 ;; This test assumes that flex has been symlinked to "lex".
863 (substitute* "test/00/t0011a.sh"
864 (("type lex") "type flex"))
865
866 ;; The author decided to call the check rule "sure".
867 (zero? (system* "make" "sure"))))
868 %standard-phases))))
869 (home-page "http://aegis.sourceforge.net")
870 (synopsis "Project change supervisor")
871 (description "Aegis is a project change supervisor, and performs some of
872 the Software Configuration Management needed in a CASE environment. Aegis
873 provides a framework within which a team of developers may work on many
874 changes to a program independently, and Aegis coordinates integrating these
875 changes back into the master source of the program, with as little disruption
876 as possible. Resolution of contention for source files, a major headache for
877 any project with more than one developer, is one of Aegis's major functions.")
878 (license gpl3+)))
879
880 (define-public tig
881 (package
882 (name "tig")
883 (version "2.1")
884 (source (origin
885 (method url-fetch)
886 (uri (string-append
887 "http://jonas.nitro.dk/tig/releases/tig-"
888 version ".tar.gz"))
889 (sha256
890 (base32
891 "1c1w6w39a1dwx4whrg0ga1mhrlz095hz875z7ajn6xgmhkv8fqih"))))
892 (build-system gnu-build-system)
893 (inputs
894 `(("ncurses" ,ncurses)))
895 (arguments
896 `(#:tests? #f)) ; no tests implemented
897 (home-page "http://jonas.nitro.dk/tig/")
898 (synopsis "Ncurses-based text user interface for Git")
899 (description
900 "Tig is an ncurses text user interface for Git, primarily intended as
901 a history browser. It can also stage hunks for commit, or colorize the
902 output of the 'git' command.")
903 (license gpl2+)))