aboutsummaryrefslogtreecommitdiff
# GNU Guix --- Functional package management for GNU
# Copyright © 2013, 2015, 2017, 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 gc' command-line utility.
#

guix gc --version

trap "rm -f guix-gc-root" EXIT
rm -f guix-gc-root

# Below we are using 'drv' and 'out' to contain store file names.  If 'drv'
# and 'out' are environment variables, 'list-runtime-roots' will "see" them
# and thus prevent $drv and $out from being garbage-collected.  Using 'unset'
# allows us to make sure these are truly local shell variables and not
# environments variables.
unset drv
unset out

# For some operations, passing extra arguments is an error.
for option in "" "-C 500M" "--verify" "--optimize" "--list-roots"
do
    guix gc $option whatever && false
done

# This should fail.
guix gc --verify=foo && false

# Check the references of a .drv.
drv="`guix build guile-bootstrap -d`"
out="`guix build guile-bootstrap`"
test -f "$drv" && test -d "$out"

guix gc --references "$drv" | grep -e -bash
guix gc --references "$out"
guix gc --references "$out/bin/guile"

guix gc --references /dev/null && false

# Check derivers.
guix gc --derivers "$out" | grep "$drv"

# Add then reclaim a .drv file.
drv="`guix build idutils -d`"
test -f "$drv"

guix gc --list-dead | grep "$drv"
guix gc --delete "$drv"
test ! -f "$drv"

# Add a .drv, register it as a root.
drv="`guix build --root=guix-gc-root lsh -d`"
test -f "$drv" && test -L guix-gc-root

guix gc --list-roots | grep "$PWD/guix-gc-root"

guix gc --list-live | grep "$drv"
guix gc --delete "$drv" && false

rm guix-gc-root
guix gc --list-dead | grep "$drv"
guix gc --delete "$drv"
test ! -f "$drv"

# Try a random collection.
guix gc -C 1KiB

# Check trivial error cases.
guix gc --delete /dev/null && false

# Bug #19757
out="`guix build guile-bootstrap`"
test -d "$out"

guix gc --delete "$out"

test ! -d "$out"

out="`guix build guile-bootstrap`"
test -d "$out"

guix gc --delete "$out/"

test ! -d "$out"

out="`guix build guile-bootstrap`"
test -d "$out"

guix gc --delete "$out/bin/guile"
ef='/guix/commit/gnu/packages/gl.scm?id=fda63ca5211137790d633459b63818ac5405691f'>gnu: mesa: Update configure flags....Previously, in 1ed0283fcc12b4b48f5b61be026a7b832d9781dc, mesa's configuration options were altered to use "auto" as needed, while it looks like this was inadvertently changed in 9b2a3e023f7090d19c98e7582220340df3962555. This meant i915 dropped from x86/x86_64. This commit restores the "auto" behavior where it matched our previous driver list (or restored missing drivers). See mesa's meson.build for all options. * gnu/packages/gl.scm (mesa)[arguments]: For gallium-drivers, use "softpipe,llvmpipe" instead of the deprecated "swrast" option. Use "auto" in gallium-drivers and vulkan-drivers where it provides the same driver list (or restores ones dropped from x86/x86_64). Comment on differences from "auto" where we don't use it. Change-Id: I920701f71d19578f4913fda7372273955f0a9847 John Kehayias 2024-11-05gnu: mesa: Update to 24.2.2....Note the clang input for mesa was in inputs for aarch64-linux but more generally in native-inputs for mesa-opencl. Moved to native-inputs for all (mesa does not retain a reference to clang). * gnu/packages/gl.scm (mesa): Update to 24.2.2. [inputs]: Move clang-18 when building for aarch64-linux to ... [native-inputs]: ... here for all architectures. Add python-ply, and python-pyyaml. Use libclc for all architectures. (mesa-opencl)[inputs, native-inputs]: Remove fields. * gnu/packages/python-xyz.scm (python-pyyaml, python-ply): Add a comment about being dependencies of mesa. Change-Id: Ie262e6ea5a31fda0e410277256c203ea3caed96b John Kehayias 2024-11-05gnu: llvm-for-mesa: Update to llvm-18....* gnu/packages/llvm.scm (llvm-for-mesa): Update to llvm-18. * gnu/packages/gl.scm (mesa)[inputs]: Always use llvm-for-mesa (remove llvm-18 for aarch64 to use llvm-for-mesa). (mesa-opencl)[native-inputs]: Remove clang-15. Add clang-18. Change-Id: I767d40d62a827864d3d109c44f82a43302875eb8 John Kehayias 2024-09-24gnu: glfw: Fix a missing path to a dlopen call....Recent release of glfw introduced a new dlopen call to `libwayland-client.so.0´. This small fix adds this library to the list of libraries to be patched. It does not affect earlier versions. * gnu/packages/gl.scm (glfw): Add `libwayland-client.so.0' to the list of libraries to be patched. Change-Id: I9436c63f49a9b2fed18e06d593e67a593e3c6cad Arnaud Lechevallier 2024-09-04gnu: glfw-3.4: Fix build....* gnu/packages/glfw.scm (glfw-3.4)[arguments]: Don't build out of source. Change-Id: I42437c60f7adbc0b087f7149b17181fbc8eab4ce Guillaume Le Vaillant 2024-08-31gnu: mesa: Fix building on aarch64-linux....* gnu/packages/gl.scm (mesa)[inputs]: When building for aarch64-linux use clang-18 and llvm-18 instead of llvm-for-mesa. [native-inputs]: When building for aarch64-linux add libclc. [arguments]: Adjust the 'disable-failing-test phase when building for aarch64-linux to skip a test. (mesa-opencl)[native-inputs]: When building for aarch64-linux don't add clang-15. * gnu/packages/check.scm (python-lit), * gnu/packages/llvm.scm (libclc), * gnu/packages/vulkan.scm (spirv-llvm-translator): Add a note about it being a dependency for mesa. Change-Id: I0bf5ab019ffd0626ad2d0c38bafceec401e3c886 Efraim Flashner 2024-08-31Agnu: mesa: Build asahi driver on aarch64....* gnu/packages/gl.scm (mesa): Build asahi driver on aarch64. Change-Id: I597e70732b9ebd18960131f1b664b2dc83683b8e Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Roman Scherer 2024-08-12gnu: glfw-3.4: New variable....* gnu/packages/gl.scm (glfw-3.4): New variable. Change-Id: I77f2214c78f35455436897a3fbff083331295314 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com> Artyom V. Poptsov 2024-08-12gnu: glfw: Update to 3.3.10....* gnu/packages/gl.scm (glfw): Update to 3.3.10. Change-Id: I9d789fb74af4ed649102195891adc5e437883d30 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com> Artyom V. Poptsov 2024-04-15Merge remote-tracking branch 'savannah/master' into mesa-updates...Change-Id: I00980ec5dbd9d23ab076995bc79331d136424796 Christopher Baines 2024-04-09gnu: glmark2: Update to 2023.01....* gnu/packages/gl.scm (glmark2): Update to 2023.01. Change-Id: Ia3a468d5da28801fc9c13de6995ca6599bbbb87c Signed-off-by: Christopher Baines <mail@cbaines.net> Wilko Meyer 2024-04-07gnu: mesa: Enable svga driver on all architectures....* gnu/packages/gl.scm (mesa)[arguments]: Adjust configure-flags so that the svga gallium-driver is enabled on all architectures. Change-Id: I0a604f1f8e4dac511c273149b95bf9b270e8e1fe Efraim Flashner 2024-04-07gnu: mesa: Enable all the video codecs....* gnu/packages/gl.scm (mesa)[arguments]: Adjust the configure-flags to enable all the video codecs. Change-Id: Id540e4d8af8b756f1d0e4978b18e22dd19dd8985 Efraim Flashner 2024-04-07gnu: mesa: Adjust skipped tests on powerpc-linux....* gnu/packages/gl.scm (mesa)[arguments]: In the 'disable-failing-test phase enable another test when building for powerpc-linux. Change-Id: Ib043b2ea77dc145b3b067496ed45662ad635dc72 Efraim Flashner 2024-04-04gnu: mesa: Enable more gallium drivers....* gnu/packages/gl.scm (mesa)[arguments]: Adjust the configure-flag to also build the svga gallium driver on aarch64 and the freedreno and svga drivers on armhf. Change-Id: I129a66184e2728e61a99bae442db908c5c0f84b0 Efraim Flashner 2024-04-04gnu: mesa: Don't skip extra tests on aarch64-linux....* gnu/packages/gl.scm (mesa)[arguments]: In the 'disable-failing-test phase remove the test skipped only on aarch64-linux. Change-Id: I2f6d978775887270b6374faaa48318565e393767 Efraim Flashner 2024-04-01gnu: mesa: Update to 24.0.4....* gnu/packages/gl.scm (mesa): Update to 24.0.4. Change-Id: Id0c14c0ad6a45d6cdb4533053e7a116285a87e5f John Kehayias 2024-03-31gnu: mesa: Update to 24.0.3....* gnu/packages/gl.scm (mesa): Update to 24.0.3. Co-authored-by: aurtzy <aurtzy@gmail.com> Change-Id: Id674e81154631daf9e8c33940c299dc1d26c62c5 John Kehayias 2024-03-31gnu: mesa: Hardcode libvulkan.so's dependency for zink....* gnu/packages/gl.scm (mesa): Add vulkan-loader as an input. Refer to its libvulkan.so.1 by full path in the zink gallium driver. (cherry picked from commit e2875b7bb894f3575b6e61daa9c1f5d5f4c14b84) Change-Id: I83ff787e6148a45b9403e578dd744f7eb85a221b Josselin Poiret 2024-02-03gnu: Add piglit....* gnu/packages/gl.scm (piglit): New variable. Liliana Marie Prikler 2024-02-03gnu: Add waffle....* gnu/packages/gl.scm (waffle): New variable. Liliana Marie Prikler 2024-01-10gnu: mesa: Fix cross-compilation....* gnu/packages/gl.scm(mesa)[arguments]<#:phases>: When cross-compiling, force the use of the cmake method to find llvm. Change-Id: I27f6f4d9d71028c15588eeade48d3a918c042b9c Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Zheng Junjie 2024-01-09gnu: glew: Fix cross-compiling....* gnu/packages/gl.scm (mesa)[native-inputs]: When cross-compiling, add cmake-minimal-cross. [arguments]: Adjust 'fix-cross-compiling to find llvm. * gnu/packages/llvm.scm (llvm-for-mesa) [arguments]<#:configure-flags>: When cross-compiling, set -DBUILD_SHARED_LIBS:BOOL=TRUE and -DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE, remove -DLLVM_LINK_LLVM_DYLIB.*. <#:phases>: When cross-compiling, remove the 'delete-static-libraries phase. Change-Id: If10dec7695e62604e080230e10f2b8d7167f660b Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Zheng Junjie 2024-01-04Merge branch 'master' into mesa-updates...Change-Id: I46ca25bea98d25150877421c6d5161752afabb25 John Kehayias 2024-01-03gnu: glew: Fix cross-compiling....gnu/packages/gl.scm(glew): [arguments]<#:make-flags>: when cross-compiling, use {cc,strip}-for-target. Change-Id: I365f6635120a85359083beb88cb138f09a99fe33 Zheng Junjie 2023-12-31gnu: glfw: Update to 3.3.9....* gnu/packages/gl.scm (glfw): Update to 3.3.9. Change-Id: Ide5ec168e97d431dba007bd6095635dab83b87c4 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Kaelyn Takata 2023-12-28gnu: mesa: Update to 23.3.2....* gnu/packages/gl.scm (mesa): Update to 23.3.2. Change-Id: Ic348c48f4045e8766646a5fe62209619a0247059 John Kehayias 2023-12-28Merge branch 'master' into mesa-updates...Change-Id: I16539f64df739453a83f8dfd962e04910a7d7ff5 John Kehayias 2023-12-18gnu: mesa: Enable zink support....* gnu/packages/gl.scm (mesa)[arguments]: Add zink to gallium-drivers in configure-flags. Change-Id: I1fc7e38a8307b589a7c48bc0b923fccd9ffcd8b8 John Kehayias 2023-12-17gnu: mesa: Update to 23.3.1....* gnu/packages/gl.scm (mesa): Update to 23.3.1. Change-Id: Idf4393b4fa5b7df7a78bd88d7591385023460b5b John Kehayias 2023-12-22gnu: Add glad, version 2.0.4....* gnu/packages/gl.scm (glad): New variable. Change-Id: I516d44dfc9272702c3ac31773df0b6c2d68ed99c Modified-by: Hilton Chain <hako@ultrarare.space> Signed-off-by: Hilton Chain <hako@ultrarare.space> Zheng Junjie 2023-12-22gnu: glad-0.1: Use gexps....* gnu/packages/gl.scm (glad-0.1)[arguments]: Use gexps. Change-Id: I871ec0ff9c7731222f1dd0e8c95057efa1231992 Hilton Chain 2023-12-22gnu: glad: Rename to glad-0.1....* gnu/packages/gl.scm (glad): Rename variable to... (glad-0.1): ...this. * gnu/packages/electronics.scm (openboardview)[native-inputs]: Adjust accordingly. Change-Id: I5a9068186a899b8ff76feb51fd44f59e71cdb030 Hilton Chain 2023-11-05gnu: libepoxy: Hardcode paths to GLES libraries....Fixes <https://issues.guix.gnu.org/64981>. * gnu/packages/gl.scm (libepoxy)[arguments]<#:phases>: Hardcode paths to libGLESv1_CM.so.1 and libGLESv2.so.2. Signed-off-by: John Kehayias <john.kehayias@protonmail.com> Change-Id: I9d68a2b8f9c4ffee13ea63ea973970bf1d4c8a6d 宋文武 2023-11-05gnu: mesa: Update to 23.2.1....* gnu/packages/gl.scm (mesa): Update to 23.2.1. Change-Id: I9014c29696317eeda2c86170ef64d57dd02fe8f4 John Kehayias