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>
5 ;;; This file is part of GNU Guix.
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.
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.
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/>.
20 (define-module (gnu packages package-management)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix git-download)
24 #:use-module (guix utils)
25 #:use-module (guix build-system gnu)
26 #:use-module ((guix licenses) #:select (gpl2+ gpl3+ lgpl2.1+))
27 #:use-module (gnu packages)
28 #:use-module (gnu packages guile)
29 #:use-module (gnu packages compression)
30 #:use-module (gnu packages gnupg)
31 #:use-module (gnu packages databases)
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)
36 #:use-module (gnu packages texinfo)
37 #:use-module (gnu packages perl)
38 #:use-module (gnu packages curl)
39 #:use-module (gnu packages web)
40 #:use-module (gnu packages man)
41 #:use-module (gnu packages emacs)
42 #:use-module (gnu packages bdw-gc)
43 #:use-module (gnu packages tls))
45 (define (boot-guile-uri arch)
46 "Return the URI for the bootstrap Guile tarball for ARCH."
47 (if (string=? "armhf" arch)
48 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
50 "/20150101/guile-2.0.11.tar.xz")
51 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
53 "/20131110/guile-2.0.9.tar.xz")))
55 (define-public guix-0.8.3
61 (uri (string-append "ftp://alpha.gnu.org/gnu/guix/guix-"
65 "14n0nkj0ckhdwhghx1pml99hbjr1xdkn8x145j0xp1357vqlisnz"))))
66 (build-system gnu-build-system)
68 `(#:configure-flags (list
69 "--localstatedir=/var"
71 (string-append "--with-bash-completion-dir="
72 (assoc-ref %outputs "out")
73 "/etc/bash_completion.d")
74 (string-append "--with-libgcrypt-prefix="
75 (assoc-ref %build-inputs
77 #:phases (modify-phases %standard-phases
79 'configure 'copy-bootstrap-guile
80 (lambda* (#:key system inputs #:allow-other-keys)
81 (define (boot-guile-version arch)
82 (if (string=? "armhf" arch)
87 (let ((guile (assoc-ref inputs
88 (string-append "boot-guile/"
90 (target (string-append "gnu/packages/bootstrap/"
93 (boot-guile-version arch)
95 (copy-file guile target)))
103 'unpack 'disable-container-tests
104 ;; XXX FIXME: These tests fail within the build container.
106 (substitute* "tests/syscalls.scm"
107 (("^\\(test-assert \"(clone|setns|pivot-root)\"" all)
108 (string-append "(test-skip 1)\n" all)))
109 (substitute* "tests/containers.scm"
110 (("^\\(test-assert" all)
111 (string-append "(test-skip 1)\n" all)))
114 'install 'wrap-program
115 (lambda* (#:key inputs outputs #:allow-other-keys)
116 ;; Make sure the 'guix' command finds GnuTLS and
117 ;; Guile-JSON automatically.
118 (let* ((out (assoc-ref outputs "out"))
119 (json (assoc-ref inputs "guile-json"))
120 (gnutls (assoc-ref inputs "gnutls"))
122 json "/share/guile/site/2.0:"
123 gnutls "/share/guile/site/2.0")))
124 (wrap-program (string-append out "/bin/guix")
125 `("GUILE_LOAD_PATH" ":" prefix (,path))
126 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,path)))
128 (native-inputs `(("pkg-config" ,pkg-config)
129 ("emacs" ,emacs-no-x))) ;for guix.el
131 (let ((boot-guile (lambda (arch hash)
134 (uri (boot-guile-uri arch))
140 ("libgcrypt" ,libgcrypt)
146 "0im800m30abgh7msh331pcbjvb4n02smz5cfzf1srv0kpx3csmxp")))
148 ,(boot-guile "x86_64"
150 "1w2p5zyrglzzniqgvyn1b55vprfzhgk8vzbzkkbdgl5248si0yq3")))
151 ("boot-guile/mips64el"
152 ,(boot-guile "mips64el"
154 "0fzp93lvi0hn54acc0fpvhc7bvl0yc853k62l958cihk03q80ilr")))
158 "1mi3brl7l58aww34rawhvja84xc7l1b4hmwdmc36fp9q9mfx0lg5"))))))
160 `(("gnutls" ,gnutls) ;for 'guix download' & co.
161 ("guile-json" ,guile-json)
162 ("geiser" ,geiser))) ;for guix.el
164 (home-page "http://www.gnu.org/software/guix")
165 (synopsis "Functional package manager for installed software packages and versions")
167 "GNU Guix is a functional package manager for the GNU system, and is
168 also a distribution thereof. It includes a virtual machine image. Besides
169 the usual package management features, it also supports transactional
170 upgrades and roll-backs, per-user profiles, and much more. It is based on
171 the Nix package manager.")
175 ;; Development version of Guix.
177 ;; Note: use a short commit id; when using the long one, the limit on socket
178 ;; file names is exceeded while running the tests.
179 (let ((commit "5d09263"))
180 (package (inherit guix-0.8.3)
181 (version (string-append "0.8.3." commit))
185 (url "git://git.sv.gnu.org/guix.git")
189 "0v5g90di91j218x620shib7xjrjd5dkk4h1zrlg98hdmbgxq5s3j"))
190 (file-name (string-append "guix-" version "-checkout"))))
192 (substitute-keyword-arguments (package-arguments guix-0.8.3)
194 `(modify-phases ,phases
198 ;; Make sure 'msgmerge' can modify the PO files.
199 (for-each (lambda (po)
201 (find-files "." "\\.po$"))
203 (zero? (system* "sh" "bootstrap"))))
205 'unpack 'disable-container-tests
206 ;; XXX FIXME: These tests fail within the build container.
208 (substitute* "tests/syscalls.scm"
209 (("^\\(test-assert \"(clone|setns|pivot-root)\"" all)
210 (string-append "(test-skip 1)\n" all)))
211 (substitute* "tests/containers.scm"
212 (("^\\(test-assert" all)
213 (string-append "(test-skip 1)\n" all)))
216 `(("autoconf" ,(autoconf-wrapper))
217 ("automake" ,automake)
218 ("gettext" ,gnu-gettext)
220 ("graphviz" ,graphviz)
221 ("help2man" ,help2man)
222 ,@(package-native-inputs guix-0.8.3))))))
224 (define-public guix guix-devel)
232 (uri (string-append "http://nixos.org/releases/nix/nix-"
233 version "/nix-" version ".tar.xz"))
236 "077hircacgi9y4n6kf48qp4laz1h3ab6sif3rcci1jy13f05w2m3"))))
237 (build-system gnu-build-system)
238 ;; XXX: Should we pass '--with-store-dir=/gnu/store'? But then we'd also
239 ;; need '--localstatedir=/var'. But then! The thing would use /var/nix
240 ;; instead of /var/guix. So in the end, we do nothing special.
241 (native-inputs `(("perl" ,perl)
242 ("pkg-config" ,pkg-config)))
243 (inputs `(("curl" ,curl)
248 (propagated-inputs `(("perl-www-curl" ,perl-www-curl)
249 ("perl-dbi" ,perl-dbi)
250 ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
251 (home-page "http://nixos.org/nix/")
252 (synopsis "The Nix package manager")
254 "Nix is a purely functional package manager. This means that it treats
255 packages like values in purely functional programming languages such as
256 Haskell—they are built by functions that don't have side-effects, and they
257 never change after they have been built. Nix stores packages in the Nix
258 store, usually the directory /nix/store, where each package has its own unique
268 (uri (string-append "mirror://gnu/stow/stow-"
272 "0arw1nsdlcvd7javkbk2bdvnc31d7dmb6fr25xyyi6ng76cxg2cb"))))
273 (build-system gnu-build-system)
277 `(("perl-test-simple" ,perl-test-simple)
278 ("perl-test-output" ,perl-test-output)
279 ("perl-capture-tiny" ,perl-capture-tiny)))
280 (home-page "https://www.gnu.org/software/stow/")
281 (synopsis "Managing installed software packages")
283 "GNU Stow is a symlink manager. It generates symlinks to directories
284 of data and makes them appear to be merged into the same directory. It is
285 typically used for managing software packages installed from source, by
286 letting you install them apart in distinct directories and then create
287 symlinks to the files in a common directory such as /usr/local.")