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