You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

245 lines
9.7 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
  4. ;;;
  5. ;;; This file is part of GNU Guix.
  6. ;;;
  7. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  8. ;;; under the terms of the GNU General Public License as published by
  9. ;;; the Free Software Foundation; either version 3 of the License, or (at
  10. ;;; your option) any later version.
  11. ;;;
  12. ;;; GNU Guix is distributed in the hope that it will be useful, but
  13. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ;;; GNU General Public License for more details.
  16. ;;;
  17. ;;; You should have received a copy of the GNU General Public License
  18. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  19. (define-module (gnu packages package-management)
  20. #:use-module (guix packages)
  21. #:use-module (guix download)
  22. #:use-module (guix git-download)
  23. #:use-module (guix utils)
  24. #:use-module (guix build-system gnu)
  25. #:use-module ((guix licenses) #:select (gpl2+ gpl3+ lgpl2.1+))
  26. #:use-module (gnu packages)
  27. #:use-module (gnu packages guile)
  28. #:use-module ((gnu packages compression) #:select (bzip2 gzip))
  29. #:use-module (gnu packages gnupg)
  30. #:use-module (gnu packages databases)
  31. #:use-module (gnu packages graphviz)
  32. #:use-module (gnu packages pkg-config)
  33. #:use-module (gnu packages autotools)
  34. #:use-module (gnu packages gettext)
  35. #:use-module (gnu packages texinfo)
  36. #:use-module (gnu packages perl)
  37. #:use-module (gnu packages curl)
  38. #:use-module (gnu packages web)
  39. #:use-module (gnu packages emacs)
  40. #:use-module (gnu packages openssl)
  41. #:use-module (gnu packages bdw-gc))
  42. (define (boot-guile-uri arch)
  43. "Return the URI for the bootstrap Guile tarball for ARCH."
  44. (if (string=? "armhf" arch)
  45. (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
  46. arch "-linux"
  47. "/20150101/guile-2.0.11.tar.xz")
  48. (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
  49. arch "-linux"
  50. "/20131110/guile-2.0.9.tar.xz")))
  51. (define-public guix-0.8.1
  52. (package
  53. (name "guix")
  54. (version "0.8.1")
  55. (source (origin
  56. (method url-fetch)
  57. (uri (string-append "ftp://alpha.gnu.org/gnu/guix/guix-"
  58. version ".tar.gz"))
  59. (sha256
  60. (base32
  61. "12h5ldj1yf0za6ladlr8h7nx2gqrv2dxcsiwyqayvrza93lijkf5"))))
  62. (build-system gnu-build-system)
  63. (arguments
  64. `(#:configure-flags (list
  65. "--localstatedir=/var"
  66. "--sysconfdir=/etc"
  67. (string-append "--with-libgcrypt-prefix="
  68. (assoc-ref %build-inputs
  69. "libgcrypt")))
  70. #:phases (alist-cons-before
  71. 'configure 'copy-bootstrap-guile
  72. (lambda* (#:key system inputs #:allow-other-keys)
  73. (define (boot-guile-version arch)
  74. (if (string=? "armhf" arch)
  75. "2.0.11"
  76. "2.0.9"))
  77. (define (copy arch)
  78. (let ((guile (assoc-ref inputs
  79. (string-append "boot-guile/"
  80. arch)))
  81. (target (string-append "gnu/packages/bootstrap/"
  82. arch "-linux/"
  83. "/guile-"
  84. (boot-guile-version arch)
  85. ".tar.xz")))
  86. (copy-file guile target)))
  87. (copy "i686")
  88. (copy "x86_64")
  89. (copy "mips64el")
  90. (copy "armhf")
  91. #t)
  92. %standard-phases)))
  93. (native-inputs `(("pkg-config" ,pkg-config)
  94. ("emacs" ,emacs-no-x))) ;for guix.el
  95. (inputs
  96. (let ((boot-guile (lambda (arch hash)
  97. (origin
  98. (method url-fetch)
  99. (uri (boot-guile-uri arch))
  100. (sha256 hash)))))
  101. `(("bzip2" ,bzip2)
  102. ("gzip" ,gzip)
  103. ("sqlite" ,sqlite)
  104. ("libgcrypt" ,libgcrypt)
  105. ("guile" ,guile-2.0)
  106. ("boot-guile/i686"
  107. ,(boot-guile "i686"
  108. (base32
  109. "0im800m30abgh7msh331pcbjvb4n02smz5cfzf1srv0kpx3csmxp")))
  110. ("boot-guile/x86_64"
  111. ,(boot-guile "x86_64"
  112. (base32
  113. "1w2p5zyrglzzniqgvyn1b55vprfzhgk8vzbzkkbdgl5248si0yq3")))
  114. ("boot-guile/mips64el"
  115. ,(boot-guile "mips64el"
  116. (base32
  117. "0fzp93lvi0hn54acc0fpvhc7bvl0yc853k62l958cihk03q80ilr")))
  118. ("boot-guile/armhf"
  119. ,(boot-guile "armhf"
  120. (base32
  121. "1mi3brl7l58aww34rawhvja84xc7l1b4hmwdmc36fp9q9mfx0lg5"))))))
  122. (propagated-inputs
  123. `(("guile-json" ,guile-json)
  124. ("geiser" ,geiser))) ;for guix.el
  125. (home-page "http://www.gnu.org/software/guix")
  126. (synopsis "Functional package manager for installed software packages and versions")
  127. (description
  128. "GNU Guix is a functional package manager for the GNU system, and is
  129. also a distribution thereof. It includes a virtual machine image. Besides
  130. the usual package management features, it also supports transactional
  131. upgrades and roll-backs, per-user profiles, and much more. It is based on
  132. the Nix package manager.")
  133. (license gpl3+)))
  134. (define guix-devel
  135. ;; Development version of Guix.
  136. ;;
  137. ;; Note: use a short commit id; when using the long one, the limit on socket
  138. ;; file names is exceeded while running the tests.
  139. (let ((commit "0b13161"))
  140. (package (inherit guix-0.8.1)
  141. (version (string-append "0.8.1." commit))
  142. (source (origin
  143. (method git-fetch)
  144. (uri (git-reference
  145. (url "git://git.sv.gnu.org/guix.git")
  146. (commit commit)))
  147. (sha256
  148. (base32
  149. "0h9yyfxs14di858hb9ypjvdjryv8nzll6f9vxkggcy40iyhp65sh"))))
  150. (arguments
  151. (substitute-keyword-arguments (package-arguments guix-0.8.1)
  152. ((#:phases phases)
  153. `(alist-cons-after
  154. 'unpack 'bootstrap
  155. (lambda _
  156. ;; Make sure 'msgmerge' can modify the PO files.
  157. (for-each (lambda (po)
  158. (chmod po #o666))
  159. (find-files "." "\\.po$"))
  160. (zero? (system* "sh" "bootstrap")))
  161. ,phases))))
  162. (native-inputs
  163. `(("autoconf" ,(autoconf-wrapper))
  164. ("automake" ,automake)
  165. ("gettext" ,gnu-gettext)
  166. ("texinfo" ,texinfo)
  167. ("graphviz" ,graphviz)
  168. ,@(package-native-inputs guix-0.8.1))))))
  169. (define-public guix guix-devel)
  170. (define-public nix
  171. (package
  172. (name "nix")
  173. (version "1.8")
  174. (source (origin
  175. (method url-fetch)
  176. (uri (string-append "http://nixos.org/releases/nix/nix-"
  177. version "/nix-" version ".tar.xz"))
  178. (sha256
  179. (base32
  180. "077hircacgi9y4n6kf48qp4laz1h3ab6sif3rcci1jy13f05w2m3"))))
  181. (build-system gnu-build-system)
  182. ;; XXX: Should we pass '--with-store-dir=/gnu/store'? But then we'd also
  183. ;; need '--localstatedir=/var'. But then! The thing would use /var/nix
  184. ;; instead of /var/guix. So in the end, we do nothing special.
  185. (native-inputs `(("perl" ,perl)
  186. ("pkg-config" ,pkg-config)))
  187. (inputs `(("curl" ,curl)
  188. ("openssl" ,openssl)
  189. ("libgc" ,libgc)
  190. ("sqlite" ,sqlite)
  191. ("bzip2" ,bzip2)
  192. ("perl-www-curl" ,perl-www-curl)
  193. ("perl-dbi" ,perl-dbi)
  194. ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
  195. (home-page "http://nixos.org/nix/")
  196. (synopsis "The Nix package manager")
  197. (description
  198. "Nix is a purely functional package manager. This means that it treats
  199. packages like values in purely functional programming languages such as
  200. Haskell—they are built by functions that don't have side-effects, and they
  201. never change after they have been built. Nix stores packages in the Nix
  202. store, usually the directory /nix/store, where each package has its own unique
  203. sub-directory.")
  204. (license lgpl2.1+)))
  205. (define-public stow
  206. (package
  207. (name "stow")
  208. (version "2.2.0")
  209. (source (origin
  210. (method url-fetch)
  211. (uri (string-append "mirror://gnu/stow/stow-"
  212. version ".tar.gz"))
  213. (sha256
  214. (base32
  215. "0arw1nsdlcvd7javkbk2bdvnc31d7dmb6fr25xyyi6ng76cxg2cb"))))
  216. (build-system gnu-build-system)
  217. (inputs
  218. `(("perl" ,perl)))
  219. (native-inputs
  220. `(("perl-test-simple" ,perl-test-simple)
  221. ("perl-test-output" ,perl-test-output)
  222. ("perl-capture-tiny" ,perl-capture-tiny)))
  223. (home-page "https://www.gnu.org/software/stow/")
  224. (synopsis "Managing installed software packages")
  225. (description
  226. "GNU Stow is a symlink manager. It generates symlinks to directories
  227. of data and makes them appear to be merged into the same directory. It is
  228. typically used for managing software packages installed from source, by
  229. letting you install them apart in distinct directories and then create
  230. symlinks to the files in a common directory such as /usr/local.")
  231. (license gpl2+)))