Commit | Line | Data |
---|---|---|
bbe8d8f0 | 1 | ;;; GNU Guix --- Functional package management for GNU |
9961cde3 | 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> |
598ea80f | 3 | ;;; Copyright © 2015, 2017, 2020 Ricardo Wurmus <rekado@elephly.net> |
513d35f1 | 4 | ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com> |
49d9fce8 | 5 | ;;; Copyright © 2017, 2018 Oleg Pykhalov <go.wigust@gmail.com> |
58a308e0 | 6 | ;;; Copyright © 2017 Roel Janssen <roel@gnu.org> |
fd885160 | 7 | ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
76fa5e04 | 8 | ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu> |
89ea6252 | 9 | ;;; Copyright © 2018, 2019 Rutger Helling <rhelling@mykolab.com> |
3d391309 | 10 | ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org> |
30833b13 | 11 | ;;; Copyright © 2018, 2019 Eric Bavier <bavier@member.fsf.org> |
6def31e8 | 12 | ;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il> |
c0023514 | 13 | ;;; Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de> |
b4335cfb | 14 | ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com> |
b778989e | 15 | ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> |
13c18af1 | 16 | ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org> |
bbe8d8f0 LC |
17 | ;;; |
18 | ;;; This file is part of GNU Guix. | |
19 | ;;; | |
20 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
21 | ;;; under the terms of the GNU General Public License as published by | |
22 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
23 | ;;; your option) any later version. | |
24 | ;;; | |
25 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
26 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
27 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
28 | ;;; GNU General Public License for more details. | |
29 | ;;; | |
30 | ;;; You should have received a copy of the GNU General Public License | |
31 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
32 | ||
33 | (define-module (gnu packages package-management) | |
8a43ff10 | 34 | #:use-module (gnu packages) |
37756a13 | 35 | #:use-module (gnu packages acl) |
3d391309 SB |
36 | #:use-module (gnu packages attr) |
37 | #:use-module (gnu packages avahi) | |
37756a13 | 38 | #:use-module (gnu packages autotools) |
e3e1ecf6 | 39 | #:use-module (gnu packages backup) |
8a973abc | 40 | #:use-module (gnu packages base) |
38b9af7c | 41 | #:use-module (gnu packages bash) |
37756a13 | 42 | #:use-module (gnu packages bdw-gc) |
3d391309 | 43 | #:use-module (gnu packages bison) |
13c18af1 | 44 | #:use-module (gnu packages boost) |
3e5750af | 45 | #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin' |
ac257f12 | 46 | #:use-module (gnu packages check) |
38cf2ba0 | 47 | #:use-module (gnu packages compression) |
37756a13 | 48 | #:use-module (gnu packages cpio) |
e6c8199b | 49 | #:use-module (gnu packages crypto) |
37756a13 | 50 | #:use-module (gnu packages curl) |
255d1bbe | 51 | #:use-module (gnu packages dbm) |
3d391309 | 52 | #:use-module (gnu packages docbook) |
37756a13 | 53 | #:use-module (gnu packages file) |
480af4d6 | 54 | #:use-module (gnu packages gettext) |
98a11b7f | 55 | #:use-module (gnu packages glib) |
cb390925 | 56 | #:use-module (gnu packages gnome) |
37756a13 | 57 | #:use-module (gnu packages gnupg) |
37756a13 | 58 | #:use-module (gnu packages graphviz) |
36e1ab84 | 59 | #:use-module (gnu packages gtk) |
37756a13 | 60 | #:use-module (gnu packages guile) |
0791437f | 61 | #:use-module (gnu packages guile-xyz) |
52b01cb7 | 62 | #:use-module (gnu packages hurd) |
13c18af1 | 63 | #:use-module (gnu packages libedit) |
cb390925 | 64 | #:use-module (gnu packages linux) |
58a308e0 | 65 | #:use-module (gnu packages lisp) |
37756a13 | 66 | #:use-module (gnu packages man) |
e3e1ecf6 | 67 | #:use-module (gnu packages nettle) |
ac68fb3b | 68 | #:use-module (gnu packages networking) |
aff0cce9 | 69 | #:use-module (gnu packages nss) |
37756a13 | 70 | #:use-module (gnu packages patchutils) |
fcb0109d | 71 | #:use-module (gnu packages perl) |
5ccde207 | 72 | #:use-module (gnu packages perl-check) |
37756a13 TGR |
73 | #:use-module (gnu packages pkg-config) |
74 | #:use-module (gnu packages popt) | |
e3e1ecf6 | 75 | #:use-module (gnu packages python) |
1b2f753d | 76 | #:use-module (gnu packages python-web) |
44d10b1f | 77 | #:use-module (gnu packages python-xyz) |
37756a13 | 78 | #:use-module (gnu packages serialization) |
cd0322a3 | 79 | #:use-module (gnu packages sqlite) |
37756a13 TGR |
80 | #:use-module (gnu packages ssh) |
81 | #:use-module (gnu packages texinfo) | |
33dc54b0 | 82 | #:use-module (gnu packages time) |
04eb0fab | 83 | #:use-module (gnu packages tls) |
5dbeccf5 | 84 | #:use-module (gnu packages vim) |
36e1ab84 | 85 | #:use-module (gnu packages virtualization) |
37756a13 | 86 | #:use-module (gnu packages web) |
cb390925 | 87 | #:use-module (gnu packages xml) |
36e1ab84 | 88 | #:use-module (gnu packages xorg) |
16360cc8 | 89 | #:use-module (guix build-system glib-or-gtk) |
37756a13 | 90 | #:use-module (guix build-system gnu) |
44118720 | 91 | #:use-module (guix build-system meson) |
37756a13 TGR |
92 | #:use-module (guix build-system python) |
93 | #:use-module (guix download) | |
94 | #:use-module (guix gexp) | |
95 | #:use-module (guix git-download) | |
7ed6343f | 96 | #:use-module ((guix licenses) #:prefix license:) |
37756a13 TGR |
97 | #:use-module (guix packages) |
98 | #:use-module (guix utils) | |
99 | #:use-module (ice-9 match) | |
100 | #:use-module (srfi srfi-1)) | |
bbe8d8f0 | 101 | |
39de700c LC |
102 | (define (boot-guile-uri arch) |
103 | "Return the URI for the bootstrap Guile tarball for ARCH." | |
aef81a81 LC |
104 | (cond ((string=? "armhf" arch) |
105 | (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/" | |
106 | arch "-linux" | |
107 | "/20150101/guile-2.0.11.tar.xz")) | |
108 | ((string=? "aarch64" arch) | |
b31b0155 LC |
109 | (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/" |
110 | arch "-linux/20170217/guile-2.0.14.tar.xz")) | |
aef81a81 LC |
111 | (else |
112 | (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/" | |
113 | arch "-linux" | |
114 | "/20131110/guile-2.0.9.tar.xz")))) | |
39de700c | 115 | |
994a1494 LC |
116 | (define-public guix |
117 | ;; Latest version of Guix, which may or may not correspond to a release. | |
94fa8d76 LC |
118 | ;; Note: the 'update-guix-package.scm' script expects this definition to |
119 | ;; start precisely like this. | |
33ff35d5 | 120 | (let ((version "1.1.0") |
2df4ef03 JN |
121 | (commit "c00564192a9924ab2218c243342963aba89d67d1") |
122 | (revision 12)) | |
994a1494 LC |
123 | (package |
124 | (name "guix") | |
ab2419e5 | 125 | |
994a1494 LC |
126 | (version (if (zero? revision) |
127 | version | |
128 | (string-append version "-" | |
129 | (number->string revision) | |
4b7917f2 | 130 | "." (string-take commit 7)))) |
994a1494 LC |
131 | (source (origin |
132 | (method git-fetch) | |
133 | (uri (git-reference | |
134 | (url "https://git.savannah.gnu.org/r/guix.git") | |
135 | (commit commit))) | |
136 | (sha256 | |
137 | (base32 | |
2df4ef03 | 138 | "008ywpdkc5f2jh25x6rr9glzvq4a6qih7v73w5dbxscpddx5c5g2")) |
994a1494 LC |
139 | (file-name (string-append "guix-" version "-checkout")))) |
140 | (build-system gnu-build-system) | |
141 | (arguments | |
142 | `(#:configure-flags (list | |
143 | "--localstatedir=/var" | |
144 | "--sysconfdir=/etc" | |
145 | (string-append "--with-bash-completion-dir=" | |
146 | (assoc-ref %outputs "out") | |
147 | "/etc/bash_completion.d") | |
994a1494 LC |
148 | |
149 | ;; Set 'DOT_USER_PROGRAM' to the empty string so | |
150 | ;; we don't keep a reference to Graphviz, whose | |
59e80445 LC |
151 | ;; closure is pretty big (too big for the Guix |
152 | ;; system installation image.) | |
4b7917f2 LC |
153 | "ac_cv_path_DOT_USER_PROGRAM=dot" |
154 | ||
155 | ;; To avoid problems with the length of shebangs, | |
156 | ;; choose a fixed-width and short directory name | |
157 | ;; for tests. | |
52b01cb7 JN |
158 | "ac_cv_guix_test_root=/tmp/guix-tests" |
159 | ,@(if (hurd-target?) '("--with-courage") '())) | |
994a1494 LC |
160 | #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097> |
161 | ||
162 | #:modules ((guix build gnu-build-system) | |
163 | (guix build utils) | |
c9117162 | 164 | (srfi srfi-26) |
994a1494 LC |
165 | (ice-9 popen) |
166 | (ice-9 rdelim)) | |
167 | ||
168 | #:phases (modify-phases %standard-phases | |
189be331 | 169 | (replace 'bootstrap |
994a1494 LC |
170 | (lambda _ |
171 | ;; Make sure 'msgmerge' can modify the PO files. | |
172 | (for-each (lambda (po) | |
173 | (chmod po #o666)) | |
174 | (find-files "." "\\.po$")) | |
ab2419e5 | 175 | |
8833a647 LC |
176 | (patch-shebang "build-aux/git-version-gen") |
177 | ||
91c619eb LC |
178 | (call-with-output-file ".tarball-version" |
179 | (lambda (port) | |
180 | (display ,version port))) | |
181 | ||
fe4a3727 LC |
182 | ;; Install SysV init files to $(prefix)/etc rather |
183 | ;; than to /etc. | |
184 | (substitute* "nix/local.mk" | |
185 | (("^sysvinitservicedir = .*$") | |
186 | (string-append "sysvinitservicedir = \ | |
187 | $(prefix)/etc/init.d\n"))) | |
188 | ||
92fcb831 | 189 | (invoke "sh" "bootstrap"))) |
569c55be JN |
190 | (add-before 'build 'use-host-compressors |
191 | (lambda* (#:key inputs target #:allow-other-keys) | |
192 | (when target | |
193 | ;; Use host compressors. | |
194 | (let ((bzip2 (assoc-ref inputs "bzip2")) | |
195 | (gzip (assoc-ref inputs "gzip")) | |
196 | (xz (assoc-ref inputs "xz"))) | |
197 | (substitute* "guix/config.scm" | |
198 | (("\"[^\"]*/bin/bzip2") | |
199 | (string-append "\"" bzip2 "/bin/bzip2")) | |
200 | (("\"[^\"]*/bin/gzip") gzip | |
201 | (string-append "\"" gzip "/bin/gzip")) | |
202 | (("\"[^\"]*/bin//xz") | |
203 | (string-append "\"" xz "/bin/xz"))))) | |
204 | #t)) | |
59127916 | 205 | (add-before 'check 'copy-bootstrap-guile |
d653e184 | 206 | (lambda* (#:key system target inputs #:allow-other-keys) |
569c55be JN |
207 | ;; Copy the bootstrap guile tarball in the store |
208 | ;; used by the test suite. | |
209 | (define (intern file recursive?) | |
210 | ;; Note: don't use 'guix download' here because we | |
211 | ;; need to set the 'recursive?' argument. | |
212 | (define base | |
213 | (strip-store-file-name file)) | |
d653e184 | 214 | |
569c55be JN |
215 | (define code |
216 | `(begin | |
217 | (use-modules (guix)) | |
218 | (with-store store | |
219 | (let* ((item (add-to-store store ,base | |
220 | ,recursive? | |
221 | "sha256" ,file)) | |
222 | (root (string-append "/tmp/gc-root-" | |
223 | (basename item)))) | |
224 | ;; Register a root so that the GC tests | |
225 | ;; don't delete those. | |
226 | (symlink item root) | |
227 | (add-indirect-root store root))))) | |
d653e184 | 228 | |
569c55be JN |
229 | (invoke "./test-env" "guile" "-c" |
230 | (object->string code))) | |
d653e184 | 231 | |
569c55be JN |
232 | (unless target |
233 | (intern (assoc-ref inputs "boot-guile") #f) | |
d653e184 | 234 | |
569c55be JN |
235 | ;; On x86_64 some tests need the i686 Guile. |
236 | ,@(if (and (not (%current-target-system)) | |
237 | (string=? (%current-system) | |
238 | "x86_64-linux")) | |
239 | '((intern (assoc-ref inputs "boot-guile/i686") #f)) | |
240 | '()) | |
d653e184 | 241 | |
569c55be JN |
242 | ;; Copy the bootstrap executables. |
243 | (for-each (lambda (input) | |
244 | (intern (assoc-ref inputs input) #t)) | |
245 | '("bootstrap/bash" "bootstrap/mkdir" | |
246 | "bootstrap/tar" "bootstrap/xz"))) | |
994a1494 | 247 | #t)) |
40e89f5b | 248 | (add-after 'unpack 'disable-failing-tests |
994a1494 LC |
249 | ;; XXX FIXME: These tests fail within the build container. |
250 | (lambda _ | |
251 | (substitute* "tests/syscalls.scm" | |
252 | (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all) | |
253 | (string-append "(test-skip 1)\n" all))) | |
254 | (substitute* "tests/containers.scm" | |
255 | (("^\\(test-(assert|equal)" all) | |
256 | (string-append "(test-skip 1)\n" all))) | |
257 | (when (file-exists? "tests/guix-environment-container.sh") | |
258 | (substitute* "tests/guix-environment-container.sh" | |
259 | (("guix environment --version") | |
260 | "exit 77\n"))) | |
261 | #t)) | |
262 | (add-before 'check 'set-SHELL | |
263 | (lambda _ | |
264 | ;; 'guix environment' tests rely on 'SHELL' having a | |
265 | ;; correct value, so set it. | |
266 | (setenv "SHELL" (which "sh")) | |
267 | #t)) | |
268 | (add-after 'install 'wrap-program | |
38b9af7c JN |
269 | (lambda* (#:key inputs native-inputs outputs target |
270 | #:allow-other-keys) | |
dd1640ee LC |
271 | ;; Make sure the 'guix' command finds GnuTLS, |
272 | ;; Guile-JSON, and Guile-Git automatically. | |
994a1494 | 273 | (let* ((out (assoc-ref outputs "out")) |
56389433 JN |
274 | (guile ,@(if (%current-target-system) |
275 | '((assoc-ref native-inputs "guile")) | |
276 | '((assoc-ref inputs "guile")))) | |
ca719424 | 277 | (gcrypt (assoc-ref inputs "guile-gcrypt")) |
994a1494 | 278 | (json (assoc-ref inputs "guile-json")) |
c5a2e1ff | 279 | (sqlite (assoc-ref inputs "guile-sqlite3")) |
9ca8aa38 | 280 | (git (assoc-ref inputs "guile-git")) |
dd1640ee LC |
281 | (bs (assoc-ref inputs |
282 | "guile-bytestructures")) | |
994a1494 LC |
283 | (ssh (assoc-ref inputs "guile-ssh")) |
284 | (gnutls (assoc-ref inputs "gnutls")) | |
8a973abc | 285 | (locales (assoc-ref inputs "glibc-utf8-locales")) |
ca719424 LC |
286 | (deps (list gcrypt json sqlite gnutls |
287 | git bs ssh)) | |
994a1494 LC |
288 | (effective |
289 | (read-line | |
290 | (open-pipe* OPEN_READ | |
291 | (string-append guile "/bin/guile") | |
292 | "-c" "(display (effective-version))"))) | |
c9117162 LC |
293 | (path (string-join |
294 | (map (cut string-append <> | |
295 | "/share/guile/site/" | |
296 | effective) | |
6f1ce09d | 297 | (delete #f deps)) |
c9117162 LC |
298 | ":")) |
299 | (gopath (string-join | |
300 | (map (cut string-append <> | |
301 | "/lib/guile/" effective | |
302 | "/site-ccache") | |
6f1ce09d | 303 | (delete #f deps)) |
8a973abc LC |
304 | ":")) |
305 | (locpath (string-append locales "/lib/locale"))) | |
61cdad35 | 306 | |
994a1494 LC |
307 | (wrap-program (string-append out "/bin/guix") |
308 | `("GUILE_LOAD_PATH" ":" prefix (,path)) | |
8a973abc LC |
309 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath)) |
310 | `("GUIX_LOCPATH" ":" suffix (,locpath))) | |
61cdad35 | 311 | |
38b9af7c JN |
312 | (when target |
313 | ;; XXX Touching wrap-program rebuilds world | |
314 | (let ((bash (assoc-ref inputs "bash"))) | |
315 | (substitute* (string-append out "/bin/guix") | |
316 | (("^#!.*/bash") (string-append "#! " bash "/bin/bash"))))) | |
994a1494 LC |
317 | #t)))))) |
318 | (native-inputs `(("pkg-config" ,pkg-config) | |
a7db8540 | 319 | |
b4335cfb MO |
320 | ;; Guile libraries are needed here for |
321 | ;; cross-compilation. | |
b778989e | 322 | ("guile" ,guile-3.0) |
b4335cfb MO |
323 | ("gnutls" ,gnutls) |
324 | ("guile-gcrypt" ,guile-gcrypt) | |
8f7cf3b5 | 325 | ("guile-json" ,guile-json-4) |
b4335cfb MO |
326 | ("guile-sqlite3" ,guile-sqlite3) |
327 | ("guile-ssh" ,guile-ssh) | |
328 | ("guile-git" ,guile-git) | |
329 | ||
994a1494 LC |
330 | ;; XXX: Keep the development inputs here even though |
331 | ;; they're unnecessary, just so that 'guix environment | |
332 | ;; guix' always contains them. | |
464f5447 | 333 | ("autoconf" ,autoconf-wrapper) |
994a1494 LC |
334 | ("automake" ,automake) |
335 | ("gettext" ,gettext-minimal) | |
336 | ("texinfo" ,texinfo) | |
337 | ("graphviz" ,graphviz) | |
76fa5e04 JL |
338 | ("help2man" ,help2man) |
339 | ("po4a" ,po4a))) | |
994a1494 | 340 | (inputs |
3e5750af LC |
341 | `(("bzip2" ,bzip2) |
342 | ("gzip" ,gzip) | |
94d2ff6d | 343 | ("zlib" ,zlib) ;for 'guix publish' |
2e5c71b2 | 344 | ("lzlib" ,lzlib) ;for 'guix publish' and 'guix substitute' |
2d195e67 | 345 | |
3e5750af LC |
346 | ("sqlite" ,sqlite) |
347 | ("libgcrypt" ,libgcrypt) | |
4e80516c | 348 | |
b6bee63b | 349 | ("guile" ,guile-3.0) |
bbe8d8f0 | 350 | |
94d2ff6d LC |
351 | ;; Some of the tests use "unshare" when it is available. |
352 | ("util-linux" ,util-linux) | |
353 | ||
59127916 LC |
354 | ;; Many tests rely on the 'guile-bootstrap' package, which is why we |
355 | ;; have it here. | |
356 | ("boot-guile" ,(bootstrap-guile-origin (%current-system))) | |
357 | ,@(if (and (not (%current-target-system)) | |
358 | (string=? (%current-system) "x86_64-linux")) | |
359 | `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux"))) | |
8a973abc | 360 | '()) |
569c55be | 361 | ,@(if (%current-target-system) |
38b9af7c JN |
362 | `(("bash" ,bash-minimal) |
363 | ("xz" ,xz)) | |
569c55be | 364 | '()) |
8a973abc | 365 | |
94d2ff6d LC |
366 | ;; Tests also rely on these bootstrap executables. |
367 | ("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system))) | |
368 | ("bootstrap/mkdir" ,(bootstrap-executable "mkdir" (%current-system))) | |
369 | ("bootstrap/tar" ,(bootstrap-executable "tar" (%current-system))) | |
370 | ("bootstrap/xz" ,(bootstrap-executable "xz" (%current-system))) | |
371 | ||
8a973abc | 372 | ("glibc-utf8-locales" ,glibc-utf8-locales))) |
994a1494 | 373 | (propagated-inputs |
8951b949 | 374 | `(("gnutls" ,(if (%current-target-system) gnutls-3.6.14 guile3.0-gnutls)) |
ca719424 | 375 | ("guile-gcrypt" ,guile-gcrypt) |
8f7cf3b5 | 376 | ("guile-json" ,guile-json-4) |
c5a2e1ff | 377 | ("guile-sqlite3" ,guile-sqlite3) |
9ca8aa38 LC |
378 | ("guile-ssh" ,guile-ssh) |
379 | ("guile-git" ,guile-git))) | |
f1082ec1 | 380 | |
994a1494 LC |
381 | (home-page "https://www.gnu.org/software/guix/") |
382 | (synopsis "Functional package manager for installed software packages and versions") | |
383 | (description | |
384 | "GNU Guix is a functional package manager for the GNU system, and is | |
c5779c93 | 385 | also a distribution thereof. It includes a virtual machine image. Besides |
79c311b8 | 386 | the usual package management features, it also supports transactional |
c5779c93 LC |
387 | upgrades and roll-backs, per-user profiles, and much more. It is based on |
388 | the Nix package manager.") | |
7ed6343f | 389 | (license license:gpl3+) |
994a1494 | 390 | (properties '((ftp-server . "alpha.gnu.org")))))) |
3ad9a0b1 | 391 | |
baed9236 LC |
392 | (define-public guix-daemon |
393 | ;; This package is for internal consumption: it allows us to quickly build | |
394 | ;; the 'guix-daemon' program and use that in (guix self), used by 'guix | |
395 | ;; pull'. | |
396 | (package | |
397 | (inherit guix) | |
398 | (properties `((hidden? . #t))) | |
399 | (name "guix-daemon") | |
400 | ||
401 | ;; Use a minimum set of dependencies. | |
402 | (native-inputs | |
403 | (fold alist-delete (package-native-inputs guix) | |
404 | '("po4a" "graphviz" "help2man"))) | |
405 | (inputs | |
b6bee63b | 406 | `(("gnutls" ,guile3.0-gnutls) |
baed9236 | 407 | ("guile-git" ,guile-git) |
2eb0628a | 408 | ("guile-json" ,guile-json-3) |
3b0153bd | 409 | ("guile-gcrypt" ,guile-gcrypt) |
1fb947f6 LC |
410 | ,@(fold alist-delete (package-inputs guix) |
411 | '("boot-guile" "boot-guile/i686" "util-linux")))) | |
412 | ||
baed9236 LC |
413 | (propagated-inputs '()) |
414 | ||
415 | (arguments | |
416 | (substitute-keyword-arguments (package-arguments guix) | |
1fb947f6 LC |
417 | ((#:configure-flags flags '()) |
418 | ;; Pretend we have those libraries; we don't actually need them. | |
419 | `(append ,flags | |
420 | '("guix_cv_have_recent_guile_sqlite3=yes" | |
421 | "guix_cv_have_recent_guile_ssh=yes"))) | |
baed9236 LC |
422 | ((#:tests? #f #f) |
423 | #f) | |
424 | ((#:phases phases '%standard-phases) | |
425 | `(modify-phases ,phases | |
74781c65 LC |
426 | (add-after 'unpack 'change-default-guix |
427 | (lambda _ | |
428 | ;; We need to tell 'guix-daemon' which 'guix' command to use. | |
429 | ;; Here we use a questionable hack where we hard-code root's | |
430 | ;; current guix, which could be wrong (XXX). Note that scripts | |
431 | ;; like 'guix perform-download' do not run as root so we assume | |
432 | ;; that they have access to /var/guix/profiles/per-user/root. | |
433 | (substitute* "nix/libstore/globals.cc" | |
434 | (("guixProgram = (.*)nixBinDir + \"/guix\"" _ before) | |
435 | (string-append "guixProgram = " before | |
436 | "/var/guix/profiles/per-user/root\ | |
437 | /current-guix/bin/guix"))) | |
438 | #t)) | |
baed9236 LC |
439 | (replace 'build |
440 | (lambda _ | |
441 | (invoke "make" "nix/libstore/schema.sql.hh") | |
442 | (invoke "make" "-j" (number->string | |
443 | (parallel-job-count)) | |
444 | "guix-daemon"))) | |
445 | (delete 'copy-bootstrap-guile) | |
446 | (replace 'install | |
447 | (lambda* (#:key outputs #:allow-other-keys) | |
74781c65 | 448 | (invoke "make" "install-binPROGRAMS"))) |
baed9236 LC |
449 | (delete 'wrap-program))))))) |
450 | ||
82ce81ba | 451 | |
b6bee63b | 452 | (define-public guile2.2-guix |
da765180 LC |
453 | (package |
454 | (inherit guix) | |
b6bee63b | 455 | (name "guile2.2-guix") |
1926db54 | 456 | (native-inputs |
b6bee63b LC |
457 | `(("guile" ,guile-2.2) |
458 | ("gnutls" ,guile2.2-gnutls) | |
459 | ("guile-gcrypt" ,guile2.2-gcrypt) | |
460 | ("guile-json" ,guile2.2-json) | |
461 | ("guile-sqlite3" ,guile2.2-sqlite3) | |
462 | ("guile-ssh" ,guile2.2-ssh) | |
463 | ("guile-git" ,guile2.2-git) | |
1926db54 MO |
464 | ,@(fold alist-delete (package-native-inputs guix) |
465 | '("guile" "gnutls" "guile-gcrypt" "guile-json" | |
466 | "guile-sqlite3" "guile-ssh" "guile-git")))) | |
da765180 | 467 | (inputs |
b6bee63b | 468 | `(("guile" ,guile-2.2) |
da765180 LC |
469 | ,@(alist-delete "guile" (package-inputs guix)))) |
470 | (propagated-inputs | |
b6bee63b LC |
471 | `(("gnutls" ,gnutls) |
472 | ("guile-gcrypt" ,guile2.2-gcrypt) | |
473 | ("guile-json" ,guile2.2-json) | |
474 | ("guile-sqlite3" ,guile2.2-sqlite3) | |
475 | ("guile-ssh" ,guile2.2-ssh) | |
476 | ("guile-git" ,guile2.2-git))))) | |
477 | ||
478 | (define-public guile3.0-guix | |
479 | (deprecated-package "guile3.0-guix" guix)) | |
da765180 | 480 | |
6f1ce09d EB |
481 | (define-public guix-minimal |
482 | ;; A version of Guix which is built with the minimal set of dependencies, as | |
483 | ;; outlined in the README "Requirements" section. Intended as a CI job, so | |
484 | ;; marked as hidden. | |
0991fd53 LC |
485 | (hidden-package |
486 | (package | |
487 | (inherit guix) | |
488 | (name "guix-minimal") | |
489 | (inputs | |
490 | `(("guile" ,guile-2.2) | |
491 | ,@(alist-delete "guile" (package-inputs guix)))) | |
492 | (propagated-inputs | |
493 | (fold alist-delete | |
494 | (package-propagated-inputs guix) | |
495 | '("guile-ssh")))))) | |
6f1ce09d | 496 | |
04eb0fab LC |
497 | (define (source-file? file stat) |
498 | "Return true if FILE is likely a source file, false if it is a typical | |
499 | generated file." | |
500 | (define (wrong-extension? file) | |
501 | (or (string-suffix? "~" file) | |
502 | (member (file-extension file) | |
503 | '("o" "a" "lo" "so" "go")))) | |
504 | ||
505 | (match (basename file) | |
506 | ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs") | |
507 | #f) | |
508 | ((? wrong-extension?) | |
509 | #f) | |
510 | (_ | |
511 | #t))) | |
512 | ||
7e6d8d36 LC |
513 | (define-public current-guix-package |
514 | ;; This parameter allows callers to override the package that 'current-guix' | |
515 | ;; returns. This is useful when 'current-guix' cannot compute it by itself, | |
516 | ;; for instance because it's not running from a source code checkout. | |
517 | (make-parameter #f)) | |
518 | ||
04eb0fab | 519 | (define-public current-guix |
863519f6 LC |
520 | (let* ((repository-root (delay (canonicalize-path |
521 | (string-append (current-source-directory) | |
522 | "/../..")))) | |
523 | (select? (delay (or (git-predicate (force repository-root)) | |
a9d5e4be | 524 | source-file?)))) |
04eb0fab LC |
525 | (lambda () |
526 | "Return a package representing Guix built from the current source tree. | |
527 | This works by adding the current source tree to the store (after filtering it | |
528 | out) and returning a package that uses that as its 'source'." | |
7e6d8d36 LC |
529 | (or (current-guix-package) |
530 | (package | |
531 | (inherit guix) | |
532 | (version (string-append (package-version guix) "+")) | |
863519f6 | 533 | (source (local-file (force repository-root) "guix-current" |
7e6d8d36 LC |
534 | #:recursive? #t |
535 | #:select? (force select?)))))))) | |
04eb0fab LC |
536 | |
537 | \f | |
538 | ;;; | |
539 | ;;; Other tools. | |
540 | ;;; | |
541 | ||
fcb0109d LC |
542 | (define-public nix |
543 | (package | |
544 | (name "nix") | |
ad9db848 | 545 | (version "2.3.6") |
fcb0109d LC |
546 | (source (origin |
547 | (method url-fetch) | |
548 | (uri (string-append "http://nixos.org/releases/nix/nix-" | |
549 | version "/nix-" version ".tar.xz")) | |
550 | (sha256 | |
551 | (base32 | |
ad9db848 | 552 | "128xf2as0y7hr28x575pbf9lkjpxr9hsxknbavv4p7ywr4lhbs85")))) |
fcb0109d | 553 | (build-system gnu-build-system) |
b6329d02 TGR |
554 | (arguments |
555 | `(#:configure-flags | |
556 | (list "--sysconfdir=/etc") | |
557 | #:phases | |
558 | (modify-phases %standard-phases | |
559 | (replace 'install | |
560 | ;; Don't try & fail to create subdirectories in /etc, but keep them | |
561 | ;; in the output as examples. | |
562 | (lambda* (#:key (make-flags '()) outputs #:allow-other-keys) | |
563 | (let* ((out (assoc-ref outputs "out")) | |
564 | (etc (string-append out "/etc"))) | |
565 | (apply invoke "make" "install" | |
566 | (string-append "sysconfdir=" etc) | |
567 | (string-append "profiledir=" etc "/profile.d") | |
568 | make-flags))))))) | |
e6c8199b | 569 | (native-inputs `(("pkg-config" ,pkg-config))) |
13c18af1 GL |
570 | (inputs `(("boost" ,boost) |
571 | ("brotli" ,brotli) | |
e6c8199b | 572 | ("bzip2" ,bzip2) |
13c18af1 GL |
573 | ("curl" ,curl) |
574 | ("editline" ,editline) | |
fcb0109d | 575 | ("libgc" ,libgc) |
e6c8199b SB |
576 | ("libseccomp" ,libseccomp) |
577 | ("libsodium" ,libsodium) | |
578 | ("openssl" ,openssl) | |
fcb0109d | 579 | ("sqlite" ,sqlite) |
e6c8199b | 580 | ("xz" ,xz))) |
775989c7 | 581 | (home-page "https://nixos.org/nix/") |
fcb0109d LC |
582 | (synopsis "The Nix package manager") |
583 | (description | |
584 | "Nix is a purely functional package manager. This means that it treats | |
585 | packages like values in purely functional programming languages such as | |
586 | Haskell—they are built by functions that don't have side-effects, and they | |
587 | never change after they have been built. Nix stores packages in the Nix | |
588 | store, usually the directory /nix/store, where each package has its own unique | |
589 | sub-directory.") | |
7ed6343f | 590 | (license license:lgpl2.1+))) |
a881a40c | 591 | |
8d422e25 RW |
592 | (define-public stow |
593 | (package | |
594 | (name "stow") | |
7cc98992 | 595 | (version "2.3.1") |
8d422e25 RW |
596 | (source (origin |
597 | (method url-fetch) | |
598 | (uri (string-append "mirror://gnu/stow/stow-" | |
599 | version ".tar.gz")) | |
600 | (sha256 | |
601 | (base32 | |
7cc98992 | 602 | "0jrxy12ywn7smdzdnvwzjw77l6knx6jkj2rckgykg1dpf6bdkm89")))) |
8d422e25 RW |
603 | (build-system gnu-build-system) |
604 | (inputs | |
7cc98992 | 605 | `(("perl" ,perl))) |
8d422e25 RW |
606 | (native-inputs |
607 | `(("perl-test-simple" ,perl-test-simple) | |
608 | ("perl-test-output" ,perl-test-output) | |
ddfd70da LC |
609 | ("perl-capture-tiny" ,perl-capture-tiny) |
610 | ("perl-io-stringy" ,perl-io-stringy))) | |
8d422e25 RW |
611 | (home-page "https://www.gnu.org/software/stow/") |
612 | (synopsis "Managing installed software packages") | |
613 | (description | |
614 | "GNU Stow is a symlink manager. It generates symlinks to directories | |
615 | of data and makes them appear to be merged into the same directory. It is | |
616 | typically used for managing software packages installed from source, by | |
617 | letting you install them apart in distinct directories and then create | |
618 | symlinks to the files in a common directory such as /usr/local.") | |
bdb51ed6 | 619 | (license license:gpl3+))) |
e3e1ecf6 LC |
620 | |
621 | (define-public rpm | |
622 | (package | |
623 | (name "rpm") | |
c0023514 | 624 | (version "4.14.2.1") |
e3e1ecf6 LC |
625 | (source (origin |
626 | (method url-fetch) | |
623cc34c EB |
627 | (uri (string-append "http://ftp.rpm.org/releases/rpm-" |
628 | (version-major+minor version) ".x/rpm-" | |
e3e1ecf6 LC |
629 | version ".tar.bz2")) |
630 | (sha256 | |
631 | (base32 | |
c0023514 | 632 | "1nmck2fq9h85fgs3zhh6w1avlw5y16cbz5khd459ry3jfd5w4f8i")))) |
e3e1ecf6 LC |
633 | (build-system gnu-build-system) |
634 | (arguments | |
635 | '(#:configure-flags '("--with-external-db" ;use the system's bdb | |
636 | "--enable-python" | |
637 | "--without-lua") | |
638 | #:phases (modify-phases %standard-phases | |
91a3c800 | 639 | (add-before 'configure 'set-nss-library-path |
e3e1ecf6 | 640 | (lambda* (#:key inputs #:allow-other-keys) |
91a3c800 | 641 | (let ((nss (assoc-ref inputs "nss"))) |
e3e1ecf6 LC |
642 | (setenv "LIBRARY_PATH" |
643 | (string-append (getenv "LIBRARY_PATH") ":" | |
644 | nss "/lib/nss")) | |
91a3c800 | 645 | #t)))))) |
e3e1ecf6 LC |
646 | (native-inputs |
647 | `(("pkg-config" ,pkg-config))) | |
648 | (inputs | |
c0023514 | 649 | `(("python" ,python) |
e3e1ecf6 LC |
650 | ("xz" ,xz) |
651 | ("bdb" ,bdb) | |
652 | ("popt" ,popt) | |
653 | ("nss" ,nss) | |
654 | ("nspr" ,nspr) | |
655 | ("libarchive" ,libarchive) | |
e3e1ecf6 LC |
656 | ("file" ,file) |
657 | ("bzip2" ,bzip2) | |
658 | ("zlib" ,zlib) | |
659 | ("cpio" ,cpio))) | |
c0023514 | 660 | (home-page "https://rpm.org/") |
e3e1ecf6 LC |
661 | (synopsis "The RPM Package Manager") |
662 | (description | |
663 | "The RPM Package Manager (RPM) is a command-line driven package | |
664 | management system capable of installing, uninstalling, verifying, querying, | |
665 | and updating computer software packages. Each software package consists of an | |
666 | archive of files along with information about the package like its version, a | |
667 | description. There is also a library permitting developers to manage such | |
668 | transactions from C or Python.") | |
669 | ||
670 | ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+. | |
7ed6343f | 671 | (license license:gpl2+))) |
e3e1ecf6 | 672 | |
513d35f1 MFM |
673 | (define-public python-anaconda-client |
674 | (package | |
675 | (name "python-anaconda-client") | |
676 | (version "1.6.3") | |
677 | (source | |
678 | (origin | |
837da4d3 EF |
679 | (method git-fetch) |
680 | (uri (git-reference | |
681 | (url "https://github.com/Anaconda-Platform/anaconda-client") | |
682 | (commit version))) | |
683 | (file-name (git-file-name name version)) | |
513d35f1 MFM |
684 | (sha256 |
685 | (base32 | |
837da4d3 | 686 | "0w1bfxnydjl9qp53r2gcvr6vlpdqqilcrzqxrll9sgg6vwdyiyyp")))) |
513d35f1 MFM |
687 | (build-system python-build-system) |
688 | (propagated-inputs | |
689 | `(("python-pyyaml" ,python-pyyaml) | |
690 | ("python-requests" ,python-requests) | |
691 | ("python-clyent" ,python-clyent))) | |
692 | (native-inputs | |
693 | `(("python-pytz" ,python-pytz) | |
694 | ("python-dateutil" ,python-dateutil) | |
695 | ("python-mock" ,python-mock) | |
696 | ("python-coverage" ,python-coverage) | |
697 | ("python-pillow" ,python-pillow))) | |
698 | (arguments | |
699 | `(#:phases | |
700 | (modify-phases %standard-phases | |
701 | ;; This is needed for some tests. | |
702 | (add-before 'check 'set-up-home | |
703 | (lambda* _ (setenv "HOME" "/tmp") #t)) | |
704 | (add-before 'check 'remove-network-tests | |
705 | (lambda* _ | |
706 | ;; Remove tests requiring a network connection | |
707 | (let ((network-tests '("tests/test_upload.py" | |
708 | "tests/test_authorizations.py" | |
709 | "tests/test_login.py" | |
710 | "tests/test_whoami.py" | |
711 | "utils/notebook/tests/test_data_uri.py" | |
712 | "utils/notebook/tests/test_base.py" | |
713 | "utils/notebook/tests/test_downloader.py" | |
714 | "inspect_package/tests/test_conda.py"))) | |
715 | (with-directory-excursion "binstar_client" | |
716 | (for-each delete-file network-tests))) | |
717 | #t))))) | |
718 | (home-page "https://github.com/Anaconda-Platform/anaconda-client") | |
719 | (synopsis "Anaconda Cloud command line client library") | |
720 | (description | |
721 | "Anaconda Cloud command line client library provides an interface to | |
722 | Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and | |
723 | environments.") | |
7ed6343f | 724 | (license license:bsd-3))) |
513d35f1 MFM |
725 | |
726 | (define-public python2-anaconda-client | |
727 | (package-with-python2 python-anaconda-client)) | |
4bc08b6e MFM |
728 | |
729 | (define-public python-conda | |
730 | (package | |
731 | (name "python-conda") | |
732 | (version "4.3.16") | |
733 | (source | |
734 | (origin | |
6def31e8 EF |
735 | (method git-fetch) |
736 | (uri (git-reference | |
737 | (url "https://github.com/conda/conda") | |
738 | (commit version))) | |
739 | (file-name (git-file-name name version)) | |
4bc08b6e MFM |
740 | (sha256 |
741 | (base32 | |
6def31e8 | 742 | "1qwy0awx4qf2pbk8z2b7q6wdcq7mvwpxxjhg27mbirdvs5hw7hb2")))) |
4bc08b6e MFM |
743 | (build-system python-build-system) |
744 | (arguments | |
745 | `(#:phases | |
746 | (modify-phases %standard-phases | |
747 | (add-before 'build 'create-version-file | |
748 | (lambda _ | |
749 | (with-output-to-file "conda/.version" | |
750 | (lambda () (display ,version))) | |
751 | #t)) | |
752 | (add-before 'check 'remove-failing-tests | |
753 | (lambda _ | |
754 | ;; These tests require internet/network access | |
755 | (let ((network-tests '("test_cli.py" | |
756 | "test_create.py" | |
757 | "test_export.py" | |
758 | "test_fetch.py" | |
759 | "test_history.py" | |
760 | "test_info.py" | |
761 | "test_install.py" | |
762 | "test_priority.py" | |
763 | "conda_env/test_cli.py" | |
764 | "conda_env/test_create.py" | |
765 | "conda_env/specs/test_notebook.py" | |
766 | "conda_env/utils/test_notebooks.py" | |
767 | "core/test_index.py" | |
768 | "core/test_repodata.py"))) | |
769 | (with-directory-excursion "tests" | |
770 | (for-each delete-file network-tests) | |
771 | ||
772 | ;; FIXME: This test creates a file, then deletes it and tests | |
773 | ;; that the file was deleted. For some reason it fails when | |
774 | ;; building with guix, but does not when you run it in the | |
775 | ;; directory left when you build with the --keep-failed | |
776 | ;; option | |
777 | (delete-file "gateways/disk/test_delete.py") | |
6def31e8 EF |
778 | ;; This file is no longer writable after downloading with 'git-fetch' |
779 | (make-file-writable "conda_env/support/saved-env/environment.yml") | |
4bc08b6e MFM |
780 | #t)))) |
781 | (replace 'check | |
782 | (lambda _ | |
783 | (setenv "HOME" "/tmp") | |
675e7bba | 784 | (invoke "py.test")))))) |
4bc08b6e | 785 | (native-inputs |
e227f248 EF |
786 | `(("python-cytoolz" ,python-cytoolz) |
787 | ("python-ruamel.yaml" ,python-ruamel.yaml) | |
4bc08b6e MFM |
788 | ("python-requests" ,python-requests) |
789 | ("python-pycosat" ,python-pycosat) | |
790 | ("python-pytest" ,python-pytest) | |
791 | ("python-responses" ,python-responses) | |
792 | ("python-pyyaml" ,python-pyyaml) | |
793 | ("python-anaconda-client" ,python-anaconda-client))) | |
794 | (home-page "https://github.com/conda/conda") | |
795 | (synopsis "Cross-platform, OS-agnostic, system-level binary package manager") | |
796 | (description | |
797 | "Conda is a cross-platform, Python-agnostic binary package manager. It | |
798 | is the package manager used by Anaconda installations, but it may be used for | |
799 | other systems as well. Conda makes environments first-class citizens, making | |
800 | it easy to create independent environments even for C libraries. Conda is | |
801 | written entirely in Python. | |
802 | ||
803 | This package provides Conda as a library.") | |
7ed6343f | 804 | (license license:bsd-3))) |
4bc08b6e MFM |
805 | |
806 | (define-public python2-conda | |
2c5cf844 LF |
807 | (let ((base (package-with-python2 |
808 | (strip-python2-variant python-conda)))) | |
809 | (package (inherit base) | |
810 | (native-inputs | |
811 | `(("python2-enum34" ,python2-enum34) | |
812 | ,@(package-native-inputs base)))))) | |
84fcb580 MFM |
813 | |
814 | (define-public conda | |
815 | (package (inherit python-conda) | |
816 | (name "conda") | |
817 | (arguments | |
818 | (substitute-keyword-arguments (package-arguments python-conda) | |
819 | ((#:phases phases) | |
820 | `(modify-phases ,phases | |
821 | (replace 'build | |
822 | (lambda* (#:key outputs #:allow-other-keys) | |
823 | ;; This test fails when run before installation. | |
824 | (delete-file "tests/test_activate.py") | |
825 | ||
826 | ;; Fix broken defaults | |
827 | (substitute* "conda/base/context.py" | |
828 | (("return sys.prefix") | |
829 | (string-append "return \"" (assoc-ref outputs "out") "\"")) | |
830 | (("return (prefix_is_writable\\(self.root_prefix\\))" _ match) | |
831 | (string-append "return False if self.root_prefix == self.conda_prefix else " | |
832 | match))) | |
833 | ||
834 | ;; The util/setup-testing.py is used to build conda in | |
835 | ;; application form, rather than the default, library form. | |
836 | ;; With this, we are able to run commands like `conda --help` | |
837 | ;; directly on the command line | |
d691e966 | 838 | (invoke "python" "utils/setup-testing.py" "build_py"))) |
84fcb580 MFM |
839 | (replace 'install |
840 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
841 | (let* ((out (assoc-ref outputs "out")) | |
842 | (target (string-append out "/lib/python" | |
9c2563a8 | 843 | (python-version |
84fcb580 MFM |
844 | (assoc-ref inputs "python")) |
845 | "/site-packages/"))) | |
846 | ;; The installer aborts if the target directory is not on | |
847 | ;; PYTHONPATH. | |
848 | (setenv "PYTHONPATH" | |
849 | (string-append target ":" (getenv "PYTHONPATH"))) | |
850 | ||
851 | ;; And it aborts if the directory doesn't exist. | |
852 | (mkdir-p target) | |
d691e966 EF |
853 | (invoke "python" "utils/setup-testing.py" "install" |
854 | (string-append "--prefix=" out))))) | |
1d84500a RW |
855 | ;; The "activate" and "deactivate" scripts don't need wrapping. |
856 | ;; They also break when they are renamed. | |
857 | (add-after 'wrap 'undo-wrap | |
858 | (lambda* (#:key outputs #:allow-other-keys) | |
859 | (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/") | |
860 | (delete-file "deactivate") | |
861 | (rename-file ".deactivate-real" "deactivate") | |
862 | (delete-file "activate") | |
863 | (rename-file ".activate-real" "activate") | |
864 | #t))))))) | |
84fcb580 MFM |
865 | (description |
866 | "Conda is a cross-platform, Python-agnostic binary package manager. It | |
867 | is the package manager used by Anaconda installations, but it may be used for | |
868 | other systems as well. Conda makes environments first-class citizens, making | |
869 | it easy to create independent environments even for C libraries. Conda is | |
870 | written entirely in Python."))) | |
58a308e0 RJ |
871 | |
872 | (define-public gwl | |
873 | (package | |
874 | (name "gwl") | |
efb98dd0 | 875 | (version "0.2.1") |
58a308e0 RJ |
876 | (source (origin |
877 | (method url-fetch) | |
598ea80f | 878 | (uri (string-append "mirror://gnu/gwl/gwl-" version ".tar.gz")) |
58a308e0 RJ |
879 | (sha256 |
880 | (base32 | |
efb98dd0 | 881 | "1ji5jvzni8aml9fmimlr11g3k8isrnlvnbzhmwgdjh72hils0alc")))) |
58a308e0 | 882 | (build-system gnu-build-system) |
efb98dd0 RW |
883 | (arguments |
884 | `(#:phases | |
885 | (modify-phases %standard-phases | |
886 | (add-before 'build 'fix-tests | |
887 | (lambda _ | |
888 | ;; Avoid cross-device link. | |
889 | (substitute* "tests/cache.scm" | |
890 | (("/tmp/gwl-test-input-XXXXXX") | |
891 | (string-append (getcwd) "/gwl-test-input-XXXXXX"))) | |
892 | #t))))) | |
58a308e0 RJ |
893 | (native-inputs |
894 | `(("autoconf" ,autoconf) | |
895 | ("automake" ,automake) | |
598ea80f RW |
896 | ("pkg-config" ,pkg-config) |
897 | ("texinfo" ,texinfo) | |
898 | ("graphviz" ,graphviz))) | |
58a308e0 | 899 | (inputs |
bfb6c393 | 900 | `(("guile" ,guile-3.0))) |
58a308e0 | 901 | (propagated-inputs |
b6bee63b LC |
902 | `(("guix" ,guix) |
903 | ("guile-commonmark" ,guile-commonmark) | |
904 | ("guile-gcrypt" ,guile-gcrypt) | |
905 | ("guile-pfds" ,guile-pfds) | |
906 | ("guile-syntax-highlight" ,guile-syntax-highlight) | |
907 | ("guile-wisp" ,guile-wisp))) | |
598ea80f | 908 | (home-page "https://workflows.guix.info") |
58a308e0 | 909 | (synopsis "Workflow management extension for GNU Guix") |
598ea80f RW |
910 | (description "The @dfn{Guix Workflow Language} (GWL) provides an |
911 | extension to GNU Guix's declarative language for package management to | |
912 | automate the execution of programs in scientific workflows. The GWL | |
913 | can use process engines to integrate with various computing | |
914 | environments.") | |
58a308e0 RJ |
915 | ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+, |
916 | ;; the web interface modules in gwl/ are licensed AGPL3+, | |
917 | ;; and the fonts included in this package are licensed OFL1.1. | |
7ed6343f | 918 | (license (list license:gpl3+ license:agpl3+ license:silofl1.1)))) |
98a11b7f | 919 | |
fc1fe722 LC |
920 | (define-public guix-jupyter |
921 | (package | |
922 | (name "guix-jupyter") | |
923 | (version "0.1.0") | |
924 | (home-page "https://gitlab.inria.fr/guix-hpc/guix-kernel") | |
925 | (source (origin | |
926 | (method git-fetch) | |
927 | (uri (git-reference (url home-page) | |
928 | (commit (string-append "v" version)))) | |
929 | (sha256 | |
930 | (base32 | |
931 | "01z7jjkc7r7lj6637rcgpz40v8xqqyfp6871h94yvcnwm7zy9h1n")) | |
b6bee63b LC |
932 | (modules '((guix build utils))) |
933 | (snippet | |
934 | '(begin | |
935 | ;; Allow builds with Guile 3.0. | |
936 | (substitute* "configure.ac" | |
937 | (("^GUILE_PKG.*") | |
938 | "GUILE_PKG([3.0 2.2])\n")) | |
939 | #t)) | |
fc1fe722 LC |
940 | (file-name (string-append "guix-jupyter-" version "-checkout")))) |
941 | (build-system gnu-build-system) | |
942 | (arguments | |
943 | `(#:modules ((srfi srfi-26) | |
944 | (ice-9 match) | |
945 | (ice-9 popen) | |
946 | (ice-9 rdelim) | |
947 | (guix build utils) | |
948 | (guix build gnu-build-system)) | |
949 | #:phases | |
950 | (modify-phases %standard-phases | |
951 | (add-after 'install 'sed-kernel-json | |
952 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
953 | (let* ((out (assoc-ref outputs "out")) | |
954 | (guix (assoc-ref inputs "guix")) | |
955 | (guile (assoc-ref inputs "guile")) | |
956 | (json (assoc-ref inputs "guile-json")) | |
957 | (git (assoc-ref inputs "guile-git")) | |
958 | (bs (assoc-ref inputs "guile-bytestructures")) | |
959 | (s-zmq (assoc-ref inputs "guile-simple-zmq")) | |
960 | (gcrypt (assoc-ref inputs "guile-gcrypt")) | |
961 | (deps (list out s-zmq guix json git bs gcrypt)) | |
962 | (effective | |
963 | (read-line | |
964 | (open-pipe* OPEN_READ | |
965 | (string-append guile "/bin/guile") | |
966 | "-c" "(display (effective-version))"))) | |
967 | (path (map (cut string-append "-L\", \"" <> | |
968 | "/share/guile/site/" | |
969 | effective) | |
970 | deps)) | |
971 | (gopath (map (cut string-append "-C\", \"" <> | |
972 | "/lib/guile/" effective | |
973 | "/site-ccache") | |
974 | deps)) | |
975 | (kernel-dir (string-append out "/share/jupyter/kernels/guix/"))) | |
976 | (substitute* (string-append kernel-dir "kernel.json") | |
977 | (("-s") | |
978 | (string-join | |
979 | (list (string-join path "\",\n\t\t\"") | |
980 | (string-join gopath "\",\n\t\t\"") | |
981 | "-s") | |
982 | "\",\n\t\t\"")) | |
983 | (("guix-jupyter-kernel.scm") | |
984 | (string-append out "/share/guile/site/2.2/" | |
985 | "guix-jupyter-kernel.scm"))) | |
986 | #t)))))) | |
987 | (native-inputs | |
988 | `(("autoconf" ,autoconf) | |
989 | ("automake" ,automake) | |
990 | ("pkg-config" ,pkg-config) | |
991 | ||
992 | ;; For testing. | |
d3650775 LC |
993 | ("jupyter" ,jupyter) |
994 | ("python-ipython" ,python-ipython) | |
995 | ("python-ipykernel" ,python-ipykernel))) | |
fc1fe722 LC |
996 | (inputs |
997 | `(("guix" ,guix) | |
b6bee63b | 998 | ("guile" ,guile-3.0))) |
fc1fe722 | 999 | (propagated-inputs |
8f7cf3b5 | 1000 | `(("guile-json" ,guile-json-4) |
fc1fe722 LC |
1001 | ("guile-simple-zmq" ,guile-simple-zmq) |
1002 | ("guile-gcrypt" ,guile-gcrypt))) | |
1003 | (synopsis "Guix kernel for Jupyter") | |
1004 | (description | |
1005 | "Guix-Jupyter is a Jupyter kernel. It allows you to annotate notebooks | |
1006 | with information about their software dependencies, such that code is executed | |
1007 | in the right software environment. Guix-Jupyter spawns the actual kernels | |
1008 | such as @code{python-ipykernel} on behalf of the notebook user and runs them | |
1009 | in an isolated environment, in separate namespaces.") | |
1010 | (license license:gpl3+))) | |
1011 | ||
98a11b7f TGR |
1012 | (define-public gcab |
1013 | (package | |
1014 | (name "gcab") | |
a1785cfb | 1015 | (version "1.2") |
98a11b7f TGR |
1016 | (source (origin |
1017 | (method url-fetch) | |
41eac186 TGR |
1018 | (uri (string-append "mirror://gnome/sources/gcab/" |
1019 | version "/gcab-" version ".tar.xz")) | |
98a11b7f TGR |
1020 | (sha256 |
1021 | (base32 | |
a1785cfb | 1022 | "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas")))) |
44118720 | 1023 | (build-system meson-build-system) |
98a11b7f | 1024 | (native-inputs |
44118720 TGR |
1025 | `(("glib:bin" ,glib "bin") ; for glib-mkenums |
1026 | ("intltool" ,intltool) | |
1027 | ("pkg-config" ,pkg-config) | |
1028 | ("vala" ,vala))) | |
98a11b7f TGR |
1029 | (inputs |
1030 | `(("glib" ,glib) | |
1031 | ("zlib" ,zlib))) | |
44118720 TGR |
1032 | (arguments |
1033 | `(#:configure-flags | |
1034 | ;; XXX This ‘documentation’ is for developers, and fails informatively: | |
1035 | ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5 | |
1036 | (list "-Ddocs=false" | |
1037 | "-Dintrospection=false"))) | |
98a11b7f TGR |
1038 | (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page |
1039 | (synopsis "Microsoft Cabinet file manipulation library") | |
1040 | (description | |
1041 | "The libgcab library provides GObject functions to read, write, and modify | |
1042 | Microsoft cabinet (.@dfn{CAB}) files.") | |
1043 | (license (list license:gpl2+ ; tests/testsuite.at | |
1044 | license:lgpl2.1+)))) ; the rest | |
cb390925 TGR |
1045 | |
1046 | (define-public msitools | |
1047 | (package | |
1048 | (name "msitools") | |
84748e71 | 1049 | (version "0.100") |
cb390925 TGR |
1050 | (source (origin |
1051 | (method url-fetch) | |
a4469936 TGR |
1052 | (uri (string-append "mirror://gnome/sources/msitools/" |
1053 | version "/msitools-" version ".tar.xz")) | |
cb390925 TGR |
1054 | (sha256 |
1055 | (base32 | |
84748e71 | 1056 | "1skq17qr2ic4qr3779j49byfm8rncwbsq9rj1a33ncn2m7isdwdv")))) |
cb390925 TGR |
1057 | (build-system gnu-build-system) |
1058 | (native-inputs | |
9e4da9f2 TGR |
1059 | `(("bison" ,bison) |
1060 | ("pkg-config" ,pkg-config))) | |
cb390925 TGR |
1061 | (inputs |
1062 | `(("gcab" ,gcab) | |
1063 | ("glib" ,glib) | |
1064 | ("libgsf" ,libgsf) | |
1065 | ("libxml2" ,libxml2) | |
bb93042c | 1066 | ("uuid" ,util-linux "lib"))) |
cb390925 TGR |
1067 | (home-page "https://wiki.gnome.org/msitools") |
1068 | (synopsis "Windows Installer file manipulation tool") | |
1069 | (description | |
1070 | "msitools is a collection of command-line tools to inspect, extract, build, | |
1071 | and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution | |
1072 | for packaging and deployment of cross-compiled Windows applications.") | |
1073 | (license license:lgpl2.1+))) | |
3d391309 SB |
1074 | |
1075 | (define-public libostree | |
1076 | (package | |
1077 | (name "libostree") | |
77ca6fb3 | 1078 | (version "2020.3") |
3d391309 SB |
1079 | (source (origin |
1080 | (method url-fetch) | |
1081 | (uri (string-append | |
1082 | "https://github.com/ostreedev/ostree/releases/download/v" | |
83d4da12 | 1083 | (version-major+minor version) "/libostree-" version ".tar.xz")) |
3d391309 SB |
1084 | (sha256 |
1085 | (base32 | |
77ca6fb3 | 1086 | "01cch4as23xspq6pck59al7x5jj60wl21g8p3iqbdxcjl1p3jxsq")))) |
3d391309 SB |
1087 | (build-system gnu-build-system) |
1088 | (arguments | |
1089 | '(#:phases | |
1090 | (modify-phases %standard-phases | |
1091 | (add-before 'check 'pre-check | |
1092 | (lambda _ | |
1093 | ;; Don't try to use the non-existing '/var/tmp' as test | |
1094 | ;; directory. | |
1095 | (setenv "TEST_TMPDIR" (getenv "TMPDIR")) | |
1096 | #t))) | |
1097 | ;; XXX: fails with: | |
5f97cc23 | 1098 | ;; tap-driver.sh: missing test plan |
3d391309 SB |
1099 | ;; tap-driver.sh: internal error getting exit status |
1100 | ;; tap-driver.sh: fatal: I/O or internal error | |
1101 | #:tests? #f)) | |
1102 | (native-inputs | |
1103 | `(("attr" ,attr) ; for tests | |
1104 | ("bison" ,bison) | |
5f97cc23 | 1105 | ("glib:bin" ,glib "bin") ; for 'glib-mkenums' |
3d391309 SB |
1106 | ("gobject-introspection" ,gobject-introspection) |
1107 | ("pkg-config" ,pkg-config) | |
1108 | ("xsltproc" ,libxslt))) | |
1109 | (inputs | |
1110 | `(("avahi" ,avahi) | |
1111 | ("docbook-xml" ,docbook-xml-4.2) | |
1112 | ("docbook-xsl" ,docbook-xsl) | |
1113 | ("e2fsprogs" ,e2fsprogs) | |
1114 | ("fuse" ,fuse) | |
1115 | ("glib" ,glib) | |
1116 | ("gpgme" ,gpgme) | |
1117 | ("libarchive" ,libarchive) | |
1118 | ("libsoup" ,libsoup) | |
3d391309 SB |
1119 | ("util-linux" ,util-linux))) |
1120 | (home-page "https://ostree.readthedocs.io/en/latest/") | |
1121 | (synopsis "Operating system and container binary deployment and upgrades") | |
1122 | (description | |
1123 | "@code{libostree} is both a shared library and suite of command line | |
1124 | tools that combines a \"git-like\" model for committing and downloading | |
52beae7b TGR |
1125 | bootable file system trees, along with a layer for deploying them and managing |
1126 | the boot loader configuration.") | |
3d391309 | 1127 | (license license:lgpl2.0+))) |
36e1ab84 RH |
1128 | |
1129 | (define-public flatpak | |
1130 | (package | |
122db9a6 | 1131 | (name "flatpak") |
ac68fb3b | 1132 | (version "1.6.3") |
122db9a6 RH |
1133 | (source |
1134 | (origin | |
1135 | (method url-fetch) | |
1136 | (uri (string-append "https://github.com/flatpak/flatpak/releases/download/" | |
1137 | version "/flatpak-" version ".tar.xz")) | |
1138 | (sha256 | |
1139 | (base32 | |
ac68fb3b | 1140 | "17s8nqdxd4xdy7ag9bw06adxccha78jmlsa3zpqnl3qh92pg0hji")))) |
16360cc8 LC |
1141 | |
1142 | ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to | |
1143 | ;; find the TLS backend in glib-networking. | |
1144 | (build-system glib-or-gtk-build-system) | |
1145 | ||
122db9a6 | 1146 | (arguments |
ac68fb3b RW |
1147 | '(#:configure-flags |
1148 | (list | |
1149 | "--enable-documentation=no" ;; FIXME | |
1150 | "--enable-system-helper=no" | |
1151 | "--localstatedir=/var" | |
1152 | (string-append "--with-system-bubblewrap=" | |
1153 | (assoc-ref %build-inputs "bubblewrap") | |
1154 | "/bin/bwrap") | |
1155 | "--with-system-dbus-proxy") | |
1156 | #:phases | |
1157 | (modify-phases %standard-phases | |
1158 | (add-after 'unpack 'fix-tests | |
1159 | (lambda* (#:key inputs #:allow-other-keys) | |
1160 | (copy-recursively | |
1161 | (string-append (assoc-ref inputs "glibc-utf8-locales") | |
1162 | "/lib/locale/") "/tmp/locale") | |
1163 | (for-each make-file-writable (find-files "/tmp")) | |
1164 | (substitute* "tests/make-test-runtime.sh" | |
1165 | (("cp `which.*") "echo guix\n") | |
1166 | (("cp -r /usr/lib/locale/C\\.\\*") | |
1167 | (string-append "mkdir ${DIR}/usr/lib/locale/en_US; \ | |
1168 | cp -r /tmp/locale/*/en_US.*"))) | |
1169 | (substitute* "tests/libtest.sh" | |
1170 | (("/bin/kill") (which "kill")) | |
1171 | (("/usr/bin/python3") (which "python3"))) | |
1172 | #t)) | |
1173 | ;; Many tests fail for unknown reasons, so we just run a few basic | |
1174 | ;; tests | |
1175 | (replace 'check | |
1176 | (lambda _ | |
1177 | (setenv "HOME" "/tmp") | |
1178 | (invoke "make" "check" | |
1179 | "TESTS=tests/test-basic.sh tests/test-config.sh testcommon")))))) | |
1180 | (native-inputs | |
1181 | `(("bison" ,bison) | |
1182 | ("dbus" ,dbus) ; for dbus-daemon | |
1183 | ("gettext" ,gettext-minimal) | |
1184 | ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen | |
1185 | ("glibc-utf8-locales" ,glibc-utf8-locales) | |
1186 | ("gobject-introspection" ,gobject-introspection) | |
1187 | ("libcap" ,libcap) | |
1188 | ("pkg-config" ,pkg-config) | |
1189 | ("python" ,python) | |
1190 | ("socat" ,socat) | |
1191 | ("which" ,which))) | |
75f0bda7 RH |
1192 | (propagated-inputs `(("glib-networking" ,glib-networking) |
1193 | ("gnupg" ,gnupg) | |
1194 | ("gsettings-desktop-schemas" | |
1195 | ,gsettings-desktop-schemas))) | |
ac68fb3b RW |
1196 | (inputs |
1197 | `(("appstream-glib" ,appstream-glib) | |
1198 | ("bubblewrap" ,bubblewrap) | |
1199 | ("dconf" ,dconf) | |
1200 | ("fuse" ,fuse) | |
1201 | ("gdk-pixbuf" ,gdk-pixbuf) | |
1202 | ("gpgme" ,gpgme) | |
1203 | ("json-glib" ,json-glib) | |
1204 | ("libarchive" ,libarchive) | |
1205 | ("libostree" ,libostree) | |
1206 | ("libseccomp" ,libseccomp) | |
1207 | ("libsoup" ,libsoup) | |
1208 | ("libxau" ,libxau) | |
1209 | ("libxml2" ,libxml2) | |
1210 | ("util-linux" ,util-linux) | |
1211 | ("xdg-dbus-proxy" ,xdg-dbus-proxy))) | |
122db9a6 RH |
1212 | (home-page "https://flatpak.org") |
1213 | (synopsis "System for building, distributing, and running sandboxed desktop | |
36e1ab84 | 1214 | applications") |
122db9a6 | 1215 | (description "Flatpak is a system for building, distributing, and running |
36e1ab84 | 1216 | sandboxed desktop applications on GNU/Linux.") |
122db9a6 | 1217 | (license license:lgpl2.1+))) |