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 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
6 ;;; Copyright © 2014 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 gnutls)
48 #:use-module (gnu packages nano)
49 #:use-module (gnu packages openssl)
50 #:use-module (gnu packages perl)
51 #:use-module (gnu packages pkg-config)
52 #:use-module (gnu packages python)
53 #:use-module (gnu packages databases)
54 #:use-module (gnu packages admin)
55 #:use-module (gnu packages xml)
56 #:use-module (gnu packages emacs)
57 #:use-module (gnu packages compression)
58 #:use-module (gnu packages swig)
59 #:use-module (gnu packages tcl)
60 #:use-module (gnu packages))
61
62 (define-public bazaar
63 (package
64 (name "bazaar")
65 (version "2.6.0")
66 (source
67 (origin
68 (method url-fetch)
69 (uri (string-append "https://launchpad.net/bzr/2.6/" version
70 "/+download/bzr-" version ".tar.gz"))
71 (sha256
72 (base32
73 "1c6sj77h5f97qimjc14kr532kgc0jk3wq778xrkqi0pbh9qpk509"))))
74 (build-system python-build-system)
75 (inputs
76 ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh'
77 ;; require Zsh.
78 `(("gettext" ,gnu-gettext)))
79 (arguments
80 `(#:tests? #f ; no test target
81 #:python ,python-2 ; Python 3 apparently not yet supported, see
82 ; https://answers.launchpad.net/bzr/+question/229048
83 #:phases (alist-cons-after
84 'unpack 'fix-mandir
85 (lambda _
86 (substitute* "setup.py"
87 (("man/man1") "share/man/man1")))
88 %standard-phases)))
89 (home-page "https://gnu.org/software/bazaar")
90 (synopsis "Version control system supporting both distributed and centralized workflows")
91 (description
92 "GNU Bazaar is a version control system that allows you to record
93 changes to project files over time. It supports both a distributed workflow
94 as well as the classic centralized workflow.")
95 (license gpl2+)))
96
97 (define-public git
98 (package
99 (name "git")
100 (version "2.1.2")
101 (source (origin
102 (method url-fetch)
103 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
104 version ".tar.xz"))
105 (sha256
106 (base32
107 "12x1qycc0rii6fqpiizp9v9ysdmj6lpi9imqqbrkdx6cifbwh9vv"))))
108 (build-system gnu-build-system)
109 (native-inputs
110 `(("native-perl" ,perl)
111 ("gettext" ,gnu-gettext)))
112 (inputs
113 `(("curl" ,curl)
114 ("expat" ,expat)
115 ("openssl" ,openssl)
116 ("perl" ,perl)
117 ("python" ,python-2) ; CAVEAT: incompatible with python-3 according to INSTALL
118 ("zlib" ,zlib)
119
120 ;; For 'git-svn'.
121 ("subversion" ,subversion)
122
123 ;; For 'git gui', 'gitk', and 'git citool'.
124 ("tcl" ,tcl)
125 ("tk" ,tk)))
126 (outputs '("out" ; the core
127 "svn" ; git-svn
128 "gui")) ; gitk, git gui
129 (arguments
130 `(#:make-flags `("V=1") ; more verbose compilation
131 #:test-target "test"
132 #:tests? #f ; FIXME: Many tests are failing
133
134 ;; The explicit --with-tcltk forces the build system to hardcode the
135 ;; absolute file name to 'wish'.
136 #:configure-flags (list (string-append "--with-tcltk="
137 (assoc-ref %build-inputs "tk")
138 "/bin/wish8.6")) ; XXX
139
140 #:phases
141 (alist-cons-after
142 'configure 'patch-makefile-shebangs
143 (lambda _
144 (substitute* "Makefile"
145 (("/bin/sh") (which "sh"))
146 (("/usr/bin/perl") (which "perl"))
147 (("/usr/bin/python") (which "python"))))
148 (alist-cons-after
149 'install 'split
150 (lambda* (#:key inputs outputs #:allow-other-keys)
151 ;; Split the binaries to the various outputs.
152 (let* ((out (assoc-ref outputs "out"))
153 (svn (assoc-ref outputs "svn"))
154 (gui (assoc-ref outputs "gui"))
155 (gitk (string-append out "/bin/gitk"))
156 (gitk* (string-append gui "/bin/gitk"))
157 (git-gui (string-append out "/libexec/git-core/git-gui"))
158 (git-gui* (string-append gui "/libexec/git-core/git-gui"))
159 (git-cit (string-append out "/libexec/git-core/git-citool"))
160 (git-cit* (string-append gui "/libexec/git-core/git-citool"))
161 (git-svn (string-append out "/libexec/git-core/git-svn"))
162 (git-svn* (string-append svn "/libexec/git-core/git-svn"))
163 (git-sm (string-append out
164 "/libexec/git-core/git-submodule")))
165 (mkdir-p (string-append gui "/bin"))
166 (mkdir-p (string-append gui "/libexec/git-core"))
167 (mkdir-p (string-append svn "/libexec/git-core"))
168
169 (for-each (lambda (old new)
170 (copy-file old new)
171 (delete-file old)
172 (chmod new #o555))
173 (list gitk git-gui git-cit git-svn)
174 (list gitk* git-gui* git-cit* git-svn*))
175
176 ;; Tell 'git-svn' where Subversion is.
177 (wrap-program git-svn*
178 `("PATH" ":" prefix
179 (,(string-append (assoc-ref inputs "subversion")
180 "/bin")))
181 `("PERL5LIB" ":" prefix
182 (,(string-append (assoc-ref inputs "subversion")
183 "/lib/perl5/site_perl")))
184
185 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
186 ;; help it find 'libsvn_client-1.so'.
187 `("LD_LIBRARY_PATH" ":" prefix
188 (,(string-append (assoc-ref inputs "subversion")
189 "/lib"))))
190
191 ;; Tell 'git-submodule' where Perl is.
192 (wrap-program git-sm
193 `("PATH" ":" prefix
194 (,(string-append (assoc-ref inputs "perl")
195 "/bin"))))
196
197 ;; Tell 'git' to look for core programs in the user's profile.
198 ;; This allows user to install other outputs of this package and
199 ;; have them transparently taken into account. There's a
200 ;; 'GIT_EXEC_PATH' environment variable, but it's supposed to
201 ;; specify a single directory, not a search path.
202 (wrap-program (string-append out "/bin/git")
203 `("PATH" ":" prefix
204 ("$HOME/.guix-profile/libexec/git-core")))))
205 %standard-phases))))
206 (synopsis "Distributed version control system")
207 (description
208 "Git is a free distributed version control system designed to handle
209 everything from small to very large projects with speed and efficiency.")
210 (license gpl2)
211 (home-page "http://git-scm.com/")))
212
213 (define-public shflags
214 (package
215 (name "shflags")
216 (version "1.0.3")
217 (source (origin
218 (method url-fetch)
219 (uri (string-append "https://shflags.googlecode.com/files/"
220 "shflags-" version ".tgz"))
221 (sha256
222 (base32
223 "08laxhf1hifh3w4j0hri5ppcklaqz0mnkmbaz8j0wxih29vi8slm"))))
224 (build-system trivial-build-system)
225 (native-inputs `(("tar" ,tar)
226 ("gzip" ,gzip)))
227 (arguments
228 `(#:modules ((guix build utils))
229 #:builder (begin
230 (use-modules (guix build utils))
231 (let* ((source (assoc-ref %build-inputs "source"))
232 (tar (assoc-ref %build-inputs "tar"))
233 (gzip (assoc-ref %build-inputs "gzip"))
234 (output (assoc-ref %outputs "out"))
235 (srcdir (string-append output "/src")))
236 (begin
237 (setenv "PATH" (string-append gzip "/bin"))
238 (system* (string-append tar "/bin/tar") "xzf"
239 source)
240 (chdir ,(string-append name "-" version))
241 (mkdir-p srcdir)
242 (copy-file "src/shflags"
243 (string-append srcdir "/shflags"))
244 #t)))))
245 (home-page "https://code.google.com/p/shflags/")
246 (synopsis "Command-line flags library for shell scripts")
247 (description
248 "Shell Flags (shFlags) is a library written to greatly simplify the
249 handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
250 ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
251 different versions of getopt on various OSes make writing portable shell
252 scripts difficult. shFlags instead provides an API that doesn't change across
253 shell and OS versions so the script writer can be confident that the script
254 will work.")
255 (license lgpl2.1)))
256
257 (define-public git-flow
258 (package
259 (name "git-flow")
260 ;; This version has not be officially released yet, so we build it
261 ;; directly from the git repository.
262 (version "0.4.2-pre")
263 (source (origin
264 (method git-fetch)
265 (uri (git-reference
266 (url "https://github.com/nvie/gitflow/")
267 (commit "15aab26")))
268 (sha256
269 (base32
270 "01fs97q76fdfnvmrh2cyjhywcs3pykf1dg58sy0frflnsdzs6prx"))))
271 (build-system gnu-build-system)
272 (inputs `(("shflags" ,shflags)))
273 (arguments
274 '(#:tests? #f ; no tests
275 #:make-flags (list (string-append "prefix="
276 (assoc-ref %outputs "out")))
277 #:phases (alist-cons-after
278 'unpack 'reset-shFlags-link
279 (lambda* (#:key inputs #:allow-other-keys)
280 ;; The link points to a file in the shFlags submodule.
281 ;; Redirect it to point to our system shFlags.
282 (let ((shflags (assoc-ref inputs "shflags")))
283 (begin
284 (delete-file "gitflow-shFlags")
285 (symlink (string-append shflags "/src/shflags")
286 "gitflow-shFlags"))))
287 (alist-delete
288 'configure
289 (alist-delete 'build %standard-phases)))))
290 (home-page "http://nvie.com/posts/a-successful-git-branching-model/")
291 (synopsis "Git extensions for Vincent Driessen's branching model")
292 (description
293 "Vincent Driessen's branching model is a git branching and release
294 management strategy that helps developers keep track of features, hotfixes,
295 and releases in bigger software projects. The git-flow library of git
296 subcommands helps automate some parts of the flow to make working with it a
297 lot easier.")
298 (license bsd-2)))
299
300 (define-public git-test-sequence
301 (let ((commit "48e5a2f"))
302 (package
303 (name "git-test-sequence")
304 (version (string-append "20140312." commit))
305 (source (origin
306 (method git-fetch)
307 (uri (git-reference
308 ;; There are many other scripts in this directory; we
309 ;; are interested in just one for this package.
310 (url "https://github.com/dustin/bindir")
311 (commit commit)))
312 (sha256
313 (base32
314 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
315 (build-system trivial-build-system)
316 (arguments
317 `(#:modules ((guix build utils))
318 #:builder (begin
319 (use-modules (guix build utils))
320 (let* ((source (assoc-ref %build-inputs "source"))
321 (output (assoc-ref %outputs "out"))
322 (bindir (string-append output "/bin"))
323 (script "git-test-sequence"))
324 (begin
325 (mkdir-p bindir)
326 (copy-file (string-append source "/" script)
327 (string-append bindir "/" script))
328 #t)))))
329 (home-page "http://dustin.sallings.org/2010/03/28/git-test-sequence.html")
330 (synopsis "Run a command over a sequence of commits")
331 (description
332 "git-test-sequence is similar to an automated git bisect except it’s
333 linear. It will test every change between two points in the DAG. It will
334 also walk each side of a merge and test those changes individually.")
335 (license (x11-style "file://LICENSE")))))
336
337 (define-public mercurial
338 (package
339 (name "mercurial")
340 (version "2.7.1")
341 (source (origin
342 (method url-fetch)
343 (uri (string-append "http://mercurial.selenic.com/release/mercurial-"
344 version ".tar.gz"))
345 (sha256
346 (base32
347 "121m8f7vmipmdg00cnzdz2rjkgydh28mwfirqkrbs5fv089vywl4"))))
348 (build-system python-build-system)
349 (arguments
350 `(;; Restrict to Python 2, as Python 3 would require
351 ;; the argument --c2to3.
352 #:python ,python-2
353 ;; FIXME: Disabled tests because they require the nose unit
354 ;; testing framework: https://nose.readthedocs.org/en/latest/ .
355 #:tests? #f))
356 (home-page "http://mercurial.selenic.com")
357 (synopsis "Decentralized version control system")
358 (description
359 "Mercurial is a free, distributed source control management tool.
360 It efficiently handles projects of any size
361 and offers an easy and intuitive interface.")
362 (license gpl2+)))
363
364 (define-public neon
365 (package
366 (name "neon")
367 (version "0.30.0")
368 (source (origin
369 (method url-fetch)
370 (uri (string-append "http://www.webdav.org/neon/neon-"
371 version ".tar.gz"))
372 (sha256
373 (base32
374 "1hlhg5w505jxdvaf7bq17057f6a48dry981g7lp2gwrhbp5wyqi9"))))
375 (build-system gnu-build-system)
376 (native-inputs
377 `(("perl" ,perl)
378 ("pkg-config" ,pkg-config)))
379 (inputs
380 `(("libxml2" ,libxml2)
381 ("openssl" ,openssl)
382 ("zlib" ,zlib)))
383 (arguments
384 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
385 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
386 #:tests? #f
387 #:configure-flags '("--enable-shared"
388 ;; requires libgnutils-config, deprecated
389 ;; in gnutls 2.8.
390 ; "--with-ssl=gnutls")))
391 "--with-ssl=openssl")))
392 (home-page "http://www.webdav.org/neon/")
393 (synopsis "HTTP and WebDAV client library")
394 (description "Neon is an HTTP and WebDAV client library, with a
395 C interface. Features:
396 High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
397 DELETE, etc.);
398 low-level interface to the HTTP request/response engine, allowing the use
399 of arbitrary HTTP methods, headers, etc.;
400 authentication support including Basic and Digest support, along with
401 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
402 SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
403 verifying server certificates, handling client certificates, and examining
404 certificate properties, smartcard-based client certificates are also
405 supported via a PKCS#11 wrapper interface;
406 abstract interface to parsing XML using libxml2 or expat, and wrappers for
407 simplifying handling XML HTTP response bodies;
408 WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
409 property manipulation.")
410 (license gpl2+))) ; for documentation and tests; source under lgpl2.0+
411
412 (define-public neon-0.29.6
413 (package (inherit neon)
414 (name "neon")
415 (version "0.29.6")
416 (source (origin
417 (method url-fetch)
418 (uri (string-append "http://www.webdav.org/neon/neon-"
419 version ".tar.gz"))
420 (sha256
421 (base32
422 "0hzbjqdx1z8zw0vmbknf159wjsxbcq8ii0wgwkqhxj3dimr0nr4w"))))))
423
424 (define-public subversion
425 (package
426 (name "subversion")
427 (version "1.7.18")
428 (source (origin
429 (method url-fetch)
430 (uri (string-append "http://archive.apache.org/dist/subversion/"
431 "subversion-" version ".tar.bz2"))
432 (sha256
433 (base32
434 "06nrqnn3qq1hhskkcdbm0ilk2xv6ay2gyf2c7qvxp6xncb782wzn"))))
435 (build-system gnu-build-system)
436 (arguments
437 '(#:phases (alist-cons-after
438 'configure 'patch-libtool-wrapper-ls
439 (lambda* (#:key inputs #:allow-other-keys)
440 ;; This substitution allows tests svnauthz_tests and
441 ;; svnlook_tests to pass. These tests execute svnauthz and
442 ;; svnlook through their libtool wrapper scripts from svn
443 ;; hooks, whose empty environments cause "ls: command not
444 ;; found" errors. It would be nice if this fix ultimately
445 ;; made its way into libtool.
446 (let ((coreutils (assoc-ref inputs "coreutils")))
447 (substitute* "libtool"
448 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))))
449 (alist-cons-after
450 'install 'instal-perl-bindings
451 (lambda* (#:key outputs #:allow-other-keys)
452 ;; Follow the instructions from
453 ;; 'subversion/bindings/swig/INSTALL'.
454 (let ((out (assoc-ref outputs "out")))
455 (and (zero? (system* "make" "swig-pl-lib"))
456 ;; FIXME: Test failures.
457 ;; (zero? (system* "make" "check-swig-pl"))
458 (zero? (system* "make" "install-swig-pl-lib"))
459
460 ;; Set the right installation prefix.
461 (with-directory-excursion
462 "subversion/bindings/swig/perl/native"
463 (and (zero?
464 (system* "perl" "Makefile.PL"
465 (string-append "PREFIX=" out)))
466 (zero?
467 (system* "make" "install")))))))
468 %standard-phases))))
469 (native-inputs
470 `(("pkg-config" ,pkg-config)
471 ;; For the Perl bindings.
472 ("swig" ,swig)))
473 (inputs
474 `(("apr" ,apr)
475 ("apr-util" ,apr-util)
476 ("neon" ,neon-0.29.6)
477 ("perl" ,perl)
478 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
479 ("sqlite" ,sqlite)
480 ("zlib" ,zlib)))
481 (home-page "http://subversion.apache.org/")
482 (synopsis "Revision control system")
483 (description
484 "Subversion exists to be universally recognized and adopted as a
485 centralized version control system characterized by its
486 reliability as a safe haven for valuable data; the simplicity of its model and
487 usage; and its ability to support the needs of a wide variety of users and
488 projects, from individuals to large-scale enterprise operations.")
489 (license asl2.0)))
490
491 (define-public rcs
492 (package
493 (name "rcs")
494 (version "5.9.3")
495 (source (origin
496 (method url-fetch)
497 (uri (string-append "mirror://gnu/rcs/rcs-"
498 version ".tar.xz"))
499 (sha256
500 (base32
501 "0isvzwfvqkg7zcsznra6wqh650z49ib113n7gp6ncxv5p30x3c38"))))
502 (build-system gnu-build-system)
503 (native-inputs `(("ed" ,ed)))
504 (home-page "http://www.gnu.org/software/rcs/")
505 (synopsis "Per-file local revision control system")
506 (description
507 "RCS is the original Revision Control System. It works on a
508 file-by-file basis, in contrast to subsequent version control systems such as
509 CVS, Subversion, and Git. This can make it suitable for system
510 administration files, for example, which are often inherently local to one
511 machine.")
512 (license gpl3+)))
513
514 (define-public cvs
515 (package
516 (name "cvs")
517 (version "1.12.13")
518 (source (origin
519 (method url-fetch)
520 (uri (string-append
521 "http://ftp.gnu.org/non-gnu/cvs/source/feature/"
522 version "/cvs-" version ".tar.bz2"))
523 (sha256
524 (base32
525 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
526 (build-system gnu-build-system)
527 (arguments
528 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
529 '(#:tests? #f))
530 (inputs `(("zlib" ,zlib)
531 ("nano" ,nano))) ; the default editor
532 (home-page "http://cvs.nongnu.org")
533 (synopsis "Historical centralized version control system")
534 (description
535 "CVS is a version control system, an important component of Source
536 Configuration Management (SCM). Using it, you can record the history of
537 sources files, and documents. It fills a similar role to the free software
538 RCS, PRCS, and Aegis packages.")
539 (license gpl1+)))
540
541 (define-public vc-dwim
542 (package
543 (name "vc-dwim")
544 (version "1.7")
545 (source (origin
546 (method url-fetch)
547 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
548 version ".tar.xz"))
549 (sha256
550 (base32
551 "094pjwshvazlgagc254in2xvrp93vhcj0kb5ms17qs7sch99x9z2"))))
552 (build-system gnu-build-system)
553 (inputs `(("perl" ,perl)
554 ("inetutils" ,inetutils) ; for `hostname', used in the tests
555 ("emacs" ,emacs))) ; for `ctags'
556 (home-page "http://www.gnu.org/software/vc-dwim/")
557 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
558 (description
559 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
560 vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
561 using version control at the same time, for example by printing a reminder
562 when a file change has been described in the ChangeLog but the file has not
563 been added to the VC. vc-chlog scans changed files and generates
564 standards-compliant ChangeLog entries based on the changes that it detects.")
565 (license gpl3+)))
566
567 (define-public diffstat
568 (package
569 (name "diffstat")
570 (version "1.58")
571 (source (origin
572 (method url-fetch)
573 (uri (string-append
574 "ftp://invisible-island.net/diffstat/diffstat-"
575 version ".tgz"))
576 (sha256
577 (base32
578 "14rpf5c05ff30f6vn6pn6pzy0k4g4is5im656ahsxff3k58i7mgs"))))
579 (build-system gnu-build-system)
580 (home-page "http://invisible-island.net/diffstat/")
581 (synopsis "Make histograms from the output of 'diff'")
582 (description
583 "Diffstat reads the output of 'diff' and displays a histogram of the
584 insertions, deletions, and modifications per-file. It is useful for reviewing
585 large, complex patch files.")
586 (license (x11-style "file://COPYING"))))
587
588 (define-public cssc
589 (package
590 (name "cssc")
591 (version "1.3.0")
592 (source (origin
593 (method url-fetch)
594 (uri (string-append "mirror://gnu/" name "/CSSC-"
595 version ".tar.gz"))
596 (sha256
597 (base32
598 "0bkw6fjh20ppvn54smv05461lm1vcwvn02avx941c4acafmkl1cm"))
599 (patches (list (search-patch "cssc-gets-undeclared.patch")
600 (search-patch "cssc-missing-include.patch")))))
601 (build-system gnu-build-system)
602 (arguments
603 `(#:phases (alist-cons-before
604 'check 'precheck
605 (lambda _
606 (begin
607 (substitute* "tests/common/test-common"
608 (("/bin/pwd") (which "pwd")))
609
610 (substitute* "tests/prt/all-512.sh"
611 (("/bin/sh") (which "sh")))
612
613 ;; XXX: This test has no hope of passing until there is a "nogroup"
614 ;; entry (or at least some group to which the guix builder does
615 ;; not belong) in the /etc/group file of the build environment.
616 ;; Currently we do not have such a group. Disable this test for now.
617 (substitute* "tests/Makefile"
618 (("test-delta ") ""))))
619 %standard-phases)))
620 ;; These are needed for the tests
621 (native-inputs `(("git" ,git)
622 ("cvs" ,cvs)))
623 (home-page "http://www.gnu.org/software/cssc/")
624 (synopsis "File-based version control like SCCS")
625 (description "GNU CSSC provides a replacement for the legacy Unix source
626 code control system SCCS. This allows old code still under that system to be
627 accessed and migrated on modern systems.")
628 (license gpl3+)))
629
630 ;; This package can unfortunately work only in -TEST mode, since Aegis
631 ;; requires that it is installed setuid root.
632 (define-public aegis
633 (package
634 (name "aegis")
635 (version "4.24")
636 (source (origin
637 (method url-fetch)
638 (uri (string-append "mirror://sourceforge/aegis/aegis-"
639 version ".tar.gz"))
640 (sha256
641 (base32
642 "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
643 (patches (list (search-patch "aegis-perl-tempdir1.patch")
644 (search-patch "aegis-perl-tempdir2.patch")
645 (search-patch "aegis-test-fixup-1.patch")
646 (search-patch "aegis-test-fixup-2.patch")
647 (search-patch "aegis-constness-error.patch")))))
648 (build-system gnu-build-system)
649 (inputs
650 `(("e2fsprogs" ,e2fsprogs)
651 ("curl" ,curl)
652 ("file" ,file)
653 ("libxml2" ,libxml2)
654 ("zlib" ,zlib)
655 ("gettext" ,gnu-gettext)))
656 (native-inputs
657 `(("bison" ,bison)
658 ("groff" ,groff)
659 ("perl" ,perl)
660 ;; Various tests require the following:
661 ("cvs" ,cvs)
662 ("flex" ,flex)
663 ("cook" ,cook)
664 ("subversion" ,subversion)
665 ("rcs" ,rcs)
666 ("ed" ,ed)))
667 (arguments
668 `(#:configure-flags (list "--with-no-aegis-configured"
669 "--sharedstatedir=/var/com/aegis")
670 #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
671 #:phases
672 (alist-cons-before
673 'configure 'pre-conf
674 (lambda _
675 (substitute* (append '("configure"
676 "etc/check-tar-gz.sh"
677 "etc/patches.sh"
678 "etc/test.sh"
679 "script/aexver.in"
680 "script/aebisect.in"
681 "script/aeintegratq.in"
682 "script/tkaegis.in"
683 "script/test_funcs.in"
684 "web/eg_oss_templ.sh"
685 "web/webiface.html"
686 "libaegis/getpw_cache.cc")
687 (find-files "test" "\\.sh"))
688 (("/bin/sh") (which "sh")))
689 (setenv "SH" (which "sh")))
690 (alist-replace
691 'check
692 (lambda _
693 (let ((home (string-append (getcwd) "/my-new-home")))
694 ;; Some tests need to write to $HOME.
695 (mkdir home)
696 (setenv "HOME" home)
697
698 ;; This test assumes that flex has been symlinked to "lex".
699 (substitute* "test/00/t0011a.sh"
700 (("type lex") "type flex"))
701
702 ;; The author decided to call the check rule "sure".
703 (zero? (system* "make" "sure"))))
704 %standard-phases))))
705 (home-page "http://aegis.sourceforge.net")
706 (synopsis "Project change supervisor")
707 (description "Aegis is a project change supervisor, and performs some of
708 the Software Configuration Management needed in a CASE environment. Aegis
709 provides a framework within which a team of developers may work on many
710 changes to a program independently, and Aegis coordinates integrating these
711 changes back into the master source of the program, with as little disruption
712 as possible. Resolution of contention for source files, a major headache for
713 any project with more than one developer, is one of Aegis's major functions.")
714 (license gpl3+)))