aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-archive.sh
blob: fdaeb98ad2be639f48e7d33e5b5ec517a8abb36a (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# GNU Guix --- Functional package management for GNU
# Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of GNU Guix.
#
# GNU Guix is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or (at
# your option) any later version.
#
# GNU Guix is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

#
# Test the 'guix archive' command-line utility.
#

guix archive --version

archive="t-archive-$$"
archive_alt="t-archive-alt-$$"
tmpdir="t-archive-dir-$$"
rm -f "$archive" "$archive_alt"
rm -rf "$tmpdir"

trap 'rm -f "$archive" "$archive_alt"; rm -rf "$tmpdir"' EXIT

guix archive --export guile-bootstrap > "$archive"
guix archive --export guile-bootstrap:out > "$archive_alt"
cmp "$archive" "$archive_alt"

guix archive --export							\
    -e '(@ (gnu packages bootstrap) %bootstrap-guile)' > "$archive_alt"
cmp "$archive" "$archive_alt"

guix archive --export `guix build guile-bootstrap` > "$archive_alt"
cmp "$archive" "$archive_alt"

# Check the exit value upon import.
guix archive --import < "$archive"

if guix archive something-that-does-not-exist
then false; else true; fi

# This one must not be listed as missing.
guix build guile-bootstrap > "$archive"
guix archive --missing < "$archive"
test "`guix archive --missing < "$archive"`" = ""

# Two out of three should be listed as missing.
echo "$NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo" >> "$archive"
echo "$NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-bar" >> "$archive"
guix archive --missing < "$archive" > "$archive_alt"
echo "$NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo" > "$archive"
echo "$NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-bar" >> "$archive"
cmp "$archive" "$archive_alt"

# This is not a valid store file name, so an error.
echo something invalid > "$archive"
if guix archive --missing < "$archive"
then false; else true; fi

# Check '--extract'.
guile -c "(use-modules (guix serialization))
  (call-with-output-file \"$archive\"
    (lambda (port)
      (write-file \"$(guix build guile-bootstrap)\" port)))"
guix archive -x "$tmpdir" < "$archive"
test -x "$tmpdir/bin/guile"
test -d "$tmpdir/lib/guile"

if echo foo | guix archive --authorize
then false; else true; fi
phase. Change-Id: Ibf29e28a82f1821cefbdc87e8bfdf3ffcd4219e5 Guillaume Le Vaillant 2023-11-30gnu: txr: Update to 292....* gnu/packages/lisp.scm (txr): Update to 292. Change-Id: I7fb2e2c5ea40954d45eb80d36fb0db4f6f45c4c7 Guillaume Le Vaillant 2023-11-19gnu: janet: Update to 1.32.1....* gnu/packages/lisp.scm (janet): Update to 1.32.1. Change-Id: I4c34bbdedf0e21ba9c605b71205b010118dcf0b4 Signed-off-by: jgart <jgart@dismail.de> Adriel Dumas--Jondeau 2023-11-08gnu: Have vim packages use vim-build-system....* gnu/packages/vim.scm (vim-neocomplete, vim-neocomplete-snippets, vim-neosnippet, vim-scheme, vim-luna, vim-fugitive, vim-airline, vim-airline-themes, vim-syntastic, neovim-syntastic, vim-solarized, vim-rainbow, editorconfig-vim, neovim-packer, vim-guix-vim, vim-asyncrun, vim-dispatch, vim-gemini-vim, vim-eunuch, vim-slime, vim-vlime, vim-paredit, vim-surround, vim-gnupg, vim-ctrlp, vim-mucomplete, vim-gitgutter, vim-characterize, vim-tagbar, vim-nerdtree, vim-nerdcommander): [build-system]: Switch to vim-build-system. [arguments]: Adjust accordingly. * gnu/packages/code.scm (global)[arguments]: Move vim files to their new location. * gnu/packages/lisp.scm (txr), * gnu/packages/mail.scm (msmtp), * gnu/packages/rust-apps.scm (skim), * gnu/packages/vim.scm (vifm), * gnu/packages/wm.scm (fluxbox): Same. Co-authored-by: Efraim Flashner <efraim@flashner.co.il> Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Change-Id: I8b3e5d65d76a100c3dbddc1ae562b72966c2b304 Jonathan Scoresby 2023-10-25gnu: eisl: Update to 3.50....* gnu/packages/lisp.scm (eisl): Update to 3.50. Change-Id: Iecefae965ab5a4f8a6d7e5cff2c9d2c2a02668ac Guillaume Le Vaillant 2023-09-23Merge branch 'lisp-team'Guillaume Le Vaillant 2023-09-12gnu: sbcl: Downgrade to 2.3.7....Version 2.3.8 doesn't build on riscv64, so let's use version 2.3.7 for now. * gnu/packages/lisp.scm (sbcl): Downgrade to 2.3.7. Guillaume Le Vaillant 2023-09-16gnu: sbcl: Remove i586-gnu from supported-systems....* gnu/packages/lisp.scm (sbcl)[supported-systems]: Remove i586-gnu. Christopher Baines 2023-09-16gnu: ecl: Remove i586-gnu from supported-systems....* gnu/packages/lisp.scm (ecl)[supported-systems]: Remove i586-gnu. Christopher Baines 2023-09-09gnu: ecl: Update to 23.9.9....* gnu/packages/lisp.scm (ecl): Update to 23.9.9. Guillaume Le Vaillant 2023-09-04gnu: sbcl: Update to 2.3.8....* gnu/packages/lisp.scm (sbcl): Update to 2.3.8. [source]: Remove 'patches' field. * gnu/packages/patches/sbcl-riscv-Make-contribs-build-again.patch: Remove file. * gnu/packages/local.mk (dist-patch_DATA): Unregister it. Co-authored-by: Guillaume Le Vaillant <glv@posteo.net> Andre A. Gomes 2023-09-04gnu: clisp: Add threads support on x84_64-linux....Guix's build version of CLISP, fails to load bordeaux-threads: Error while trying to load definition for system bordeaux-threads This implementation is unsupported. This patch adds support for POSIX_THREADS on x86_64-linux system. * gnu/packages/lisp.scm (clisp)[arguments]: Add configuration options to support threads on x86_64-linux system. Reported and Co-Authored by Andrew Kravchuk <awkravchuk@gmail.com> Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Sharlatan Hellseher 2023-08-08gnu: txr: Update to 291....* gnu/packages/lisp.scm (txr): Update to 291. Guillaume Le Vaillant 2023-08-02gnu: janet: Update to 1.29.1....* gnu/packages/lisp.scm (janet): Update to 1.29.1. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Yovan Naumovski