Commit | Line | Data |
---|---|---|
bbe8d8f0 | 1 | ;;; GNU Guix --- Functional package management for GNU |
2e4e01ee | 2 | ;;; Copyright © 2013, 2014 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 LC |
24 | #:use-module (guix build-system gnu) |
25 | #:use-module ((guix licenses) #:select (gpl3+)) | |
8a43ff10 | 26 | #:use-module (gnu packages) |
bbe8d8f0 | 27 | #:use-module (gnu packages guile) |
2d195e67 | 28 | #:use-module ((gnu packages compression) #:select (bzip2 gzip)) |
bbe8d8f0 LC |
29 | #:use-module (gnu packages gnupg) |
30 | #:use-module (gnu packages sqlite) | |
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) | |
35 | #:use-module (gnu packages texinfo)) | |
bbe8d8f0 | 36 | |
5d69fb54 | 37 | (define-public guix-0.6 |
bbe8d8f0 LC |
38 | (package |
39 | (name "guix") | |
2e4e01ee | 40 | (version "0.6") |
bbe8d8f0 LC |
41 | (source (origin |
42 | (method url-fetch) | |
43 | (uri (string-append "ftp://alpha.gnu.org/gnu/guix/guix-" | |
44 | version ".tar.gz")) | |
45 | (sha256 | |
46 | (base32 | |
2e4e01ee | 47 | "01xw51wizhsk827w4xp79k2b6dxjaviw04r6rbrb85qdxnwg6k9n")))) |
bbe8d8f0 LC |
48 | (build-system gnu-build-system) |
49 | (arguments | |
50 | `(#:configure-flags (list | |
2d195e67 | 51 | "--localstatedir=/var" |
202adef2 | 52 | "--sysconfdir=/etc" |
bbe8d8f0 LC |
53 | (string-append "--with-libgcrypt-prefix=" |
54 | (assoc-ref %build-inputs | |
55 | "libgcrypt"))) | |
56 | #:phases (alist-cons-before | |
57 | 'configure 'copy-bootstrap-guile | |
58 | (lambda* (#:key system inputs #:allow-other-keys) | |
59 | (define (copy arch) | |
60 | (let ((guile (assoc-ref inputs | |
61 | (string-append "boot-guile/" | |
62 | arch))) | |
63 | (target (string-append "gnu/packages/bootstrap/" | |
64 | arch "-linux/" | |
8a43ff10 | 65 | "/guile-2.0.9.tar.xz"))) |
bbe8d8f0 LC |
66 | (copy-file guile target))) |
67 | ||
68 | (copy "i686") | |
69 | (copy "x86_64") | |
8a43ff10 | 70 | (copy "mips64el") |
bbe8d8f0 LC |
71 | #t) |
72 | %standard-phases))) | |
73 | (inputs | |
74 | (let ((boot-guile (lambda (arch hash) | |
75 | (origin | |
76 | (method url-fetch) | |
77 | (uri (string-append | |
78 | "http://alpha.gnu.org/gnu/guix/bootstrap/" | |
79 | arch "-linux" | |
8a43ff10 | 80 | "/20131110/guile-2.0.9.tar.xz")) |
bbe8d8f0 LC |
81 | (sha256 hash))))) |
82 | `(("bzip2" ,bzip2) | |
2d195e67 LC |
83 | ("gzip" ,gzip) |
84 | ||
bbe8d8f0 LC |
85 | ("sqlite" ,sqlite) |
86 | ("libgcrypt" ,libgcrypt) | |
87 | ("guile" ,guile-2.0) | |
88 | ("pkg-config" ,pkg-config) | |
89 | ||
90 | ("boot-guile/i686" | |
91 | ,(boot-guile "i686" | |
92 | (base32 | |
8a43ff10 | 93 | "0im800m30abgh7msh331pcbjvb4n02smz5cfzf1srv0kpx3csmxp"))) |
bbe8d8f0 LC |
94 | ("boot-guile/x86_64" |
95 | ,(boot-guile "x86_64" | |
96 | (base32 | |
8a43ff10 LC |
97 | "1w2p5zyrglzzniqgvyn1b55vprfzhgk8vzbzkkbdgl5248si0yq3"))) |
98 | ("boot-guile/mips64el" | |
99 | ,(boot-guile "mips64el" | |
100 | (base32 | |
101 | "0fzp93lvi0hn54acc0fpvhc7bvl0yc853k62l958cihk03q80ilr")))))) | |
bbe8d8f0 | 102 | (home-page "http://www.gnu.org/software/guix") |
79c311b8 | 103 | (synopsis "Functional package manager for installed software packages and versions") |
bbe8d8f0 | 104 | (description |
79c311b8 LC |
105 | "GNU Guix is a functional package manager for the GNU system, and is |
106 | also a distribution thereof. It includes a virtual machine image. Besides | |
107 | the usual package management features, it also supports transactional | |
108 | upgrades and roll-backs, per-user profiles, and much more. It is based on the | |
109 | Nix package manager.") | |
bbe8d8f0 | 110 | (license gpl3+))) |
30f25b03 | 111 | |
5d69fb54 | 112 | (define-public guix |
480af4d6 LC |
113 | ;; Development version of Guix. |
114 | (let ((commit "20b1d19")) | |
5d69fb54 | 115 | (package (inherit guix-0.6) |
480af4d6 LC |
116 | (version (string-append "0.6." commit)) |
117 | (source (origin | |
118 | (method git-fetch) | |
119 | (uri (git-reference | |
120 | (url "git://git.sv.gnu.org/guix.git") | |
121 | (commit commit) | |
122 | (recursive? #t))) | |
123 | (sha256 | |
124 | (base32 | |
125 | "0n278kzp586rzbhcghbj7am641yjc35pcb6n1r304myziwd0mz6r")))) | |
126 | (arguments | |
5d69fb54 | 127 | (substitute-keyword-arguments (package-arguments guix-0.6) |
480af4d6 LC |
128 | ((#:phases phases) |
129 | `(alist-cons-before | |
130 | 'configure 'bootstrap | |
131 | (lambda _ | |
132 | ;; Comment out `git' invocations, since 'git-fetch' provides us | |
133 | ;; with a checkout that includes sub-modules. | |
134 | (substitute* "bootstrap" | |
135 | (("git ") | |
136 | "true git ")) | |
137 | ||
138 | ;; Keep a list of the files already available under nix/... | |
139 | (call-with-output-file "ls-R" | |
140 | (lambda (port) | |
141 | (for-each (lambda (file) | |
142 | (format port "~a~%" file)) | |
143 | (find-files "nix" "")))) | |
144 | ||
145 | ;; ... and use that as a substitute to 'git ls-tree'. | |
146 | (substitute* "nix/sync-with-upstream" | |
147 | (("git ls-tree HEAD -- [[:graph:]]+") | |
148 | "cat ls-R")) | |
149 | ||
150 | ;; Make sure 'msgmerge' can modify the PO files. | |
151 | (for-each (lambda (po) | |
152 | (chmod po #o666)) | |
153 | (find-files "." "\\.po$")) | |
154 | ||
155 | (zero? (system* "./bootstrap"))) | |
156 | ,phases)))) | |
157 | (native-inputs | |
158 | `(("autoconf" ,(autoconf-wrapper)) | |
159 | ("automake" ,automake) | |
160 | ("gettext" ,gnu-gettext) | |
161 | ("texinfo" ,texinfo) | |
162 | ("graphviz" ,graphviz) | |
5d69fb54 | 163 | ,@(package-native-inputs guix-0.6)))))) |