Commit | Line | Data |
---|---|---|
dcee3fc5 NK |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> | |
cf3fe3b0 | 3 | ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> |
a4572a17 | 4 | ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> |
d9ff410f | 5 | ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> |
dcee3fc5 NK |
6 | ;;; |
7 | ;;; This file is part of GNU Guix. | |
8 | ;;; | |
9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
10 | ;;; under the terms of the GNU General Public License as published by | |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
14 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
21 | ||
1b1c335f | 22 | (define-module (gnu packages version-control) |
d9ff410f | 23 | #:use-module ((guix licenses) #:select (asl2.0 gpl1+ gpl2 gpl2+ gpl3+)) |
dcee3fc5 NK |
24 | #:use-module (guix packages) |
25 | #:use-module (guix download) | |
1b1c335f | 26 | #:use-module (guix build-system gnu) |
dcee3fc5 NK |
27 | #:use-module (guix build-system python) |
28 | #:use-module (guix build utils) | |
29 | #:use-module ((gnu packages gettext) | |
1972fed4 | 30 | #:renamer (symbol-prefix-proc 'guix:)) |
2b24faa2 | 31 | #:use-module (gnu packages apr) |
d9ff410f | 32 | #:use-module (gnu packages curl) |
1972fed4 | 33 | #:use-module (gnu packages nano) |
d9ff410f | 34 | #:use-module (gnu packages openssl) |
cf3fe3b0 CR |
35 | #:use-module (gnu packages perl) |
36 | #:use-module (gnu packages python) | |
37 | #:use-module (gnu packages sqlite) | |
a4572a17 | 38 | #:use-module (gnu packages system) |
d9ff410f | 39 | #:use-module (gnu packages xml) |
a4572a17 | 40 | #:use-module (gnu packages emacs) |
8b2fe785 | 41 | #:use-module (gnu packages compression) |
ecfb6993 LC |
42 | #:use-module (gnu packages swig) |
43 | #:use-module (gnu packages tcl)) | |
dcee3fc5 NK |
44 | |
45 | (define-public bazaar | |
46 | (package | |
47 | (name "bazaar") | |
48 | (version "2.5.1") | |
49 | (source | |
50 | (origin | |
51 | (method url-fetch) | |
52 | (uri (string-append "https://launchpad.net/bzr/2.5/" version | |
53 | "/+download/bzr-" version ".tar.gz")) | |
54 | (sha256 | |
55 | (base32 | |
56 | "10krjbzia2avn09p0cdlbx2wya0r5v11w5ymvyl72af5dkx4cwwn")))) | |
57 | (build-system python-build-system) | |
58 | (inputs | |
59 | ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh' | |
60 | ;; require Zsh. | |
61 | `(("gettext" ,guix:gettext))) | |
62 | (arguments | |
1611eccd AE |
63 | `(#:tests? #f ; no test target |
64 | #:python ,python-2)) ; Python 3 apparently not yet supported, see | |
65 | ; https://answers.launchpad.net/bzr/+question/229048 | |
dcee3fc5 | 66 | (home-page "https://gnu.org/software/bazaar") |
2c71cf66 | 67 | (synopsis "Decentralized revision control system") |
dcee3fc5 NK |
68 | (description |
69 | "GNU Bazaar is a distributed version control system, which supports both | |
70 | central version control and distributed version control. Developers can | |
71 | organize their workspace in whichever way they want. It is possible to work | |
72 | from a command line or use a GUI application.") | |
2c71cf66 | 73 | (license gpl2+))) |
1b1c335f | 74 | |
d9ff410f AE |
75 | (define-public git |
76 | (package | |
77 | (name "git") | |
78 | (version "1.8.4") | |
79 | (source (origin | |
80 | (method url-fetch) | |
81 | (uri (string-append "http://git-core.googlecode.com/files/git-" | |
82 | version ".tar.gz")) | |
83 | (sha256 | |
84 | (base32 | |
85 | "156bwqqgaw65rsvbb4wih5jfg94bxyf6p16mdwf0ky3f4ln55s2i")))) | |
86 | (build-system gnu-build-system) | |
87 | (inputs | |
88 | `(("curl" ,curl) | |
89 | ("expat" ,expat) | |
90 | ("gettext" ,guix:gettext) | |
91 | ("openssl" ,openssl) | |
92 | ("perl" ,perl) | |
d1f30e99 | 93 | ("python" ,python-2) ; CAVEAT: incompatible with python-3 according to INSTALL |
ed5f49ff LC |
94 | ("zlib" ,zlib) |
95 | ||
96 | ;; For 'git-svn'. | |
ecfb6993 LC |
97 | ("subversion" ,subversion) |
98 | ||
99 | ;; For 'git gui', 'gitk', and 'git citool'. | |
100 | ("tcl" ,tcl) | |
101 | ("tk" ,tk))) | |
102 | (outputs '("out" ; the core | |
103 | "svn" ; git-svn | |
104 | "gui")) ; gitk, git gui | |
d9ff410f AE |
105 | (arguments |
106 | `(#:make-flags `("V=1") ; more verbose compilation | |
107 | #:test-target "test" | |
108 | #:tests? #f ; FIXME: Many tests are failing | |
ecfb6993 LC |
109 | |
110 | ;; The explicit --with-tcltk forces the build system to hardcode the | |
111 | ;; absolute file name to 'wish'. | |
112 | #:configure-flags (list (string-append "--with-tcltk=" | |
113 | (assoc-ref %build-inputs "tk") | |
114 | "/bin/wish8.6")) ; XXX | |
115 | ||
d9ff410f AE |
116 | #:phases |
117 | (alist-replace | |
118 | 'configure | |
119 | (lambda* (#:key #:allow-other-keys #:rest args) | |
120 | (let ((configure (assoc-ref %standard-phases 'configure))) | |
121 | (and (apply configure args) | |
122 | (substitute* "Makefile" | |
123 | (("/bin/sh") (which "sh")) | |
124 | (("/usr/bin/perl") (which "perl")) | |
125 | (("/usr/bin/python") (which "python")))))) | |
ed5f49ff LC |
126 | (alist-cons-after |
127 | 'install 'split | |
128 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
ecfb6993 | 129 | ;; Split the binaries to the various outputs. |
ed5f49ff LC |
130 | (let* ((out (assoc-ref outputs "out")) |
131 | (svn (assoc-ref outputs "svn")) | |
ecfb6993 LC |
132 | (gui (assoc-ref outputs "gui")) |
133 | (gitk (string-append out "/bin/gitk")) | |
134 | (gitk* (string-append gui "/bin/gitk")) | |
135 | (git-gui (string-append out "/libexec/git-core/git-gui")) | |
136 | (git-gui* (string-append gui "/libexec/git-core/git-gui")) | |
137 | (git-cit (string-append out "/libexec/git-core/git-citool")) | |
138 | (git-cit* (string-append gui "/libexec/git-core/git-citool")) | |
ed5f49ff LC |
139 | (git-svn (string-append out "/libexec/git-core/git-svn")) |
140 | (git-svn* (string-append svn "/libexec/git-core/git-svn"))) | |
ecfb6993 LC |
141 | (mkdir-p (string-append gui "/bin")) |
142 | (mkdir-p (string-append gui "/libexec/git-core")) | |
ed5f49ff | 143 | (mkdir-p (string-append svn "/libexec/git-core")) |
ecfb6993 LC |
144 | |
145 | (for-each (lambda (old new) | |
146 | (copy-file old new) | |
147 | (delete-file old) | |
148 | (chmod new #o555)) | |
149 | (list gitk git-gui git-cit git-svn) | |
150 | (list gitk* git-gui* git-cit* git-svn*)) | |
ed5f49ff LC |
151 | |
152 | ;; Tell 'git-svn' where Subversion is. | |
153 | (wrap-program git-svn* | |
154 | `("PATH" ":" prefix | |
155 | (,(string-append (assoc-ref inputs "subversion") | |
0a5a1db2 | 156 | "/bin"))) |
ed5f49ff LC |
157 | `("PERL5LIB" ":" prefix |
158 | (,(string-append (assoc-ref inputs "subversion") | |
159 | "/lib/perl5/site_perl"))) | |
160 | ||
161 | ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so | |
162 | ;; help it find 'libsvn_client-1.so'. | |
163 | `("LD_LIBRARY_PATH" ":" prefix | |
164 | (,(string-append (assoc-ref inputs "subversion") | |
0a5a1db2 LC |
165 | "/lib")))) |
166 | ||
167 | ;; Tell 'git' to look for core programs in the user's profile. | |
168 | ;; This allows user to install other outputs of this package and | |
169 | ;; have them transparently taken into account. There's a | |
170 | ;; 'GIT_EXEC_PATH' environment variable, but it's supposed to | |
171 | ;; specify a single directory, not a search path. | |
172 | (wrap-program (string-append out "/bin/git") | |
173 | `("PATH" ":" prefix | |
174 | ("$HOME/.guix-profile/libexec/git-core"))))) | |
ed5f49ff | 175 | %standard-phases)))) |
d9ff410f AE |
176 | (synopsis "Distributed version control system") |
177 | (description | |
178 | "Git is a free distributed version control system designed to handle | |
179 | everything from small to very large projects with speed and efficiency.") | |
180 | (license gpl2) | |
181 | (home-page "http://git-scm.com/"))) | |
182 | ||
cf3fe3b0 CR |
183 | (define-public subversion |
184 | (package | |
185 | (name "subversion") | |
186 | (version "1.7.8") | |
187 | (source (origin | |
188 | (method url-fetch) | |
e23dc82c | 189 | (uri (string-append "http://archive.apache.org/dist/subversion/subversion-" |
cf3fe3b0 CR |
190 | version ".tar.bz2")) |
191 | (sha256 | |
192 | (base32 | |
193 | "11inl9n1riahfnbk1fax0dysm2swakzhzhpmm2zvga6fikcx90zw")))) | |
194 | (build-system gnu-build-system) | |
8b2fe785 LC |
195 | (arguments |
196 | '(#:phases (alist-cons-after | |
197 | 'install 'instal-perl-bindings | |
198 | (lambda* (#:key outputs #:allow-other-keys) | |
199 | ;; Follow the instructions from | |
200 | ;; 'subversion/bindings/swig/INSTALL'. | |
201 | (let ((out (assoc-ref outputs "out"))) | |
202 | (and (zero? (system* "make" "swig-pl-lib")) | |
203 | ;; FIXME: Test failures. | |
204 | ;; (zero? (system* "make" "check-swig-pl")) | |
205 | (zero? (system* "make" "install-swig-pl-lib")) | |
206 | ||
207 | ;; Set the right installation prefix. | |
208 | (with-directory-excursion | |
209 | "subversion/bindings/swig/perl/native" | |
210 | (and (zero? | |
211 | (system* "perl" "Makefile.PL" | |
212 | (string-append "PREFIX=" out))) | |
213 | (zero? | |
214 | (system* "make" "install"))))))) | |
215 | %standard-phases))) | |
216 | (native-inputs | |
217 | ;; For the Perl bindings. | |
218 | `(("swig" ,swig))) | |
cf3fe3b0 | 219 | (inputs |
2b24faa2 AE |
220 | `(("apr" ,apr) |
221 | ("apr-util" ,apr-util) | |
cf3fe3b0 | 222 | ("perl" ,perl) |
aa9e22ef | 223 | ("python" ,python-2) ; incompatible with Python 3 (print syntax) |
cf3fe3b0 CR |
224 | ("sqlite" ,sqlite) |
225 | ("zlib" ,zlib))) | |
226 | (home-page "http://subversion.apache.org/") | |
227 | (synopsis "Subversion, a revision control system") | |
228 | (description | |
229 | "Subversion exists to be universally recognized and adopted as an | |
230 | open-source, centralized version control system characterized by its | |
231 | reliability as a safe haven for valuable data; the simplicity of its model and | |
232 | usage; and its ability to support the needs of a wide variety of users and | |
233 | projects, from individuals to large-scale enterprise operations.") | |
234 | (license asl2.0))) | |
235 | ||
1b1c335f LC |
236 | (define-public rcs |
237 | (package | |
238 | (name "rcs") | |
239 | (version "5.9.0") | |
240 | (source (origin | |
241 | (method url-fetch) | |
242 | (uri (string-append "mirror://gnu/rcs/rcs-" | |
243 | version ".tar.xz")) | |
244 | (sha256 | |
245 | (base32 | |
246 | "0w26vsx732dcmb5qfhlkkzvrk1sx6d74qibrn914n14j0ci90jcq")))) | |
247 | (build-system gnu-build-system) | |
248 | (home-page "http://www.gnu.org/software/rcs/") | |
249 | (synopsis "Per-file local revision control system") | |
250 | (description | |
a22dc0c4 LC |
251 | "RCS is the Revision Control System. It is used to manage multiple |
252 | revisions of files. Revisions are stored as reverse differences generated by | |
253 | GNU Diffutils. RCS also handles identifying and merging revisions.") | |
1b1c335f | 254 | (license gpl3+))) |
1972fed4 LC |
255 | |
256 | (define-public cvs | |
257 | (package | |
258 | (name "cvs") | |
259 | (version "1.12.13") | |
260 | (source (origin | |
261 | (method url-fetch) | |
262 | (uri (string-append | |
263 | "http://ftp.gnu.org/non-gnu/cvs/source/feature/" | |
264 | version "/cvs-" version ".tar.bz2")) | |
265 | (sha256 | |
266 | (base32 | |
267 | "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq")))) | |
268 | (build-system gnu-build-system) | |
269 | (arguments | |
270 | ;; XXX: The test suite looks flawed, and the package is obsolete anyway. | |
271 | '(#:tests? #f)) | |
272 | (inputs `(("zlib" ,zlib) | |
273 | ("nano" ,nano))) ; the default editor | |
274 | (home-page "http://cvs.nongnu.org") | |
275 | (synopsis "Historical centralized version control system") | |
276 | (description | |
277 | "CVS is a version control system, an important component of Source | |
278 | Configuration Management (SCM). Using it, you can record the history of | |
279 | sources files, and documents. It fills a similar role to the free software | |
280 | RCS, PRCS, and Aegis packages.") | |
281 | (license gpl1+))) | |
a4572a17 LC |
282 | |
283 | (define-public vc-dwim | |
284 | (package | |
285 | (name "vc-dwim") | |
286 | (version "1.7") | |
287 | (source (origin | |
288 | (method url-fetch) | |
289 | (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-" | |
290 | version ".tar.xz")) | |
291 | (sha256 | |
292 | (base32 | |
293 | "094pjwshvazlgagc254in2xvrp93vhcj0kb5ms17qs7sch99x9z2")))) | |
294 | (build-system gnu-build-system) | |
295 | (inputs `(("perl" ,perl) | |
296 | ("inetutils" ,inetutils) ; for `hostname', used in the tests | |
297 | ("emacs" ,emacs))) ; for `ctags' | |
298 | (home-page "http://www.gnu.org/software/vc-dwim/") | |
299 | (synopsis "Version-control-agnostic ChangeLog diff and commit tool") | |
300 | (description | |
a22dc0c4 LC |
301 | "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\". |
302 | vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and | |
303 | using version control at the same time, for example by printing a reminder | |
304 | when a file change has been described in the ChangeLog but the file has not | |
305 | been added to the VCS. vc-chlog scans changed files and generates | |
306 | standards-compliant ChangeLog entries based on the changes that it detects.") | |
a4572a17 | 307 | (license gpl3+))) |