Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 
 

335 рядки
14 KiB

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