aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-pack-localstatedir.sh
blob: b734b0f7e3a3fd52bb36b00ce0ea69ae801f7a6d (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
# GNU Guix --- Functional package management for GNU
# Copyright © 2018 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 pack --localstatedir' command-line utility.
#

guix pack --version

# 'guix pack --localstatedir' produces derivations that depend on
# guile-sqlite3 and guile-gcrypt.  To make that relatively inexpensive, run
# the test in the user's global store if possible, on the grounds that
# binaries may already be there or can be built or downloaded inexpensively.

NIX_STORE_DIR="`guile -c '(use-modules (guix config))(display %storedir)'`"
localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`"
GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket"
export NIX_STORE_DIR GUIX_DAEMON_SOCKET

if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))'
then
    exit 77
fi

# Build a tarball with '--localstatedir'
the_pack="`guix pack -C none --localstatedir --profile-name=current-guix \
            guile-bootstrap`"
test_directory="`mktemp -d`"
trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT

cd "$test_directory"
tar -xf "$the_pack"

profile="`find -name current-guix`"
test "`readlink $profile`" = "current-guix-1-link"
test -s "`dirname $profile`/../../../db/db.sqlite"
test -x ".`guix build guile-bootstrap`/bin/guile"
cd -

# Make sure the store database is not completely bogus.
guile -c "(use-modules (sqlite3) (guix config) (ice-9 match))

  (define db
    (sqlite-open (string-append \"$test_directory\"
                                %localstatedir
                               \"/guix/db/db.sqlite\")
                 SQLITE_OPEN_READONLY))

  (define stmt
    (sqlite-prepare db \"SELECT * FROM ValidPaths;\"))

  (match (sqlite-fold cons '() stmt)
    ((#(ids paths hashes times derivers sizes) ...)
     (exit (member \"`guix build guile-bootstrap`\" paths))))"
sg-tooltip'>* gnu/packages/text-editors.scm (lem)[arguments]: Link against libutil for forkpty function. Change-Id: Ibd2455e7288de1c7bf487d01c72f7bc7cd558f15 jgart 2024-10-08gnu: lem: Update to 80ab76c....* gnu/packages/text-editors.scm (lem): Update to 80ab76c. Change-Id: I6bb189dbf232d28d85ca6961a76ddf3cd1720de3 jgart 2024-10-08gnu: lem: Use cc-for-target....* gnu/packages/text-editors.scm (lem)[arguments]: Use cc-for-target. Change-Id: Ied9e7ec2f51c7b72470c99f0353df06354d9fc4d jgart 2024-10-02gnu: lem: Build included shared library....* gnu/packages/text-editors.scm (lem): Build shared library. [source]: Delete precompiled binaries. [arguments]: Patch libvterm and build shared library. [inputs]: Add libvterm. Change-Id: I296f139f93032ccbb380e112c9c1e4fd681ae1a7 jgart 2024-10-01gnu: Add lem....* gnu/packages/text-editors.scm (lem): New variable. Co-authored-by: Ada Stevenson <adanskana@gmail.com> Change-Id: I2946355068597e44b8699281647bcd8d98f47911 jgart 2024-09-06gnu: nano: Update to 8.2....* gnu/packages/text-editors.scm (nano): Update to 8.2. Change-Id: I72d3ead40cc5cabf52931567195d6bafd3e86d6e Signed-off-by: Zheng Junjie <zhengjunjie@iscas.ac.cn> Andy Tai 2024-08-31gnu: texmacs: Add libxcrypt dependency....* gnu/packages/text-editors.scm (texmacs)[inputs]: Add libxcrypt. Change-Id: I746dde1dda33c7c8b23242442dc2c2cadade07ec 宋文武 2024-08-31gnu: ed: Update to 1.20.1....* gnu/packages/text-editors.scm (ed): Update to 1.20.1. Reviewed-by: Dale Mellor <guix-devel-0brg6a@rdmp.org> Change-Id: I58ba1c8213a5ac2a126ecb58321859d64d0fcb01 Signed-off-by: Christopher Baines <mail@cbaines.net> Andy Tai 2024-08-31gnu: ed: Update to 1.19....* gnu/packages/text-editors.scm (ed): Update to 1.19. Change-Id: I69f4c9cbcf5c862cbffb6d82662c548591917d88 Ludovic Courtès 2024-08-31gnu: text-editors: Add 'bash' input for 'wrap-program'....It is required for cross-compilation. * gnu/packages/text-editors.scm (vis)[inputs]: Add 'bash-minimal'. (jucipp)[inputs]: Likewise. (ghostwriter)[inputs]: Likewise. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: Ic55d5602d0514029eba1f8d5313169570da3edb1 Maxime Devos 2024-08-31build-systems: gnu: Export %default-gnu-imported-modules and %default-gnu-mod......Until now users would have to cargo cult or inspect the private %default-modules variable of (guix build-systems gnu) to discover which modules to include when extending the used modules via the #:modules argument. The renaming was automated via the command: $ git grep -l %gnu-build-system-modules | xargs sed 's/%gnu-build-system-modules/%default-gnu-imported-modules/' -i * guix/build-system/gnu.scm (%gnu-build-system-modules): Rename to... (%default-gnu-imported-modules): ... this. (%default-modules): Rename to... (%default-gnu-modules): ... this. Export. (dist-package, gnu-build, gnu-cross-build): Adjust accordingly. Change-Id: Idef307fff13cb76f3182d782b26e1cd3a5c757ee Maxim Cournoyer 2024-08-26gnu: scintilla: Update to 5.5.1....* gnu/packages/text-editors.scm (scintilla): Update to 5.5.1. Change-Id: I51b87c8095b97bd0b4dd51bc5f7558735fe9da73 Nicolas Goaziou 2024-08-11gnu: mg: Update to 20240709....* gnu/packages/text-editors.scm (mg): Update to 20240709. Change-Id: Id21e7ae99c2b9e66344e87bccb6165fa27cb22f1 Signed-off-by: Christopher Baines <mail@cbaines.net> Spencer King