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