gnu: Rename module gnutls to tls.
[jackhill/guix/guix.git] / gnu / packages / package-management.scm
CommitLineData
bbe8d8f0 1;;; GNU Guix --- Functional package management for GNU
2e69dd8c 2;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
8d422e25 3;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
bbe8d8f0
LC
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
20(define-module (gnu packages package-management)
21 #:use-module (guix packages)
22 #:use-module (guix download)
480af4d6
LC
23 #:use-module (guix git-download)
24 #:use-module (guix utils)
bbe8d8f0 25 #:use-module (guix build-system gnu)
8d422e25 26 #:use-module ((guix licenses) #:select (gpl2+ gpl3+ lgpl2.1+))
8a43ff10 27 #:use-module (gnu packages)
bbe8d8f0 28 #:use-module (gnu packages guile)
38cf2ba0 29 #:use-module (gnu packages compression)
bbe8d8f0 30 #:use-module (gnu packages gnupg)
5f96f303 31 #:use-module (gnu packages databases)
480af4d6
LC
32 #:use-module (gnu packages graphviz)
33 #:use-module (gnu packages pkg-config)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages gettext)
fcb0109d
LC
36 #:use-module (gnu packages texinfo)
37 #:use-module (gnu packages perl)
38 #:use-module (gnu packages curl)
39 #:use-module (gnu packages web)
e21adc76 40 #:use-module (gnu packages man)
b173d0e4 41 #:use-module (gnu packages emacs)
fcb0109d 42 #:use-module (gnu packages openssl)
a7fd7b68
AE
43 #:use-module (gnu packages bdw-gc)
44 #:use-module (gnu packages tls))
bbe8d8f0 45
39de700c
LC
46(define (boot-guile-uri arch)
47 "Return the URI for the bootstrap Guile tarball for ARCH."
48 (if (string=? "armhf" arch)
49 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
50 arch "-linux"
51 "/20150101/guile-2.0.11.tar.xz")
52 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
53 arch "-linux"
54 "/20131110/guile-2.0.9.tar.xz")))
55
5875eb73 56(define-public guix-0.8.2
bbe8d8f0
LC
57 (package
58 (name "guix")
5875eb73 59 (version "0.8.2")
bbe8d8f0
LC
60 (source (origin
61 (method url-fetch)
62 (uri (string-append "ftp://alpha.gnu.org/gnu/guix/guix-"
63 version ".tar.gz"))
64 (sha256
65 (base32
5875eb73 66 "1a5gnkh17w7fgi5zy63ph64iqdvarkdqypkwgw2iifpqa6jq04zz"))))
bbe8d8f0
LC
67 (build-system gnu-build-system)
68 (arguments
69 `(#:configure-flags (list
2d195e67 70 "--localstatedir=/var"
202adef2 71 "--sysconfdir=/etc"
dd3a42e6
MW
72 (string-append "--with-bash-completion-dir="
73 (assoc-ref %outputs "out")
74 "/etc/bash_completion.d")
bbe8d8f0
LC
75 (string-append "--with-libgcrypt-prefix="
76 (assoc-ref %build-inputs
77 "libgcrypt")))
02c2cf43
LC
78 #:phases (modify-phases %standard-phases
79 (add-before
80 'configure 'copy-bootstrap-guile
81 (lambda* (#:key system inputs #:allow-other-keys)
82 (define (boot-guile-version arch)
83 (if (string=? "armhf" arch)
84 "2.0.11"
85 "2.0.9"))
39de700c 86
02c2cf43
LC
87 (define (copy arch)
88 (let ((guile (assoc-ref inputs
89 (string-append "boot-guile/"
90 arch)))
91 (target (string-append "gnu/packages/bootstrap/"
92 arch "-linux/"
93 "/guile-"
94 (boot-guile-version arch)
95 ".tar.xz")))
96 (copy-file guile target)))
bbe8d8f0 97
02c2cf43
LC
98 (copy "i686")
99 (copy "x86_64")
100 (copy "mips64el")
101 (copy "armhf")
932e7204
LC
102 #t))
103 (add-after
104 'install 'wrap-program
105 (lambda* (#:key inputs outputs #:allow-other-keys)
106 ;; Make sure the 'guix' command finds GnuTLS and
107 ;; Guile-JSON automatically.
108 (let* ((out (assoc-ref outputs "out"))
109 (json (assoc-ref inputs "guile-json"))
110 (gnutls (assoc-ref inputs "gnutls"))
111 (path (string-append
112 json "/share/guile/site/2.0:"
113 gnutls "/share/guile/site/2.0")))
114 (wrap-program (string-append out "/bin/guix")
115 `("GUILE_LOAD_PATH" ":" prefix (,path))
116 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,path)))
117 #t))))))
b173d0e4 118 (native-inputs `(("pkg-config" ,pkg-config)
2d32d153 119 ("emacs" ,emacs-no-x))) ;for guix.el
bbe8d8f0
LC
120 (inputs
121 (let ((boot-guile (lambda (arch hash)
122 (origin
123 (method url-fetch)
39de700c 124 (uri (boot-guile-uri arch))
bbe8d8f0
LC
125 (sha256 hash)))))
126 `(("bzip2" ,bzip2)
2d195e67
LC
127 ("gzip" ,gzip)
128
bbe8d8f0
LC
129 ("sqlite" ,sqlite)
130 ("libgcrypt" ,libgcrypt)
131 ("guile" ,guile-2.0)
bbe8d8f0
LC
132
133 ("boot-guile/i686"
134 ,(boot-guile "i686"
135 (base32
8a43ff10 136 "0im800m30abgh7msh331pcbjvb4n02smz5cfzf1srv0kpx3csmxp")))
bbe8d8f0
LC
137 ("boot-guile/x86_64"
138 ,(boot-guile "x86_64"
139 (base32
8a43ff10
LC
140 "1w2p5zyrglzzniqgvyn1b55vprfzhgk8vzbzkkbdgl5248si0yq3")))
141 ("boot-guile/mips64el"
142 ,(boot-guile "mips64el"
143 (base32
39de700c
LC
144 "0fzp93lvi0hn54acc0fpvhc7bvl0yc853k62l958cihk03q80ilr")))
145 ("boot-guile/armhf"
146 ,(boot-guile "armhf"
147 (base32
148 "1mi3brl7l58aww34rawhvja84xc7l1b4hmwdmc36fp9q9mfx0lg5"))))))
f1082ec1 149 (propagated-inputs
45cbe390
TUBK
150 `(("gnutls" ,gnutls) ;for 'guix download' & co.
151 ("guile-json" ,guile-json)
f1082ec1
LC
152 ("geiser" ,geiser))) ;for guix.el
153
bbe8d8f0 154 (home-page "http://www.gnu.org/software/guix")
79c311b8 155 (synopsis "Functional package manager for installed software packages and versions")
bbe8d8f0 156 (description
79c311b8 157 "GNU Guix is a functional package manager for the GNU system, and is
c5779c93 158also a distribution thereof. It includes a virtual machine image. Besides
79c311b8 159the usual package management features, it also supports transactional
c5779c93
LC
160upgrades and roll-backs, per-user profiles, and much more. It is based on
161the Nix package manager.")
bbe8d8f0 162 (license gpl3+)))
30f25b03 163
3ad9a0b1 164(define guix-devel
480af4d6 165 ;; Development version of Guix.
1dccdb75
LC
166 ;;
167 ;; Note: use a short commit id; when using the long one, the limit on socket
168 ;; file names is exceeded while running the tests.
040ca34f 169 (let ((commit "684bf7c"))
5875eb73 170 (package (inherit guix-0.8.2)
aa38faba 171 (version (string-append "0.8.2." commit))
480af4d6
LC
172 (source (origin
173 (method git-fetch)
174 (uri (git-reference
175 (url "git://git.sv.gnu.org/guix.git")
2e69dd8c 176 (commit commit)))
480af4d6
LC
177 (sha256
178 (base32
040ca34f 179 "0fq9ajj17kbb0f1p79al2vcqah9sl0imayhggcp31c3vq0ahya9g"))
e21adc76 180 (file-name (string-append "guix-" version "-checkout"))))
480af4d6 181 (arguments
5875eb73 182 (substitute-keyword-arguments (package-arguments guix-0.8.2)
480af4d6 183 ((#:phases phases)
722ec722
MW
184 `(alist-cons-after
185 'unpack 'bootstrap
480af4d6 186 (lambda _
480af4d6
LC
187 ;; Make sure 'msgmerge' can modify the PO files.
188 (for-each (lambda (po)
189 (chmod po #o666))
190 (find-files "." "\\.po$"))
191
722ec722 192 (zero? (system* "sh" "bootstrap")))
480af4d6
LC
193 ,phases))))
194 (native-inputs
195 `(("autoconf" ,(autoconf-wrapper))
196 ("automake" ,automake)
197 ("gettext" ,gnu-gettext)
198 ("texinfo" ,texinfo)
199 ("graphviz" ,graphviz)
e21adc76 200 ("help2man" ,help2man)
5875eb73 201 ,@(package-native-inputs guix-0.8.2))))))
3ad9a0b1 202
aa38faba 203(define-public guix guix-devel)
fcb0109d
LC
204
205(define-public nix
206 (package
207 (name "nix")
63c54622 208 (version "1.8")
fcb0109d
LC
209 (source (origin
210 (method url-fetch)
211 (uri (string-append "http://nixos.org/releases/nix/nix-"
212 version "/nix-" version ".tar.xz"))
213 (sha256
214 (base32
63c54622 215 "077hircacgi9y4n6kf48qp4laz1h3ab6sif3rcci1jy13f05w2m3"))))
fcb0109d
LC
216 (build-system gnu-build-system)
217 ;; XXX: Should we pass '--with-store-dir=/gnu/store'? But then we'd also
218 ;; need '--localstatedir=/var'. But then! The thing would use /var/nix
219 ;; instead of /var/guix. So in the end, we do nothing special.
220 (native-inputs `(("perl" ,perl)
221 ("pkg-config" ,pkg-config)))
222 (inputs `(("curl" ,curl)
223 ("openssl" ,openssl)
224 ("libgc" ,libgc)
225 ("sqlite" ,sqlite)
ae6904dc
EB
226 ("bzip2" ,bzip2)))
227 (propagated-inputs `(("perl-www-curl" ,perl-www-curl)
228 ("perl-dbi" ,perl-dbi)
229 ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
fcb0109d
LC
230 (home-page "http://nixos.org/nix/")
231 (synopsis "The Nix package manager")
232 (description
233 "Nix is a purely functional package manager. This means that it treats
234packages like values in purely functional programming languages such as
235Haskell—they are built by functions that don't have side-effects, and they
236never change after they have been built. Nix stores packages in the Nix
237store, usually the directory /nix/store, where each package has its own unique
238sub-directory.")
239 (license lgpl2.1+)))
8d422e25
RW
240
241(define-public stow
242 (package
243 (name "stow")
244 (version "2.2.0")
245 (source (origin
246 (method url-fetch)
247 (uri (string-append "mirror://gnu/stow/stow-"
248 version ".tar.gz"))
249 (sha256
250 (base32
251 "0arw1nsdlcvd7javkbk2bdvnc31d7dmb6fr25xyyi6ng76cxg2cb"))))
252 (build-system gnu-build-system)
253 (inputs
254 `(("perl" ,perl)))
255 (native-inputs
256 `(("perl-test-simple" ,perl-test-simple)
257 ("perl-test-output" ,perl-test-output)
258 ("perl-capture-tiny" ,perl-capture-tiny)))
259 (home-page "https://www.gnu.org/software/stow/")
260 (synopsis "Managing installed software packages")
261 (description
262 "GNU Stow is a symlink manager. It generates symlinks to directories
263of data and makes them appear to be merged into the same directory. It is
264typically used for managing software packages installed from source, by
265letting you install them apart in distinct directories and then create
266symlinks to the files in a common directory such as /usr/local.")
267 (license gpl2+)))