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> |
3a27a3dc | 17 | ;;; Copyright © 2020 Jesse Gibbons <jgibbons2357+guix@gmail.com> |
e343816d | 18 | ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net> |
bbe8d8f0 LC |
19 | ;;; |
20 | ;;; This file is part of GNU Guix. | |
21 | ;;; | |
22 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
23 | ;;; under the terms of the GNU General Public License as published by | |
24 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
25 | ;;; your option) any later version. | |
26 | ;;; | |
27 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
28 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
29 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
30 | ;;; GNU General Public License for more details. | |
31 | ;;; | |
32 | ;;; You should have received a copy of the GNU General Public License | |
33 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
34 | ||
35 | (define-module (gnu packages package-management) | |
8a43ff10 | 36 | #:use-module (gnu packages) |
37756a13 | 37 | #:use-module (gnu packages acl) |
3d391309 SB |
38 | #:use-module (gnu packages attr) |
39 | #:use-module (gnu packages avahi) | |
37756a13 | 40 | #:use-module (gnu packages autotools) |
e3e1ecf6 | 41 | #:use-module (gnu packages backup) |
8a973abc | 42 | #:use-module (gnu packages base) |
38b9af7c | 43 | #:use-module (gnu packages bash) |
37756a13 | 44 | #:use-module (gnu packages bdw-gc) |
3d391309 | 45 | #:use-module (gnu packages bison) |
13c18af1 | 46 | #:use-module (gnu packages boost) |
3e5750af | 47 | #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin' |
ac257f12 | 48 | #:use-module (gnu packages check) |
38cf2ba0 | 49 | #:use-module (gnu packages compression) |
37756a13 | 50 | #:use-module (gnu packages cpio) |
e6c8199b | 51 | #:use-module (gnu packages crypto) |
37756a13 | 52 | #:use-module (gnu packages curl) |
c2cb0e46 | 53 | #:use-module (gnu packages databases) |
255d1bbe | 54 | #:use-module (gnu packages dbm) |
3d391309 | 55 | #:use-module (gnu packages docbook) |
37756a13 | 56 | #:use-module (gnu packages file) |
480af4d6 | 57 | #:use-module (gnu packages gettext) |
98a11b7f | 58 | #:use-module (gnu packages glib) |
cb390925 | 59 | #:use-module (gnu packages gnome) |
37756a13 | 60 | #:use-module (gnu packages gnupg) |
37756a13 | 61 | #:use-module (gnu packages graphviz) |
36e1ab84 | 62 | #:use-module (gnu packages gtk) |
37756a13 | 63 | #:use-module (gnu packages guile) |
0791437f | 64 | #:use-module (gnu packages guile-xyz) |
52b01cb7 | 65 | #:use-module (gnu packages hurd) |
13c18af1 | 66 | #:use-module (gnu packages libedit) |
cb390925 | 67 | #:use-module (gnu packages linux) |
58a308e0 | 68 | #:use-module (gnu packages lisp) |
37756a13 | 69 | #:use-module (gnu packages man) |
e3e1ecf6 | 70 | #:use-module (gnu packages nettle) |
ac68fb3b | 71 | #:use-module (gnu packages networking) |
aff0cce9 | 72 | #:use-module (gnu packages nss) |
37756a13 | 73 | #:use-module (gnu packages patchutils) |
fcb0109d | 74 | #:use-module (gnu packages perl) |
5ccde207 | 75 | #:use-module (gnu packages perl-check) |
37756a13 TGR |
76 | #:use-module (gnu packages pkg-config) |
77 | #:use-module (gnu packages popt) | |
e3e1ecf6 | 78 | #:use-module (gnu packages python) |
1b2f753d | 79 | #:use-module (gnu packages python-web) |
44d10b1f | 80 | #:use-module (gnu packages python-xyz) |
37756a13 | 81 | #:use-module (gnu packages serialization) |
cd0322a3 | 82 | #:use-module (gnu packages sqlite) |
37756a13 TGR |
83 | #:use-module (gnu packages ssh) |
84 | #:use-module (gnu packages texinfo) | |
33dc54b0 | 85 | #:use-module (gnu packages time) |
04eb0fab | 86 | #:use-module (gnu packages tls) |
5dbeccf5 | 87 | #:use-module (gnu packages vim) |
36e1ab84 | 88 | #:use-module (gnu packages virtualization) |
37756a13 | 89 | #:use-module (gnu packages web) |
cb390925 | 90 | #:use-module (gnu packages xml) |
36e1ab84 | 91 | #:use-module (gnu packages xorg) |
16360cc8 | 92 | #:use-module (guix build-system glib-or-gtk) |
37756a13 | 93 | #:use-module (guix build-system gnu) |
44118720 | 94 | #:use-module (guix build-system meson) |
37756a13 TGR |
95 | #:use-module (guix build-system python) |
96 | #:use-module (guix download) | |
97 | #:use-module (guix gexp) | |
98 | #:use-module (guix git-download) | |
7ed6343f | 99 | #:use-module ((guix licenses) #:prefix license:) |
37756a13 TGR |
100 | #:use-module (guix packages) |
101 | #:use-module (guix utils) | |
102 | #:use-module (ice-9 match) | |
103 | #:use-module (srfi srfi-1)) | |
bbe8d8f0 | 104 | |
39de700c LC |
105 | (define (boot-guile-uri arch) |
106 | "Return the URI for the bootstrap Guile tarball for ARCH." | |
aef81a81 LC |
107 | (cond ((string=? "armhf" arch) |
108 | (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/" | |
109 | arch "-linux" | |
110 | "/20150101/guile-2.0.11.tar.xz")) | |
111 | ((string=? "aarch64" arch) | |
b31b0155 LC |
112 | (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/" |
113 | arch "-linux/20170217/guile-2.0.14.tar.xz")) | |
aef81a81 LC |
114 | (else |
115 | (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/" | |
116 | arch "-linux" | |
117 | "/20131110/guile-2.0.9.tar.xz")))) | |
39de700c | 118 | |
2f458ad7 JK |
119 | ;; NOTE: The commit IDs used here form a linked list threaded through the git |
120 | ;; history. In a phenomenon known as boot-stripping, not only the head of this | |
121 | ;; list is used, but also a few older versions, when a guix from this package is | |
122 | ;; used to build something also depending on guix. | |
123 | ;; | |
124 | ;; Therefore, if, by accident, you set this package to a non-existent commit ID, | |
125 | ;; it is insufficient to simply correct it with the latest commit. | |
126 | ;; Instead, please push one commit that rolls back Guix to before the mistake, | |
127 | ;; and then another that points to the first one. That way, the faulty commit | |
128 | ;; won't appear on the linked list. | |
994a1494 LC |
129 | (define-public guix |
130 | ;; Latest version of Guix, which may or may not correspond to a release. | |
94fa8d76 LC |
131 | ;; Note: the 'update-guix-package.scm' script expects this definition to |
132 | ;; start precisely like this. | |
33ff35d5 | 133 | (let ((version "1.1.0") |
e17b7324 MC |
134 | (commit "875c01f82dc5f2c4ca82952ea88b3240fbe8bede") |
135 | (revision 30)) | |
994a1494 LC |
136 | (package |
137 | (name "guix") | |
ab2419e5 | 138 | |
994a1494 LC |
139 | (version (if (zero? revision) |
140 | version | |
141 | (string-append version "-" | |
142 | (number->string revision) | |
4b7917f2 | 143 | "." (string-take commit 7)))) |
994a1494 LC |
144 | (source (origin |
145 | (method git-fetch) | |
146 | (uri (git-reference | |
f73f3d01 | 147 | (url "https://git.savannah.gnu.org/git/guix.git") |
994a1494 LC |
148 | (commit commit))) |
149 | (sha256 | |
150 | (base32 | |
e17b7324 | 151 | "0mh1hnrk84h5nzqp6aflh9ab3kxr5672c8bx44minzyd26177yik")) |
994a1494 LC |
152 | (file-name (string-append "guix-" version "-checkout")))) |
153 | (build-system gnu-build-system) | |
154 | (arguments | |
155 | `(#:configure-flags (list | |
156 | "--localstatedir=/var" | |
157 | "--sysconfdir=/etc" | |
158 | (string-append "--with-bash-completion-dir=" | |
159 | (assoc-ref %outputs "out") | |
160 | "/etc/bash_completion.d") | |
994a1494 LC |
161 | |
162 | ;; Set 'DOT_USER_PROGRAM' to the empty string so | |
163 | ;; we don't keep a reference to Graphviz, whose | |
59e80445 LC |
164 | ;; closure is pretty big (too big for the Guix |
165 | ;; system installation image.) | |
4b7917f2 LC |
166 | "ac_cv_path_DOT_USER_PROGRAM=dot" |
167 | ||
168 | ;; To avoid problems with the length of shebangs, | |
169 | ;; choose a fixed-width and short directory name | |
170 | ;; for tests. | |
52b01cb7 JN |
171 | "ac_cv_guix_test_root=/tmp/guix-tests" |
172 | ,@(if (hurd-target?) '("--with-courage") '())) | |
994a1494 LC |
173 | #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097> |
174 | ||
175 | #:modules ((guix build gnu-build-system) | |
176 | (guix build utils) | |
c9117162 | 177 | (srfi srfi-26) |
994a1494 LC |
178 | (ice-9 popen) |
179 | (ice-9 rdelim)) | |
180 | ||
181 | #:phases (modify-phases %standard-phases | |
189be331 | 182 | (replace 'bootstrap |
994a1494 LC |
183 | (lambda _ |
184 | ;; Make sure 'msgmerge' can modify the PO files. | |
185 | (for-each (lambda (po) | |
186 | (chmod po #o666)) | |
187 | (find-files "." "\\.po$")) | |
ab2419e5 | 188 | |
8833a647 LC |
189 | (patch-shebang "build-aux/git-version-gen") |
190 | ||
91c619eb LC |
191 | (call-with-output-file ".tarball-version" |
192 | (lambda (port) | |
193 | (display ,version port))) | |
194 | ||
fe4a3727 LC |
195 | ;; Install SysV init files to $(prefix)/etc rather |
196 | ;; than to /etc. | |
197 | (substitute* "nix/local.mk" | |
198 | (("^sysvinitservicedir = .*$") | |
199 | (string-append "sysvinitservicedir = \ | |
200 | $(prefix)/etc/init.d\n"))) | |
201 | ||
d27dbeb9 MO |
202 | ;; Install OpenRC init files to $(prefix)/etc rather |
203 | ;; than to /etc. | |
204 | (substitute* "nix/local.mk" | |
205 | (("^openrcservicedir = .*$") | |
206 | (string-append "openrcservicedir = \ | |
207 | $(prefix)/etc/init.d\n"))) | |
208 | ||
92fcb831 | 209 | (invoke "sh" "bootstrap"))) |
569c55be JN |
210 | (add-before 'build 'use-host-compressors |
211 | (lambda* (#:key inputs target #:allow-other-keys) | |
212 | (when target | |
213 | ;; Use host compressors. | |
214 | (let ((bzip2 (assoc-ref inputs "bzip2")) | |
215 | (gzip (assoc-ref inputs "gzip")) | |
216 | (xz (assoc-ref inputs "xz"))) | |
217 | (substitute* "guix/config.scm" | |
218 | (("\"[^\"]*/bin/bzip2") | |
219 | (string-append "\"" bzip2 "/bin/bzip2")) | |
220 | (("\"[^\"]*/bin/gzip") gzip | |
221 | (string-append "\"" gzip "/bin/gzip")) | |
222 | (("\"[^\"]*/bin//xz") | |
223 | (string-append "\"" xz "/bin/xz"))))) | |
224 | #t)) | |
59127916 | 225 | (add-before 'check 'copy-bootstrap-guile |
d653e184 | 226 | (lambda* (#:key system target inputs #:allow-other-keys) |
569c55be JN |
227 | ;; Copy the bootstrap guile tarball in the store |
228 | ;; used by the test suite. | |
229 | (define (intern file recursive?) | |
230 | ;; Note: don't use 'guix download' here because we | |
231 | ;; need to set the 'recursive?' argument. | |
232 | (define base | |
233 | (strip-store-file-name file)) | |
d653e184 | 234 | |
569c55be JN |
235 | (define code |
236 | `(begin | |
237 | (use-modules (guix)) | |
238 | (with-store store | |
239 | (let* ((item (add-to-store store ,base | |
240 | ,recursive? | |
241 | "sha256" ,file)) | |
242 | (root (string-append "/tmp/gc-root-" | |
243 | (basename item)))) | |
244 | ;; Register a root so that the GC tests | |
245 | ;; don't delete those. | |
246 | (symlink item root) | |
247 | (add-indirect-root store root))))) | |
d653e184 | 248 | |
569c55be JN |
249 | (invoke "./test-env" "guile" "-c" |
250 | (object->string code))) | |
d653e184 | 251 | |
569c55be JN |
252 | (unless target |
253 | (intern (assoc-ref inputs "boot-guile") #f) | |
d653e184 | 254 | |
569c55be JN |
255 | ;; On x86_64 some tests need the i686 Guile. |
256 | ,@(if (and (not (%current-target-system)) | |
257 | (string=? (%current-system) | |
258 | "x86_64-linux")) | |
259 | '((intern (assoc-ref inputs "boot-guile/i686") #f)) | |
260 | '()) | |
d653e184 | 261 | |
569c55be JN |
262 | ;; Copy the bootstrap executables. |
263 | (for-each (lambda (input) | |
264 | (intern (assoc-ref inputs input) #t)) | |
265 | '("bootstrap/bash" "bootstrap/mkdir" | |
266 | "bootstrap/tar" "bootstrap/xz"))) | |
994a1494 | 267 | #t)) |
40e89f5b | 268 | (add-after 'unpack 'disable-failing-tests |
994a1494 LC |
269 | ;; XXX FIXME: These tests fail within the build container. |
270 | (lambda _ | |
271 | (substitute* "tests/syscalls.scm" | |
272 | (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all) | |
273 | (string-append "(test-skip 1)\n" all))) | |
274 | (substitute* "tests/containers.scm" | |
275 | (("^\\(test-(assert|equal)" all) | |
276 | (string-append "(test-skip 1)\n" all))) | |
277 | (when (file-exists? "tests/guix-environment-container.sh") | |
278 | (substitute* "tests/guix-environment-container.sh" | |
279 | (("guix environment --version") | |
280 | "exit 77\n"))) | |
281 | #t)) | |
282 | (add-before 'check 'set-SHELL | |
283 | (lambda _ | |
284 | ;; 'guix environment' tests rely on 'SHELL' having a | |
285 | ;; correct value, so set it. | |
286 | (setenv "SHELL" (which "sh")) | |
287 | #t)) | |
288 | (add-after 'install 'wrap-program | |
38b9af7c JN |
289 | (lambda* (#:key inputs native-inputs outputs target |
290 | #:allow-other-keys) | |
dd1640ee LC |
291 | ;; Make sure the 'guix' command finds GnuTLS, |
292 | ;; Guile-JSON, and Guile-Git automatically. | |
994a1494 | 293 | (let* ((out (assoc-ref outputs "out")) |
56389433 JN |
294 | (guile ,@(if (%current-target-system) |
295 | '((assoc-ref native-inputs "guile")) | |
296 | '((assoc-ref inputs "guile")))) | |
ca719424 | 297 | (gcrypt (assoc-ref inputs "guile-gcrypt")) |
994a1494 | 298 | (json (assoc-ref inputs "guile-json")) |
c5a2e1ff | 299 | (sqlite (assoc-ref inputs "guile-sqlite3")) |
4c0c65ac MO |
300 | (zlib (assoc-ref inputs "guile-zlib")) |
301 | (lzlib (assoc-ref inputs "guile-lzlib")) | |
9ca8aa38 | 302 | (git (assoc-ref inputs "guile-git")) |
dd1640ee LC |
303 | (bs (assoc-ref inputs |
304 | "guile-bytestructures")) | |
994a1494 LC |
305 | (ssh (assoc-ref inputs "guile-ssh")) |
306 | (gnutls (assoc-ref inputs "gnutls")) | |
8a973abc | 307 | (locales (assoc-ref inputs "glibc-utf8-locales")) |
ca719424 | 308 | (deps (list gcrypt json sqlite gnutls |
4c0c65ac | 309 | git bs ssh zlib lzlib)) |
994a1494 LC |
310 | (effective |
311 | (read-line | |
312 | (open-pipe* OPEN_READ | |
313 | (string-append guile "/bin/guile") | |
314 | "-c" "(display (effective-version))"))) | |
c9117162 LC |
315 | (path (string-join |
316 | (map (cut string-append <> | |
317 | "/share/guile/site/" | |
318 | effective) | |
6f1ce09d | 319 | (delete #f deps)) |
c9117162 LC |
320 | ":")) |
321 | (gopath (string-join | |
322 | (map (cut string-append <> | |
323 | "/lib/guile/" effective | |
324 | "/site-ccache") | |
6f1ce09d | 325 | (delete #f deps)) |
8a973abc LC |
326 | ":")) |
327 | (locpath (string-append locales "/lib/locale"))) | |
61cdad35 | 328 | |
994a1494 LC |
329 | (wrap-program (string-append out "/bin/guix") |
330 | `("GUILE_LOAD_PATH" ":" prefix (,path)) | |
8a973abc LC |
331 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath)) |
332 | `("GUIX_LOCPATH" ":" suffix (,locpath))) | |
61cdad35 | 333 | |
38b9af7c JN |
334 | (when target |
335 | ;; XXX Touching wrap-program rebuilds world | |
336 | (let ((bash (assoc-ref inputs "bash"))) | |
337 | (substitute* (string-append out "/bin/guix") | |
338 | (("^#!.*/bash") (string-append "#! " bash "/bin/bash"))))) | |
994a1494 LC |
339 | #t)))))) |
340 | (native-inputs `(("pkg-config" ,pkg-config) | |
a7db8540 | 341 | |
b4335cfb MO |
342 | ;; Guile libraries are needed here for |
343 | ;; cross-compilation. | |
a2991de0 | 344 | ("guile" ,guile-3.0-latest) ;for faster builds |
b4335cfb MO |
345 | ("gnutls" ,gnutls) |
346 | ("guile-gcrypt" ,guile-gcrypt) | |
8f7cf3b5 | 347 | ("guile-json" ,guile-json-4) |
b4335cfb | 348 | ("guile-sqlite3" ,guile-sqlite3) |
4c0c65ac MO |
349 | ("guile-zlib" ,guile-zlib) |
350 | ("guile-lzlib" ,guile-lzlib) | |
b4335cfb MO |
351 | ("guile-ssh" ,guile-ssh) |
352 | ("guile-git" ,guile-git) | |
353 | ||
994a1494 LC |
354 | ;; XXX: Keep the development inputs here even though |
355 | ;; they're unnecessary, just so that 'guix environment | |
356 | ;; guix' always contains them. | |
464f5447 | 357 | ("autoconf" ,autoconf-wrapper) |
994a1494 LC |
358 | ("automake" ,automake) |
359 | ("gettext" ,gettext-minimal) | |
360 | ("texinfo" ,texinfo) | |
361 | ("graphviz" ,graphviz) | |
76fa5e04 JL |
362 | ("help2man" ,help2man) |
363 | ("po4a" ,po4a))) | |
994a1494 | 364 | (inputs |
3e5750af LC |
365 | `(("bzip2" ,bzip2) |
366 | ("gzip" ,gzip) | |
3e5750af LC |
367 | ("sqlite" ,sqlite) |
368 | ("libgcrypt" ,libgcrypt) | |
4e80516c | 369 | |
a2991de0 | 370 | ("guile" ,guile-3.0-latest) |
bbe8d8f0 | 371 | |
94d2ff6d LC |
372 | ;; Some of the tests use "unshare" when it is available. |
373 | ("util-linux" ,util-linux) | |
374 | ||
59127916 LC |
375 | ;; Many tests rely on the 'guile-bootstrap' package, which is why we |
376 | ;; have it here. | |
377 | ("boot-guile" ,(bootstrap-guile-origin (%current-system))) | |
378 | ,@(if (and (not (%current-target-system)) | |
379 | (string=? (%current-system) "x86_64-linux")) | |
380 | `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux"))) | |
8a973abc | 381 | '()) |
569c55be | 382 | ,@(if (%current-target-system) |
38b9af7c JN |
383 | `(("bash" ,bash-minimal) |
384 | ("xz" ,xz)) | |
569c55be | 385 | '()) |
8a973abc | 386 | |
94d2ff6d LC |
387 | ;; Tests also rely on these bootstrap executables. |
388 | ("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system))) | |
389 | ("bootstrap/mkdir" ,(bootstrap-executable "mkdir" (%current-system))) | |
390 | ("bootstrap/tar" ,(bootstrap-executable "tar" (%current-system))) | |
391 | ("bootstrap/xz" ,(bootstrap-executable "xz" (%current-system))) | |
392 | ||
8a973abc | 393 | ("glibc-utf8-locales" ,glibc-utf8-locales))) |
994a1494 | 394 | (propagated-inputs |
79506553 | 395 | `(("gnutls" ,(if (%current-target-system) gnutls-3.6.14 gnutls)) |
ca719424 | 396 | ("guile-gcrypt" ,guile-gcrypt) |
8f7cf3b5 | 397 | ("guile-json" ,guile-json-4) |
c5a2e1ff | 398 | ("guile-sqlite3" ,guile-sqlite3) |
9ca8aa38 | 399 | ("guile-ssh" ,guile-ssh) |
4c0c65ac MO |
400 | ("guile-git" ,guile-git) |
401 | ("guile-zlib" ,guile-zlib) | |
402 | ("guile-lzlib" ,guile-lzlib))) | |
f1082ec1 | 403 | |
994a1494 LC |
404 | (home-page "https://www.gnu.org/software/guix/") |
405 | (synopsis "Functional package manager for installed software packages and versions") | |
406 | (description | |
407 | "GNU Guix is a functional package manager for the GNU system, and is | |
c5779c93 | 408 | also a distribution thereof. It includes a virtual machine image. Besides |
79c311b8 | 409 | the usual package management features, it also supports transactional |
c5779c93 LC |
410 | upgrades and roll-backs, per-user profiles, and much more. It is based on |
411 | the Nix package manager.") | |
7ed6343f | 412 | (license license:gpl3+) |
994a1494 | 413 | (properties '((ftp-server . "alpha.gnu.org")))))) |
3ad9a0b1 | 414 | |
baed9236 LC |
415 | (define-public guix-daemon |
416 | ;; This package is for internal consumption: it allows us to quickly build | |
417 | ;; the 'guix-daemon' program and use that in (guix self), used by 'guix | |
418 | ;; pull'. | |
419 | (package | |
420 | (inherit guix) | |
421 | (properties `((hidden? . #t))) | |
422 | (name "guix-daemon") | |
423 | ||
424 | ;; Use a minimum set of dependencies. | |
425 | (native-inputs | |
426 | (fold alist-delete (package-native-inputs guix) | |
427 | '("po4a" "graphviz" "help2man"))) | |
428 | (inputs | |
79506553 | 429 | `(("gnutls" ,gnutls) |
baed9236 | 430 | ("guile-git" ,guile-git) |
2eb0628a | 431 | ("guile-json" ,guile-json-3) |
3b0153bd | 432 | ("guile-gcrypt" ,guile-gcrypt) |
1fb947f6 LC |
433 | ,@(fold alist-delete (package-inputs guix) |
434 | '("boot-guile" "boot-guile/i686" "util-linux")))) | |
435 | ||
baed9236 LC |
436 | (propagated-inputs '()) |
437 | ||
438 | (arguments | |
439 | (substitute-keyword-arguments (package-arguments guix) | |
1fb947f6 LC |
440 | ((#:configure-flags flags '()) |
441 | ;; Pretend we have those libraries; we don't actually need them. | |
442 | `(append ,flags | |
443 | '("guix_cv_have_recent_guile_sqlite3=yes" | |
444 | "guix_cv_have_recent_guile_ssh=yes"))) | |
baed9236 LC |
445 | ((#:tests? #f #f) |
446 | #f) | |
447 | ((#:phases phases '%standard-phases) | |
448 | `(modify-phases ,phases | |
74781c65 LC |
449 | (add-after 'unpack 'change-default-guix |
450 | (lambda _ | |
451 | ;; We need to tell 'guix-daemon' which 'guix' command to use. | |
452 | ;; Here we use a questionable hack where we hard-code root's | |
453 | ;; current guix, which could be wrong (XXX). Note that scripts | |
454 | ;; like 'guix perform-download' do not run as root so we assume | |
455 | ;; that they have access to /var/guix/profiles/per-user/root. | |
456 | (substitute* "nix/libstore/globals.cc" | |
457 | (("guixProgram = (.*)nixBinDir + \"/guix\"" _ before) | |
458 | (string-append "guixProgram = " before | |
459 | "/var/guix/profiles/per-user/root\ | |
460 | /current-guix/bin/guix"))) | |
461 | #t)) | |
baed9236 LC |
462 | (replace 'build |
463 | (lambda _ | |
464 | (invoke "make" "nix/libstore/schema.sql.hh") | |
465 | (invoke "make" "-j" (number->string | |
466 | (parallel-job-count)) | |
467 | "guix-daemon"))) | |
468 | (delete 'copy-bootstrap-guile) | |
469 | (replace 'install | |
470 | (lambda* (#:key outputs #:allow-other-keys) | |
74781c65 | 471 | (invoke "make" "install-binPROGRAMS"))) |
baed9236 LC |
472 | (delete 'wrap-program))))))) |
473 | ||
82ce81ba | 474 | |
b6bee63b | 475 | (define-public guile2.2-guix |
da765180 LC |
476 | (package |
477 | (inherit guix) | |
b6bee63b | 478 | (name "guile2.2-guix") |
1926db54 | 479 | (native-inputs |
b6bee63b LC |
480 | `(("guile" ,guile-2.2) |
481 | ("gnutls" ,guile2.2-gnutls) | |
482 | ("guile-gcrypt" ,guile2.2-gcrypt) | |
483 | ("guile-json" ,guile2.2-json) | |
484 | ("guile-sqlite3" ,guile2.2-sqlite3) | |
485 | ("guile-ssh" ,guile2.2-ssh) | |
486 | ("guile-git" ,guile2.2-git) | |
1926db54 MO |
487 | ,@(fold alist-delete (package-native-inputs guix) |
488 | '("guile" "gnutls" "guile-gcrypt" "guile-json" | |
489 | "guile-sqlite3" "guile-ssh" "guile-git")))) | |
da765180 | 490 | (inputs |
b6bee63b | 491 | `(("guile" ,guile-2.2) |
da765180 LC |
492 | ,@(alist-delete "guile" (package-inputs guix)))) |
493 | (propagated-inputs | |
b6bee63b LC |
494 | `(("gnutls" ,gnutls) |
495 | ("guile-gcrypt" ,guile2.2-gcrypt) | |
496 | ("guile-json" ,guile2.2-json) | |
497 | ("guile-sqlite3" ,guile2.2-sqlite3) | |
498 | ("guile-ssh" ,guile2.2-ssh) | |
499 | ("guile-git" ,guile2.2-git))))) | |
500 | ||
501 | (define-public guile3.0-guix | |
502 | (deprecated-package "guile3.0-guix" guix)) | |
da765180 | 503 | |
6c59eb1d MO |
504 | (define-public guix-minimal |
505 | ;; A version of Guix which is built with the minimal set of dependencies, as | |
506 | ;; outlined in the README "Requirements" section. Intended as a CI job, so | |
507 | ;; marked as hidden. | |
508 | (hidden-package | |
509 | (package | |
510 | (inherit guix) | |
511 | (name "guix-minimal") | |
512 | (native-inputs | |
513 | (fold alist-delete | |
514 | (package-native-inputs guix) | |
515 | '("guile-ssh"))) | |
516 | (propagated-inputs | |
517 | (fold alist-delete | |
518 | (package-propagated-inputs guix) | |
519 | '("guile-ssh")))))) | |
520 | ||
04eb0fab LC |
521 | (define (source-file? file stat) |
522 | "Return true if FILE is likely a source file, false if it is a typical | |
523 | generated file." | |
524 | (define (wrong-extension? file) | |
525 | (or (string-suffix? "~" file) | |
526 | (member (file-extension file) | |
527 | '("o" "a" "lo" "so" "go")))) | |
528 | ||
529 | (match (basename file) | |
530 | ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs") | |
531 | #f) | |
532 | ((? wrong-extension?) | |
533 | #f) | |
534 | (_ | |
535 | #t))) | |
536 | ||
7e6d8d36 LC |
537 | (define-public current-guix-package |
538 | ;; This parameter allows callers to override the package that 'current-guix' | |
539 | ;; returns. This is useful when 'current-guix' cannot compute it by itself, | |
540 | ;; for instance because it's not running from a source code checkout. | |
541 | (make-parameter #f)) | |
542 | ||
04eb0fab | 543 | (define-public current-guix |
863519f6 LC |
544 | (let* ((repository-root (delay (canonicalize-path |
545 | (string-append (current-source-directory) | |
546 | "/../..")))) | |
547 | (select? (delay (or (git-predicate (force repository-root)) | |
a9d5e4be | 548 | source-file?)))) |
04eb0fab LC |
549 | (lambda () |
550 | "Return a package representing Guix built from the current source tree. | |
551 | This works by adding the current source tree to the store (after filtering it | |
552 | out) and returning a package that uses that as its 'source'." | |
7e6d8d36 LC |
553 | (or (current-guix-package) |
554 | (package | |
555 | (inherit guix) | |
556 | (version (string-append (package-version guix) "+")) | |
863519f6 | 557 | (source (local-file (force repository-root) "guix-current" |
7e6d8d36 LC |
558 | #:recursive? #t |
559 | #:select? (force select?)))))))) | |
04eb0fab LC |
560 | |
561 | \f | |
562 | ;;; | |
563 | ;;; Other tools. | |
564 | ;;; | |
565 | ||
fcb0109d LC |
566 | (define-public nix |
567 | (package | |
568 | (name "nix") | |
62035656 | 569 | (version "2.3.7") |
fcb0109d LC |
570 | (source (origin |
571 | (method url-fetch) | |
572 | (uri (string-append "http://nixos.org/releases/nix/nix-" | |
573 | version "/nix-" version ".tar.xz")) | |
574 | (sha256 | |
575 | (base32 | |
62035656 | 576 | "15p50jkss6szinisb7axhxybgfi29sm9grz7mxwair8ljj2553yx")))) |
fcb0109d | 577 | (build-system gnu-build-system) |
b6329d02 | 578 | (arguments |
ed660956 | 579 | `(#:configure-flags '("--sysconfdir=/etc" "--enable-gc") |
b6329d02 TGR |
580 | #:phases |
581 | (modify-phases %standard-phases | |
582 | (replace 'install | |
583 | ;; Don't try & fail to create subdirectories in /etc, but keep them | |
584 | ;; in the output as examples. | |
585 | (lambda* (#:key (make-flags '()) outputs #:allow-other-keys) | |
586 | (let* ((out (assoc-ref outputs "out")) | |
587 | (etc (string-append out "/etc"))) | |
588 | (apply invoke "make" "install" | |
589 | (string-append "sysconfdir=" etc) | |
590 | (string-append "profiledir=" etc "/profile.d") | |
591 | make-flags))))))) | |
e6c8199b | 592 | (native-inputs `(("pkg-config" ,pkg-config))) |
13c18af1 GL |
593 | (inputs `(("boost" ,boost) |
594 | ("brotli" ,brotli) | |
e6c8199b | 595 | ("bzip2" ,bzip2) |
13c18af1 GL |
596 | ("curl" ,curl) |
597 | ("editline" ,editline) | |
fcb0109d | 598 | ("libgc" ,libgc) |
e6c8199b SB |
599 | ("libseccomp" ,libseccomp) |
600 | ("libsodium" ,libsodium) | |
601 | ("openssl" ,openssl) | |
fcb0109d | 602 | ("sqlite" ,sqlite) |
e6c8199b | 603 | ("xz" ,xz))) |
775989c7 | 604 | (home-page "https://nixos.org/nix/") |
fcb0109d LC |
605 | (synopsis "The Nix package manager") |
606 | (description | |
607 | "Nix is a purely functional package manager. This means that it treats | |
608 | packages like values in purely functional programming languages such as | |
609 | Haskell—they are built by functions that don't have side-effects, and they | |
610 | never change after they have been built. Nix stores packages in the Nix | |
611 | store, usually the directory /nix/store, where each package has its own unique | |
612 | sub-directory.") | |
7ed6343f | 613 | (license license:lgpl2.1+))) |
a881a40c | 614 | |
8d422e25 RW |
615 | (define-public stow |
616 | (package | |
617 | (name "stow") | |
7cc98992 | 618 | (version "2.3.1") |
8d422e25 RW |
619 | (source (origin |
620 | (method url-fetch) | |
621 | (uri (string-append "mirror://gnu/stow/stow-" | |
622 | version ".tar.gz")) | |
623 | (sha256 | |
624 | (base32 | |
7cc98992 | 625 | "0jrxy12ywn7smdzdnvwzjw77l6knx6jkj2rckgykg1dpf6bdkm89")))) |
8d422e25 RW |
626 | (build-system gnu-build-system) |
627 | (inputs | |
7cc98992 | 628 | `(("perl" ,perl))) |
8d422e25 RW |
629 | (native-inputs |
630 | `(("perl-test-simple" ,perl-test-simple) | |
631 | ("perl-test-output" ,perl-test-output) | |
ddfd70da LC |
632 | ("perl-capture-tiny" ,perl-capture-tiny) |
633 | ("perl-io-stringy" ,perl-io-stringy))) | |
8d422e25 RW |
634 | (home-page "https://www.gnu.org/software/stow/") |
635 | (synopsis "Managing installed software packages") | |
636 | (description | |
637 | "GNU Stow is a symlink manager. It generates symlinks to directories | |
638 | of data and makes them appear to be merged into the same directory. It is | |
639 | typically used for managing software packages installed from source, by | |
640 | letting you install them apart in distinct directories and then create | |
641 | symlinks to the files in a common directory such as /usr/local.") | |
bdb51ed6 | 642 | (license license:gpl3+))) |
e3e1ecf6 LC |
643 | |
644 | (define-public rpm | |
645 | (package | |
646 | (name "rpm") | |
c0023514 | 647 | (version "4.14.2.1") |
e3e1ecf6 LC |
648 | (source (origin |
649 | (method url-fetch) | |
623cc34c EB |
650 | (uri (string-append "http://ftp.rpm.org/releases/rpm-" |
651 | (version-major+minor version) ".x/rpm-" | |
e3e1ecf6 LC |
652 | version ".tar.bz2")) |
653 | (sha256 | |
654 | (base32 | |
c0023514 | 655 | "1nmck2fq9h85fgs3zhh6w1avlw5y16cbz5khd459ry3jfd5w4f8i")))) |
e3e1ecf6 LC |
656 | (build-system gnu-build-system) |
657 | (arguments | |
658 | '(#:configure-flags '("--with-external-db" ;use the system's bdb | |
659 | "--enable-python" | |
660 | "--without-lua") | |
661 | #:phases (modify-phases %standard-phases | |
91a3c800 | 662 | (add-before 'configure 'set-nss-library-path |
e3e1ecf6 | 663 | (lambda* (#:key inputs #:allow-other-keys) |
91a3c800 | 664 | (let ((nss (assoc-ref inputs "nss"))) |
e3e1ecf6 LC |
665 | (setenv "LIBRARY_PATH" |
666 | (string-append (getenv "LIBRARY_PATH") ":" | |
667 | nss "/lib/nss")) | |
91a3c800 | 668 | #t)))))) |
e3e1ecf6 LC |
669 | (native-inputs |
670 | `(("pkg-config" ,pkg-config))) | |
671 | (inputs | |
c0023514 | 672 | `(("python" ,python) |
e3e1ecf6 LC |
673 | ("xz" ,xz) |
674 | ("bdb" ,bdb) | |
675 | ("popt" ,popt) | |
676 | ("nss" ,nss) | |
677 | ("nspr" ,nspr) | |
678 | ("libarchive" ,libarchive) | |
e3e1ecf6 LC |
679 | ("file" ,file) |
680 | ("bzip2" ,bzip2) | |
681 | ("zlib" ,zlib) | |
682 | ("cpio" ,cpio))) | |
c0023514 | 683 | (home-page "https://rpm.org/") |
e3e1ecf6 LC |
684 | (synopsis "The RPM Package Manager") |
685 | (description | |
686 | "The RPM Package Manager (RPM) is a command-line driven package | |
687 | management system capable of installing, uninstalling, verifying, querying, | |
688 | and updating computer software packages. Each software package consists of an | |
689 | archive of files along with information about the package like its version, a | |
690 | description. There is also a library permitting developers to manage such | |
691 | transactions from C or Python.") | |
692 | ||
693 | ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+. | |
7ed6343f | 694 | (license license:gpl2+))) |
e3e1ecf6 | 695 | |
513d35f1 MFM |
696 | (define-public python-anaconda-client |
697 | (package | |
698 | (name "python-anaconda-client") | |
699 | (version "1.6.3") | |
700 | (source | |
701 | (origin | |
837da4d3 EF |
702 | (method git-fetch) |
703 | (uri (git-reference | |
704 | (url "https://github.com/Anaconda-Platform/anaconda-client") | |
705 | (commit version))) | |
706 | (file-name (git-file-name name version)) | |
513d35f1 MFM |
707 | (sha256 |
708 | (base32 | |
837da4d3 | 709 | "0w1bfxnydjl9qp53r2gcvr6vlpdqqilcrzqxrll9sgg6vwdyiyyp")))) |
513d35f1 MFM |
710 | (build-system python-build-system) |
711 | (propagated-inputs | |
712 | `(("python-pyyaml" ,python-pyyaml) | |
713 | ("python-requests" ,python-requests) | |
714 | ("python-clyent" ,python-clyent))) | |
715 | (native-inputs | |
716 | `(("python-pytz" ,python-pytz) | |
717 | ("python-dateutil" ,python-dateutil) | |
718 | ("python-mock" ,python-mock) | |
719 | ("python-coverage" ,python-coverage) | |
720 | ("python-pillow" ,python-pillow))) | |
721 | (arguments | |
722 | `(#:phases | |
723 | (modify-phases %standard-phases | |
724 | ;; This is needed for some tests. | |
725 | (add-before 'check 'set-up-home | |
726 | (lambda* _ (setenv "HOME" "/tmp") #t)) | |
727 | (add-before 'check 'remove-network-tests | |
728 | (lambda* _ | |
729 | ;; Remove tests requiring a network connection | |
730 | (let ((network-tests '("tests/test_upload.py" | |
731 | "tests/test_authorizations.py" | |
732 | "tests/test_login.py" | |
733 | "tests/test_whoami.py" | |
734 | "utils/notebook/tests/test_data_uri.py" | |
735 | "utils/notebook/tests/test_base.py" | |
736 | "utils/notebook/tests/test_downloader.py" | |
737 | "inspect_package/tests/test_conda.py"))) | |
738 | (with-directory-excursion "binstar_client" | |
739 | (for-each delete-file network-tests))) | |
740 | #t))))) | |
741 | (home-page "https://github.com/Anaconda-Platform/anaconda-client") | |
742 | (synopsis "Anaconda Cloud command line client library") | |
743 | (description | |
744 | "Anaconda Cloud command line client library provides an interface to | |
745 | Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and | |
746 | environments.") | |
7ed6343f | 747 | (license license:bsd-3))) |
513d35f1 MFM |
748 | |
749 | (define-public python2-anaconda-client | |
750 | (package-with-python2 python-anaconda-client)) | |
4bc08b6e | 751 | |
c9a16728 RW |
752 | (define-public python-conda-package-handling |
753 | (package | |
754 | (name "python-conda-package-handling") | |
755 | (version "1.6.0") | |
756 | (source | |
757 | (origin | |
758 | (method git-fetch) | |
759 | (uri (git-reference | |
760 | (url "https://github.com/conda/conda-package-handling/") | |
761 | (commit version))) | |
762 | (file-name (git-file-name name version)) | |
763 | (sha256 | |
764 | (base32 | |
765 | "0bqbs6a8jbjmbn47n5n1p529cx7pf4vgfnhqca9mflgidfb5i0jf")))) | |
766 | (build-system python-build-system) | |
767 | (arguments | |
768 | `(#:phases | |
769 | (modify-phases %standard-phases | |
770 | (add-after 'unpack 'use-unmodified-libarchive | |
771 | (lambda _ | |
772 | (substitute* "setup.py" | |
773 | (("archive_and_deps") "archive")) | |
774 | #t)) | |
775 | (replace 'check | |
776 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
777 | (add-installed-pythonpath inputs outputs) | |
778 | (invoke "pytest" "-vv" "tests" | |
779 | "-k" | |
780 | (string-append | |
781 | ;; TODO: these three fail because the mocker fixture | |
782 | ;; cannot be found | |
783 | "not test_rename_to_trash" | |
784 | " and not test_api_extract_tarball_with_libarchive_import_error" | |
785 | " and not test_delete_trash" | |
786 | ;; TODO: this one does not raise an exception when it | |
787 | ;; should. | |
788 | " and not test_secure_refusal_to_extract_abs_paths"))))))) | |
789 | (propagated-inputs | |
790 | `(("python-six" ,python-six) | |
791 | ("python-tqdm" ,python-tqdm))) | |
792 | (inputs | |
793 | `(("libarchive" ,libarchive))) | |
794 | (native-inputs | |
795 | `(("python-cython" ,python-cython) | |
796 | ("python-pytest" ,python-pytest) | |
797 | ("python-pytest-cov" ,python-pytest-cov) | |
798 | ("python-mock" ,python-mock))) | |
799 | (home-page "https://conda.io") | |
800 | (synopsis "Create and extract conda packages of various formats") | |
801 | (description | |
802 | "This library is an abstraction of Conda package handling and a tool for | |
803 | extracting, creating, and converting between formats.") | |
804 | (license license:bsd-3))) | |
805 | ||
638ef1e8 | 806 | (define-public conda |
4bc08b6e | 807 | (package |
638ef1e8 RW |
808 | (name "conda") |
809 | (version "4.8.3") | |
4bc08b6e MFM |
810 | (source |
811 | (origin | |
6def31e8 EF |
812 | (method git-fetch) |
813 | (uri (git-reference | |
814 | (url "https://github.com/conda/conda") | |
815 | (commit version))) | |
816 | (file-name (git-file-name name version)) | |
4bc08b6e MFM |
817 | (sha256 |
818 | (base32 | |
638ef1e8 | 819 | "0iv1qzk21jsk6vdp3106xvpvl68zgfdqb3kyzpya87jhkl204l7r")))) |
4bc08b6e MFM |
820 | (build-system python-build-system) |
821 | (arguments | |
822 | `(#:phases | |
823 | (modify-phases %standard-phases | |
638ef1e8 RW |
824 | (add-after 'unpack 'fix-permissions |
825 | (lambda _ | |
826 | ;; This file is no longer writable after downloading with | |
827 | ;; 'git-fetch' | |
828 | (make-file-writable | |
829 | "tests/conda_env/support/saved-env/environment.yml") | |
830 | #t)) | |
831 | (add-after 'unpack 'correct-python-executable-name | |
832 | (lambda* (#:key inputs #:allow-other-keys) | |
833 | (let ((python (assoc-ref inputs "python-wrapper"))) | |
834 | #; | |
835 | (substitute* "conda/common/path.py" | |
836 | (("python_version or ''") | |
837 | "python_version or '3'")) | |
838 | (substitute* "conda/core/initialize.py" | |
839 | (("python_exe = join") | |
840 | (format #f "python_exe = \"~a/bin/python\" #" | |
841 | python)))) | |
842 | #t)) | |
843 | (add-after 'unpack 'do-not-use-python-root-as-prefix | |
844 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
845 | (let ((out (assoc-ref outputs "out")) | |
846 | (python (assoc-ref inputs "python-wrapper"))) | |
847 | (substitute* "tests/core/test_initialize.py" | |
848 | (("\"\"\"\\) % conda_prefix") | |
849 | (format #f "\"\"\") % \"~a\"" python)) | |
850 | (("CONDA_PYTHON_EXE \"%s\"' % join\\(conda_prefix") | |
851 | (format #f "CONDA_PYTHON_EXE \"%s\"' % join(\"~a\"" | |
852 | python)) | |
853 | (("conda_prefix = abspath\\(sys.prefix\\)") | |
854 | (format #f "conda_prefix = abspath(\"~a\")" out))) | |
855 | (substitute* "conda/base/context.py" | |
856 | (("os.chdir\\(sys.prefix\\)") | |
857 | (format #f "os.chdir(\"~a\")" out)) | |
858 | (("sys.prefix, '.condarc'") | |
859 | (format #f "\"~a\", '.condarc'" out)) | |
860 | (("return abspath\\(sys.prefix\\)") | |
861 | (format #f "return abspath(\"~a\")" out)) | |
862 | (("os.path.join\\(sys.prefix, bin_dir, exe\\)") | |
863 | (format #f "\"~a/bin/conda\"" out)) | |
864 | (("'CONDA_EXE', sys.executable") | |
865 | (format #f "'CONDA_EXE', \"~a/bin/conda\"" out)))) | |
866 | #t)) | |
4bc08b6e MFM |
867 | (add-before 'build 'create-version-file |
868 | (lambda _ | |
869 | (with-output-to-file "conda/.version" | |
870 | (lambda () (display ,version))) | |
871 | #t)) | |
4bc08b6e MFM |
872 | (replace 'check |
873 | (lambda _ | |
874 | (setenv "HOME" "/tmp") | |
638ef1e8 RW |
875 | (invoke "py.test" "-vv" |
876 | "-k" | |
877 | (string-append | |
878 | "not integration" | |
879 | ;; This one reports a newer version of conda than | |
880 | ;; expected. | |
881 | " and not test_auto_update_conda" | |
882 | ;; This fails because the output directory is not a | |
883 | ;; Conda environment. | |
884 | " and not test_list" | |
885 | ;; This fails because we patched the default root | |
886 | ;; prefix. | |
887 | " and not test_default_target_is_root_prefix" | |
888 | ;; TODO: I don't understand what this failure means | |
889 | " and not test_PrefixData_return_value_contract" | |
890 | ;; TODO: same here | |
891 | " and not test_install_1" | |
892 | ;; Not sure if this is really wrong. This fails because | |
893 | ;; /gnu/store/...python-conda-4.8.3/bin/python | |
894 | ;; is not /gnu/store/...python-wrapper-3.8.2/bin/python | |
895 | " and not test_make_entry_point")))) | |
896 | (add-after 'install 'init | |
897 | ;; This writes a whole bunch of shell initialization files to the | |
898 | ;; prefix directory. Many features of conda can only be used after | |
899 | ;; running "conda init". | |
900 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
901 | (add-installed-pythonpath inputs outputs) | |
902 | (setenv "HOME" "/tmp") | |
903 | ||
904 | ;; "conda init" insists on using sudo, because it is hell-bent on | |
905 | ;; modifying system files. | |
906 | (mkdir-p "/tmp/fake-sudo") | |
907 | (with-output-to-file "/tmp/fake-sudo/sudo" | |
908 | (lambda () (format #t "#!~/bin/sh~%exec $@" (which "sh")))) | |
909 | (chmod "/tmp/fake-sudo/sudo" #o700) | |
910 | (setenv "PATH" (string-append "/tmp/fake-sudo:" | |
911 | (getenv "PATH"))) | |
912 | ||
913 | (invoke (string-append (assoc-ref outputs "out") | |
914 | "/bin/conda") | |
915 | "init")))))) | |
916 | (inputs | |
917 | `(("python-wrapper" ,python-wrapper))) | |
918 | (propagated-inputs | |
919 | `(("python-anaconda-client" ,python-anaconda-client) | |
920 | ("python-conda-package-handling" ,python-conda-package-handling) | |
921 | ("python-cytoolz" ,python-cytoolz) | |
4bc08b6e MFM |
922 | ("python-pycosat" ,python-pycosat) |
923 | ("python-pytest" ,python-pytest) | |
4bc08b6e | 924 | ("python-pyyaml" ,python-pyyaml) |
638ef1e8 RW |
925 | ("python-requests" ,python-requests) |
926 | ("python-responses" ,python-responses) | |
927 | ("python-ruamel.yaml" ,python-ruamel.yaml) | |
928 | ("python-tqdm" ,python-tqdm) | |
929 | ;; XXX: This is dragged in by libarchive and is needed at runtime. | |
930 | ("zstd" ,zstd))) | |
4bc08b6e MFM |
931 | (home-page "https://github.com/conda/conda") |
932 | (synopsis "Cross-platform, OS-agnostic, system-level binary package manager") | |
933 | (description | |
934 | "Conda is a cross-platform, Python-agnostic binary package manager. It | |
935 | is the package manager used by Anaconda installations, but it may be used for | |
936 | other systems as well. Conda makes environments first-class citizens, making | |
937 | it easy to create independent environments even for C libraries. Conda is | |
638ef1e8 | 938 | written entirely in Python.") |
7ed6343f | 939 | (license license:bsd-3))) |
4bc08b6e | 940 | |
638ef1e8 RW |
941 | (define-public python-conda |
942 | (deprecated-package "python-conda" conda)) | |
58a308e0 RJ |
943 | |
944 | (define-public gwl | |
945 | (package | |
946 | (name "gwl") | |
efb98dd0 | 947 | (version "0.2.1") |
58a308e0 RJ |
948 | (source (origin |
949 | (method url-fetch) | |
598ea80f | 950 | (uri (string-append "mirror://gnu/gwl/gwl-" version ".tar.gz")) |
58a308e0 RJ |
951 | (sha256 |
952 | (base32 | |
efb98dd0 | 953 | "1ji5jvzni8aml9fmimlr11g3k8isrnlvnbzhmwgdjh72hils0alc")))) |
58a308e0 | 954 | (build-system gnu-build-system) |
efb98dd0 RW |
955 | (arguments |
956 | `(#:phases | |
957 | (modify-phases %standard-phases | |
958 | (add-before 'build 'fix-tests | |
959 | (lambda _ | |
960 | ;; Avoid cross-device link. | |
961 | (substitute* "tests/cache.scm" | |
962 | (("/tmp/gwl-test-input-XXXXXX") | |
963 | (string-append (getcwd) "/gwl-test-input-XXXXXX"))) | |
964 | #t))))) | |
58a308e0 RJ |
965 | (native-inputs |
966 | `(("autoconf" ,autoconf) | |
967 | ("automake" ,automake) | |
598ea80f RW |
968 | ("pkg-config" ,pkg-config) |
969 | ("texinfo" ,texinfo) | |
970 | ("graphviz" ,graphviz))) | |
58a308e0 | 971 | (inputs |
a2991de0 | 972 | `(("guile" ,@(assoc-ref (package-native-inputs guix) "guile")))) |
58a308e0 | 973 | (propagated-inputs |
b6bee63b LC |
974 | `(("guix" ,guix) |
975 | ("guile-commonmark" ,guile-commonmark) | |
976 | ("guile-gcrypt" ,guile-gcrypt) | |
977 | ("guile-pfds" ,guile-pfds) | |
978 | ("guile-syntax-highlight" ,guile-syntax-highlight) | |
979 | ("guile-wisp" ,guile-wisp))) | |
598ea80f | 980 | (home-page "https://workflows.guix.info") |
58a308e0 | 981 | (synopsis "Workflow management extension for GNU Guix") |
598ea80f RW |
982 | (description "The @dfn{Guix Workflow Language} (GWL) provides an |
983 | extension to GNU Guix's declarative language for package management to | |
984 | automate the execution of programs in scientific workflows. The GWL | |
985 | can use process engines to integrate with various computing | |
986 | environments.") | |
58a308e0 RJ |
987 | ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+, |
988 | ;; the web interface modules in gwl/ are licensed AGPL3+, | |
989 | ;; and the fonts included in this package are licensed OFL1.1. | |
7ed6343f | 990 | (license (list license:gpl3+ license:agpl3+ license:silofl1.1)))) |
98a11b7f | 991 | |
c2cb0e46 | 992 | (define-public guix-build-coordinator |
1c498b9e CB |
993 | (let ((commit "5f11c6009fba7ad635987a839d5769c4d9ca8f29") |
994 | (revision "3")) | |
c2cb0e46 | 995 | (package |
df5e8de3 CB |
996 | (name "guix-build-coordinator") |
997 | (version (git-version "0" revision commit)) | |
998 | (source (origin | |
999 | (method git-fetch) | |
1000 | (uri (git-reference | |
1001 | (url "https://git.cbaines.net/git/guix/build-coordinator") | |
1002 | (commit commit))) | |
1003 | (sha256 | |
1004 | (base32 | |
1005 | "1r4y03blnh4vw3wgwh409wa4w3dbr20rzvfqiksm9g0ljic3r8zv")) | |
1006 | (file-name (string-append name "-" version "-checkout")))) | |
1007 | (build-system gnu-build-system) | |
1008 | (arguments | |
1009 | `(#:modules (((guix build guile-build-system) | |
1010 | #:select (target-guile-effective-version)) | |
1011 | ,@%gnu-build-system-modules) | |
1012 | #:imported-modules ((guix build guile-build-system) | |
1013 | ,@%gnu-build-system-modules) | |
1014 | #:phases | |
1015 | (modify-phases %standard-phases | |
1016 | (add-before 'build 'set-GUILE_AUTO_COMPILE | |
1017 | (lambda _ | |
1018 | ;; To avoid warnings relating to 'guild'. | |
1019 | (setenv "GUILE_AUTO_COMPILE" "0") | |
1020 | #t)) | |
1021 | (add-after 'install 'wrap-executable | |
1022 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1023 | (let* ((out (assoc-ref outputs "out")) | |
1024 | (bin (string-append out "/bin")) | |
1025 | (guile (assoc-ref inputs "guile")) | |
1026 | (version (target-guile-effective-version)) | |
1027 | (scm (string-append out "/share/guile/site/" version)) | |
1028 | (go (string-append out "/lib/guile/" version "/site-ccache"))) | |
1029 | (for-each | |
1030 | (lambda (file) | |
1031 | (simple-format (current-error-port) "wrapping: ~A\n" file) | |
1032 | (wrap-program file | |
1033 | `("PATH" ":" prefix | |
1034 | (,bin | |
1035 | ;; Support building without sqitch as an input, as it | |
1036 | ;; can't be cross-compiled yet | |
1037 | ,@(or (and=> (assoc-ref inputs "sqitch") | |
1038 | list) | |
1039 | '()))) | |
1040 | `("GUILE_LOAD_PATH" ":" prefix | |
1041 | (,scm ,(getenv "GUILE_LOAD_PATH"))) | |
1042 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix | |
1043 | (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))) | |
1044 | (find-files bin))) | |
1045 | #t)) | |
1046 | (delete 'strip)))) ; As the .go files aren't compatible | |
1047 | (native-inputs | |
1048 | `(("pkg-config" ,pkg-config) | |
1049 | ("autoconf" ,autoconf) | |
1050 | ("automake" ,automake) | |
1051 | ("gnutls" ,gnutls) | |
c2cb0e46 | 1052 | |
df5e8de3 CB |
1053 | ;; Guile libraries are needed here for cross-compilation. |
1054 | ("guile-json" ,guile-json-3) | |
1055 | ("guile-gcrypt" ,guile-gcrypt) | |
1056 | ("guix" ,guix) | |
1057 | ("guile-prometheus" ,guile-prometheus) | |
1058 | ("guile-fibers" ,guile-fibers) | |
1059 | ("guile" ,@(assoc-ref (package-native-inputs guix) "guile")))) | |
1060 | (inputs | |
1061 | `(("guile" ,@(assoc-ref (package-native-inputs guix) "guile")) | |
1062 | ("sqlite" ,sqlite) | |
1063 | ("sqitch" ,sqitch))) | |
1064 | (propagated-inputs | |
1065 | `(("guile-fibers" ,guile-fibers) | |
1066 | ("guile-prometheus" ,guile-prometheus) | |
1067 | ("guile-gcrypt" ,guile-gcrypt) | |
1068 | ("guile-json" ,guile-json-3) | |
1069 | ("guile-lzlib" ,guile-lzlib) | |
1070 | ("guile-zlib" ,guile-zlib) | |
1071 | ("guile-sqlite3" ,guile-sqlite3) | |
1072 | ("guix" ,guix) | |
1073 | ("gnutls" ,gnutls))) | |
1074 | (home-page "https://git.cbaines.net/guix/build-coordinator/") | |
1075 | (synopsis "Tool to help build derivations") | |
1076 | (description | |
1077 | "The Guix Build Coordinator helps with performing lots of builds across | |
c2cb0e46 CB |
1078 | potentially many machines, and with doing something with the results and |
1079 | outputs of those builds.") | |
df5e8de3 | 1080 | (license license:gpl3+)))) |
c2cb0e46 | 1081 | |
fc1fe722 LC |
1082 | (define-public guix-jupyter |
1083 | (package | |
1084 | (name "guix-jupyter") | |
1085 | (version "0.1.0") | |
1086 | (home-page "https://gitlab.inria.fr/guix-hpc/guix-kernel") | |
1087 | (source (origin | |
1088 | (method git-fetch) | |
1089 | (uri (git-reference (url home-page) | |
1090 | (commit (string-append "v" version)))) | |
1091 | (sha256 | |
1092 | (base32 | |
1093 | "01z7jjkc7r7lj6637rcgpz40v8xqqyfp6871h94yvcnwm7zy9h1n")) | |
b6bee63b LC |
1094 | (modules '((guix build utils))) |
1095 | (snippet | |
1096 | '(begin | |
1097 | ;; Allow builds with Guile 3.0. | |
1098 | (substitute* "configure.ac" | |
1099 | (("^GUILE_PKG.*") | |
1100 | "GUILE_PKG([3.0 2.2])\n")) | |
e9db10ae LC |
1101 | |
1102 | ;; Avoid name clash and build failure now that | |
1103 | ;; 'define-json-mapping' is also provided by Guile-JSON, as | |
1104 | ;; of version 4.3. | |
1105 | (substitute* (find-files "." "\\.scm$") | |
1106 | (("define-json-mapping") | |
1107 | "define-json-mapping*") | |
1108 | (("<=>") | |
1109 | "<->")) | |
b6bee63b | 1110 | #t)) |
fc1fe722 LC |
1111 | (file-name (string-append "guix-jupyter-" version "-checkout")))) |
1112 | (build-system gnu-build-system) | |
1113 | (arguments | |
1114 | `(#:modules ((srfi srfi-26) | |
1115 | (ice-9 match) | |
1116 | (ice-9 popen) | |
1117 | (ice-9 rdelim) | |
1118 | (guix build utils) | |
1119 | (guix build gnu-build-system)) | |
1120 | #:phases | |
1121 | (modify-phases %standard-phases | |
1122 | (add-after 'install 'sed-kernel-json | |
1123 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1124 | (let* ((out (assoc-ref outputs "out")) | |
1125 | (guix (assoc-ref inputs "guix")) | |
1126 | (guile (assoc-ref inputs "guile")) | |
1127 | (json (assoc-ref inputs "guile-json")) | |
1128 | (git (assoc-ref inputs "guile-git")) | |
1129 | (bs (assoc-ref inputs "guile-bytestructures")) | |
1130 | (s-zmq (assoc-ref inputs "guile-simple-zmq")) | |
1131 | (gcrypt (assoc-ref inputs "guile-gcrypt")) | |
1132 | (deps (list out s-zmq guix json git bs gcrypt)) | |
1133 | (effective | |
1134 | (read-line | |
1135 | (open-pipe* OPEN_READ | |
1136 | (string-append guile "/bin/guile") | |
1137 | "-c" "(display (effective-version))"))) | |
1138 | (path (map (cut string-append "-L\", \"" <> | |
1139 | "/share/guile/site/" | |
1140 | effective) | |
1141 | deps)) | |
1142 | (gopath (map (cut string-append "-C\", \"" <> | |
1143 | "/lib/guile/" effective | |
1144 | "/site-ccache") | |
1145 | deps)) | |
1146 | (kernel-dir (string-append out "/share/jupyter/kernels/guix/"))) | |
1147 | (substitute* (string-append kernel-dir "kernel.json") | |
1148 | (("-s") | |
1149 | (string-join | |
1150 | (list (string-join path "\",\n\t\t\"") | |
1151 | (string-join gopath "\",\n\t\t\"") | |
1152 | "-s") | |
1153 | "\",\n\t\t\"")) | |
1154 | (("guix-jupyter-kernel.scm") | |
3a27a3dc | 1155 | (string-append out "/share/guile/site/3.0/" |
fc1fe722 LC |
1156 | "guix-jupyter-kernel.scm"))) |
1157 | #t)))))) | |
1158 | (native-inputs | |
1159 | `(("autoconf" ,autoconf) | |
1160 | ("automake" ,automake) | |
1161 | ("pkg-config" ,pkg-config) | |
1162 | ||
1163 | ;; For testing. | |
d3650775 LC |
1164 | ("jupyter" ,jupyter) |
1165 | ("python-ipython" ,python-ipython) | |
1166 | ("python-ipykernel" ,python-ipykernel))) | |
fc1fe722 LC |
1167 | (inputs |
1168 | `(("guix" ,guix) | |
a2991de0 | 1169 | ("guile" ,@(assoc-ref (package-native-inputs guix) "guile")))) |
fc1fe722 | 1170 | (propagated-inputs |
8f7cf3b5 | 1171 | `(("guile-json" ,guile-json-4) |
fc1fe722 LC |
1172 | ("guile-simple-zmq" ,guile-simple-zmq) |
1173 | ("guile-gcrypt" ,guile-gcrypt))) | |
1174 | (synopsis "Guix kernel for Jupyter") | |
1175 | (description | |
1176 | "Guix-Jupyter is a Jupyter kernel. It allows you to annotate notebooks | |
1177 | with information about their software dependencies, such that code is executed | |
1178 | in the right software environment. Guix-Jupyter spawns the actual kernels | |
1179 | such as @code{python-ipykernel} on behalf of the notebook user and runs them | |
1180 | in an isolated environment, in separate namespaces.") | |
1181 | (license license:gpl3+))) | |
1182 | ||
98a11b7f TGR |
1183 | (define-public gcab |
1184 | (package | |
1185 | (name "gcab") | |
78a684f5 | 1186 | (version "1.4") |
98a11b7f TGR |
1187 | (source (origin |
1188 | (method url-fetch) | |
41eac186 TGR |
1189 | (uri (string-append "mirror://gnome/sources/gcab/" |
1190 | version "/gcab-" version ".tar.xz")) | |
98a11b7f TGR |
1191 | (sha256 |
1192 | (base32 | |
78a684f5 | 1193 | "13q43iqld4l50yra45lhvkd376pn6qpk7rkx374zn8y9wsdzm9b7")))) |
44118720 | 1194 | (build-system meson-build-system) |
98a11b7f | 1195 | (native-inputs |
44118720 TGR |
1196 | `(("glib:bin" ,glib "bin") ; for glib-mkenums |
1197 | ("intltool" ,intltool) | |
1198 | ("pkg-config" ,pkg-config) | |
1199 | ("vala" ,vala))) | |
98a11b7f TGR |
1200 | (inputs |
1201 | `(("glib" ,glib) | |
1202 | ("zlib" ,zlib))) | |
44118720 TGR |
1203 | (arguments |
1204 | `(#:configure-flags | |
1205 | ;; XXX This ‘documentation’ is for developers, and fails informatively: | |
1206 | ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5 | |
1207 | (list "-Ddocs=false" | |
1208 | "-Dintrospection=false"))) | |
98a11b7f TGR |
1209 | (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page |
1210 | (synopsis "Microsoft Cabinet file manipulation library") | |
1211 | (description | |
1212 | "The libgcab library provides GObject functions to read, write, and modify | |
1213 | Microsoft cabinet (.@dfn{CAB}) files.") | |
1214 | (license (list license:gpl2+ ; tests/testsuite.at | |
1215 | license:lgpl2.1+)))) ; the rest | |
cb390925 TGR |
1216 | |
1217 | (define-public msitools | |
1218 | (package | |
1219 | (name "msitools") | |
84748e71 | 1220 | (version "0.100") |
cb390925 TGR |
1221 | (source (origin |
1222 | (method url-fetch) | |
a4469936 TGR |
1223 | (uri (string-append "mirror://gnome/sources/msitools/" |
1224 | version "/msitools-" version ".tar.xz")) | |
cb390925 TGR |
1225 | (sha256 |
1226 | (base32 | |
84748e71 | 1227 | "1skq17qr2ic4qr3779j49byfm8rncwbsq9rj1a33ncn2m7isdwdv")))) |
cb390925 TGR |
1228 | (build-system gnu-build-system) |
1229 | (native-inputs | |
9e4da9f2 TGR |
1230 | `(("bison" ,bison) |
1231 | ("pkg-config" ,pkg-config))) | |
cb390925 TGR |
1232 | (inputs |
1233 | `(("gcab" ,gcab) | |
1234 | ("glib" ,glib) | |
1235 | ("libgsf" ,libgsf) | |
1236 | ("libxml2" ,libxml2) | |
bb93042c | 1237 | ("uuid" ,util-linux "lib"))) |
cb390925 TGR |
1238 | (home-page "https://wiki.gnome.org/msitools") |
1239 | (synopsis "Windows Installer file manipulation tool") | |
1240 | (description | |
1241 | "msitools is a collection of command-line tools to inspect, extract, build, | |
1242 | and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution | |
1243 | for packaging and deployment of cross-compiled Windows applications.") | |
1244 | (license license:lgpl2.1+))) | |
3d391309 SB |
1245 | |
1246 | (define-public libostree | |
1247 | (package | |
1248 | (name "libostree") | |
295d969c | 1249 | (version "2020.7") |
8812d9ac TGR |
1250 | (source |
1251 | (origin | |
1252 | (method url-fetch) | |
1253 | (uri (string-append | |
1254 | "https://github.com/ostreedev/ostree/releases/download/v" | |
1255 | (version-major+minor version) "/libostree-" version ".tar.xz")) | |
1256 | (sha256 | |
295d969c | 1257 | (base32 "0clriq2ypz1fycd6mpjyrhzid44svzpzw0amnank593h69b216ax")))) |
3d391309 SB |
1258 | (build-system gnu-build-system) |
1259 | (arguments | |
1260 | '(#:phases | |
1261 | (modify-phases %standard-phases | |
1262 | (add-before 'check 'pre-check | |
1263 | (lambda _ | |
1264 | ;; Don't try to use the non-existing '/var/tmp' as test | |
1265 | ;; directory. | |
1266 | (setenv "TEST_TMPDIR" (getenv "TMPDIR")) | |
1267 | #t))) | |
1268 | ;; XXX: fails with: | |
5f97cc23 | 1269 | ;; tap-driver.sh: missing test plan |
3d391309 SB |
1270 | ;; tap-driver.sh: internal error getting exit status |
1271 | ;; tap-driver.sh: fatal: I/O or internal error | |
1272 | #:tests? #f)) | |
1273 | (native-inputs | |
1274 | `(("attr" ,attr) ; for tests | |
1275 | ("bison" ,bison) | |
5f97cc23 | 1276 | ("glib:bin" ,glib "bin") ; for 'glib-mkenums' |
3d391309 SB |
1277 | ("gobject-introspection" ,gobject-introspection) |
1278 | ("pkg-config" ,pkg-config) | |
1279 | ("xsltproc" ,libxslt))) | |
1280 | (inputs | |
1281 | `(("avahi" ,avahi) | |
1282 | ("docbook-xml" ,docbook-xml-4.2) | |
1283 | ("docbook-xsl" ,docbook-xsl) | |
1284 | ("e2fsprogs" ,e2fsprogs) | |
1285 | ("fuse" ,fuse) | |
1286 | ("glib" ,glib) | |
1287 | ("gpgme" ,gpgme) | |
1288 | ("libarchive" ,libarchive) | |
1289 | ("libsoup" ,libsoup) | |
3d391309 SB |
1290 | ("util-linux" ,util-linux))) |
1291 | (home-page "https://ostree.readthedocs.io/en/latest/") | |
1292 | (synopsis "Operating system and container binary deployment and upgrades") | |
1293 | (description | |
1294 | "@code{libostree} is both a shared library and suite of command line | |
1295 | tools that combines a \"git-like\" model for committing and downloading | |
52beae7b TGR |
1296 | bootable file system trees, along with a layer for deploying them and managing |
1297 | the boot loader configuration.") | |
3d391309 | 1298 | (license license:lgpl2.0+))) |
36e1ab84 RH |
1299 | |
1300 | (define-public flatpak | |
1301 | (package | |
122db9a6 | 1302 | (name "flatpak") |
8f940793 | 1303 | (version "1.8.2") |
122db9a6 RH |
1304 | (source |
1305 | (origin | |
1306 | (method url-fetch) | |
1307 | (uri (string-append "https://github.com/flatpak/flatpak/releases/download/" | |
1308 | version "/flatpak-" version ".tar.xz")) | |
1309 | (sha256 | |
8f940793 | 1310 | (base32 "1c45a0k7wx685n5b3ihv7dk0mm2kmwbw7cx8w5g2la62yxfn49kr")))) |
16360cc8 LC |
1311 | |
1312 | ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to | |
1313 | ;; find the TLS backend in glib-networking. | |
1314 | (build-system glib-or-gtk-build-system) | |
1315 | ||
122db9a6 | 1316 | (arguments |
ac68fb3b RW |
1317 | '(#:configure-flags |
1318 | (list | |
1319 | "--enable-documentation=no" ;; FIXME | |
1320 | "--enable-system-helper=no" | |
1321 | "--localstatedir=/var" | |
1322 | (string-append "--with-system-bubblewrap=" | |
1323 | (assoc-ref %build-inputs "bubblewrap") | |
1324 | "/bin/bwrap") | |
753d75d4 RT |
1325 | (string-append "--with-system-dbus-proxy=" |
1326 | (assoc-ref %build-inputs "xdg-dbus-proxy") | |
1327 | "/bin/xdg-dbus-proxy")) | |
ac68fb3b RW |
1328 | #:phases |
1329 | (modify-phases %standard-phases | |
1330 | (add-after 'unpack 'fix-tests | |
1331 | (lambda* (#:key inputs #:allow-other-keys) | |
1332 | (copy-recursively | |
1333 | (string-append (assoc-ref inputs "glibc-utf8-locales") | |
1334 | "/lib/locale/") "/tmp/locale") | |
1335 | (for-each make-file-writable (find-files "/tmp")) | |
1336 | (substitute* "tests/make-test-runtime.sh" | |
1337 | (("cp `which.*") "echo guix\n") | |
1338 | (("cp -r /usr/lib/locale/C\\.\\*") | |
1339 | (string-append "mkdir ${DIR}/usr/lib/locale/en_US; \ | |
1340 | cp -r /tmp/locale/*/en_US.*"))) | |
1341 | (substitute* "tests/libtest.sh" | |
1342 | (("/bin/kill") (which "kill")) | |
1343 | (("/usr/bin/python3") (which "python3"))) | |
1344 | #t)) | |
1345 | ;; Many tests fail for unknown reasons, so we just run a few basic | |
8f940793 | 1346 | ;; tests. |
ac68fb3b RW |
1347 | (replace 'check |
1348 | (lambda _ | |
1349 | (setenv "HOME" "/tmp") | |
1350 | (invoke "make" "check" | |
1351 | "TESTS=tests/test-basic.sh tests/test-config.sh testcommon")))))) | |
1352 | (native-inputs | |
1353 | `(("bison" ,bison) | |
1354 | ("dbus" ,dbus) ; for dbus-daemon | |
1355 | ("gettext" ,gettext-minimal) | |
1356 | ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen | |
1357 | ("glibc-utf8-locales" ,glibc-utf8-locales) | |
1358 | ("gobject-introspection" ,gobject-introspection) | |
1359 | ("libcap" ,libcap) | |
1360 | ("pkg-config" ,pkg-config) | |
1361 | ("python" ,python) | |
b9478f33 | 1362 | ("python-pyparsing" ,python-pyparsing) |
ac68fb3b RW |
1363 | ("socat" ,socat) |
1364 | ("which" ,which))) | |
75f0bda7 RH |
1365 | (propagated-inputs `(("glib-networking" ,glib-networking) |
1366 | ("gnupg" ,gnupg) | |
1367 | ("gsettings-desktop-schemas" | |
1368 | ,gsettings-desktop-schemas))) | |
ac68fb3b RW |
1369 | (inputs |
1370 | `(("appstream-glib" ,appstream-glib) | |
1371 | ("bubblewrap" ,bubblewrap) | |
1372 | ("dconf" ,dconf) | |
1373 | ("fuse" ,fuse) | |
1374 | ("gdk-pixbuf" ,gdk-pixbuf) | |
1375 | ("gpgme" ,gpgme) | |
1376 | ("json-glib" ,json-glib) | |
1377 | ("libarchive" ,libarchive) | |
1378 | ("libostree" ,libostree) | |
1379 | ("libseccomp" ,libseccomp) | |
1380 | ("libsoup" ,libsoup) | |
1381 | ("libxau" ,libxau) | |
1382 | ("libxml2" ,libxml2) | |
1383 | ("util-linux" ,util-linux) | |
1384 | ("xdg-dbus-proxy" ,xdg-dbus-proxy))) | |
122db9a6 RH |
1385 | (home-page "https://flatpak.org") |
1386 | (synopsis "System for building, distributing, and running sandboxed desktop | |
36e1ab84 | 1387 | applications") |
122db9a6 | 1388 | (description "Flatpak is a system for building, distributing, and running |
36e1ab84 | 1389 | sandboxed desktop applications on GNU/Linux.") |
122db9a6 | 1390 | (license license:lgpl2.1+))) |
e343816d MB |
1391 | |
1392 | (define-public akku | |
1393 | (package | |
1394 | (name "akku") | |
1395 | (version "1.0.1") | |
1396 | (source (origin | |
1397 | (method git-fetch) | |
1398 | (uri (git-reference | |
1399 | (url "https://gitlab.com/akkuscm/akku.git") | |
1400 | (commit (string-append "v" version)))) | |
1401 | (file-name (git-file-name name version)) | |
1402 | (sha256 (base32 "1dm32ws3nshnnscd7k75zswxxs1pp25y2q4k8j5ms241hz47by3c")))) | |
1403 | (build-system gnu-build-system) | |
1404 | (arguments | |
1405 | '(#:phases (modify-phases %standard-phases | |
1406 | (replace 'bootstrap | |
1407 | (lambda* (#:key outputs #:allow-other-keys) | |
1408 | (for-each patch-shebang | |
1409 | '("bootstrap" | |
1410 | ".akku/env")) | |
1411 | (let* ((home "/tmp") | |
1412 | (datadir (string-append home "/.local/share/akku/"))) | |
1413 | (mkdir-p datadir) | |
1414 | (invoke "touch" (string-append datadir "index.db")) | |
1415 | (setenv "HOME" home)) | |
1416 | (invoke "./bootstrap") | |
1417 | #t)) | |
1418 | (add-after 'install 'wrap-executables | |
1419 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
1420 | (let ((out (assoc-ref outputs "out")) | |
1421 | (curl (assoc-ref inputs "curl"))) | |
1422 | (wrap-program (string-append out "/bin/akku") | |
1423 | `("LD_LIBRARY_PATH" ":" prefix (,(string-append curl "/lib")))) | |
1424 | #t)))))) | |
1425 | (native-inputs | |
1426 | `(("which" ,which) | |
1427 | ("autoconf" ,autoconf) | |
1428 | ("automake" ,automake) | |
1429 | ("pkg-config" ,pkg-config))) | |
1430 | (inputs | |
1431 | `(("guile" ,guile-3.0) | |
1432 | ("curl" ,curl))) | |
1433 | (home-page "https://akkuscm.org/") | |
1434 | (synopsis "Language package manager for Scheme") | |
1435 | (description | |
1436 | "Akku.scm is a project-based language package manager for R6RS and R7RS Scheme. | |
1437 | It is mainly meant for programmers who develop portable programs or libraries in Scheme, | |
1438 | but could potentially work for end-users of those programs. It also has a translator | |
1439 | from R7RS, which allows most R7RS code to run on R6RS implementations.") | |
1440 | (license license:gpl3+))) |