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