aboutsummaryrefslogtreecommitdiff
# GNU Guix --- Functional package management for GNU
# Copyright © 2018, 2019 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.

storedir="`guile -c '(use-modules (guix config))(display %storedir)'`"
localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`"
NIX_STORE_DIR="$storedir"
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))))"
...* gnu/packages/lxqt.scm (lxqt-session): Fix build. [inputs]: Replace kwindowsystem with kwindowsystem-5. Change-Id: I9a4614f2850edd3882135b78efd44f5fd836f01c Zheng Junjie 2024-07-18gnu: lxqt-runner: Fix build....* gnu/packages/lxqt.scm (lxqt-runner): Fix build. [inputs]: Replace kwindowsystem with kwindowsystem-5. Change-Id: I06fbeca9d73fba1ff3a0581f84d5a0368751f1c5 Zheng Junjie 2024-07-18gnu: lxqt-powermanagement: Fix build....* gnu/packages/lxqt.scm (lxqt-powermanagement): Fix build. [inputs]: Replace kidletime, kwindowsystem, and solid with kidletime-5, kwindowsystem-5, and solid-5. Change-Id: I564c3231726cfff938ecd61b596d6fe4af650e39 Zheng Junjie 2024-07-18gnu: lxqt-policykit: Fix build....* gnu/packages/lxqt.scm (lxqt-policykit): Fix build. [inputs]: Replace kwindowsystem with kwindowsystem-5. Change-Id: I06d4ebbbf2d2ed38ee538ef2aa8aefa57b8b5273 Zheng Junjie 2024-07-18gnu: lxqt-panel: Fix build....* gnu/packages/lxqt.scm (lxqt-panel): Fix build. [inputs]: Replace solid with solid-5. [propagated-inputs]: Replace kwindowsystem with kwindowsystem-5. Change-Id: Ic80e9bc3d5986e9e4aadd2ecc1d4cbd4ae530a93 Zheng Junjie 2024-07-18gnu: lxqt-openssh-askpass: Fix build....* gnu/packages/lxqt.scm (lxqt-openssh-askpass): Fix build. [inputs]: Replace kwindowsystem with kwindowsystem-5. Change-Id: I74df232c14c91724f2e3315ac070094fd4895480 Zheng Junjie 2024-07-18gnu: lxqt-notificationd: Fix build....* gnu/packages/lxqt.scm (lxqt-notificationd): Fix build. [inputs]: Replace kwindowsystem with kwindowsystem-5. Change-Id: I19364afe434743ca7a5bad64bf7d9f3dd747471c Zheng Junjie 2024-07-18gnu: lxqt-globalkeys: Fix build....* gnu/packages/lxqt.scm (lxqt-globalkeys): Fix build. [inputs]: Replace kwindowsystem with kwindowsystem-5. Change-Id: I9d05ef6a223bef70eadc407e461b275c296f502b Zheng Junjie 2024-07-18gnu: lxqt-config: Fix build....* gnu/packages/lxqt.scm (lxqt-config): Fix build. [inputs]: Replace kwindowsystem and solid with kwindowsystem-5 and solid-5. Change-Id: Ia9c1b4c74bc2fbb13f871f25cc33a7103f9d1883 Zheng Junjie 2024-07-18gnu: lxqt-admin: Fix build....* gnu/packages/lxqt.scm (lxqt-admin): Fix build. [inputs]: Replace kwindowsystem with kwindowsystem-5. Change-Id: I55b38184f2ec3419dc7c6d136dfe6f214ea4154f Zheng Junjie 2024-07-18gnu: lxqt-about: Fix build....* gnu/packages/lxqt.scm (lxqt-about): Fix build. [inputs]: Replace kwindowsystem with kwindowsystem-5. Change-Id: I6e788e32bce0898badf75b9da2687a333e2a1773 Zheng Junjie 2024-07-18gnu: Add libkscreen-5....* gnu/packages/kde-plasma.scm (libkscreen-5): New variable. * gnu/packages/lxqt.scm (lxqt-config)[propagated-inputs]: Switch to it. Change-Id: I7cce1a02251800496c731883f64fc17938dd8ceb Zheng Junjie 2024-07-18gnu: liblxqt: Fix build....* gnu/packages/lxqt.scm (liblxqt)[inputs]: Replace kwindowsystem with kwindowsystem-5. Change-Id: I48e824c49b56ad485a40a8abd9909205203382c3 Zheng Junjie