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

guix install --version

readlink_base ()
{
    basename `readlink "$1"`
}

profile="t-profile-$$"
rm -f "$profile"

trap 'rm -f "$profile" "$profile-"[0-9]*' EXIT

guix install --bootstrap guile-bootstrap -p "$profile"
test -x "$profile/bin/guile"

# Make sure '-r' isn't passed as-is to 'guix package'.
guix install -r guile-bootstrap -p "$profile" --bootstrap && false
test -x "$profile/bin/guile"

# Use a package transformation option and make sure it's recorded.
guix install --bootstrap guile-bootstrap -p "$profile" \
     --with-input=libreoffice=inkscape
test -x "$profile/bin/guile"
grep "libreoffice=inkscape" "$profile/manifest"

guix upgrade --version
guix upgrade -n
guix upgrade gui.e -n
guix upgrade foo bar -n

guix remove --version
guix remove --bootstrap guile-bootstrap -p "$profile"
test ! -x "$profile/bin/guile"
test `guix package -p "$profile" -I | wc -l` -eq 0

guix remove -p "$profile" this-is-not-installed --bootstrap && false

guix remove -i guile-bootstrap -p "$profile" --bootstrap && false

guix search '\<board\>' game | grep '^name: gnubg'

guix show --version
guix show guile
guix show python@3 | grep "^name: python"

# "python@2" exists but is deprecated; make sure it doesn't show up.
guix show python@2 && false

# Specifying multiple packages.
output="`guix show sed grep | grep ^name:`"
test "$output" = "name: sed
name: grep"
2024-10465, 2024-10466, 2024-10467, 2024-11691, 2024-11692, 2024-11693, 2024-11694, 2024-11695, 2024-11696, 2024-11697, 2024-11698 and 2024-11699. See <https://www.mozilla.org/en-US/security/advisories/mfsa2024-48/> and <https://www.mozilla.org/en-US/security/advisories/mfsa2024-64/> for details. * gnu/packages/patches/torbrowser-compare-paths.patch: New file. * gnu/local.mk (dist_patch_DATA): Regisiter it. * gnu/packages/tor-browsers.scm (firefox-locales): Update to f75c1e6a305e68161037337767ece88e9de940b9. (%torbrowser-build-date): Update to 20241125154204. (%torbrowser-version): Update to 14.0.3. (%torbrowser-firefox-version): Update to 128.5.0esr-14.0-1-build2. (torbrowser-translation-base): Update to caa431bbea1a76d7ad61eeda94086a1513762605. (torbrowser-translation-specific): Update to 4314d0a7ce780ffdf82b84e324bfbc437198f993. (make-torbrowser) [arguments] <#:phases>: On 'apply-guix-specific-patches change icecat-compare-paths.patch to torbrowser-compare-paths.patch as the patched file has changed its name between major versions. On 'remove-cargo-frozen-flag, update the regex to match this newer version string. Change-Id: Ia5d445e387351b3d5d08ecb14c2f31bf4cc81396 Signed-off-by: Hilton Chain <hako@ultrarare.space> André Batista 2024-12-09gnu: guile-ssh: Update to 0.18.0....* gnu/packages/ssh.scm (guile-ssh): Update to 0.18.0. [source]: Drop patch, fixed upstream. * gnu/packages/patches/guile-ssh-rename-bool.patch: Remove patch. * gnu/local.mk (dist_patch_DATA): Update with removed patch. Vagrant Cascadian 2024-12-08gnu: guile-emacs: Update to 8f87cbc1dae6a9e77368afc5736df8c342e9153d....* gnu/packages/patches/guile-emacs-build-fixes.patch: New file. * gnu/packages/patches/guile-emacs-fix-configure.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Update accordingly. * gnu/packages/emacs.scm (guile-emacs): Update to 8f87cbc1dae6a9e77368afc5736df8c342e9153d and use new patch. [arguments]: Allow parallel-build. Do not strip-binaries. Use recommended #:configure-flags and #:make-flags. Add stages "help-patch-progam-file-names" and "touch-lisp/finder-inf.el". No longer delete non-existent stage "strip-double-wrap". Delete stages "patch-compilation-driver", "set-libgccjit-path", "validate-comp-integrity", "restore-emacs-pdmp", "build-trampolines", and "install-site-start". [native-search-paths]: New field. Change-Id: I8153a55ef0061720ffd3c4833eff3ae6df3eccfc Janneke Nieuwenhuizen