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