Thanks @otterz and @vlkr . The key options to get sound in my case were these:

--preserve="^XDG_RUNTIME_DIR$"
--expose=$XDG_RUNTIME_DIR/pulse

Just in case it is useful for anyone else, I was trying to run a game I wrote in Godot, and then exported for binary distribution.

The screenshots show the resulting guix shell command and a manifest with the minimum requirements to run the containerized game.

Thanks again for your help ๐Ÿ™‚

Instructions to run the game from a terminal. The commands read:

$ cd ~/Juegos/radiata
$ guix shell -CF -m manifest.scm \
  --preserve="^DISPLAY$" \
  --preserve="^XAUTHORITY$" \
  --preserve="^XDG_RUNTIME_DIR$" \
  --expose="$XAUTHORITY" \
  --expose=/tmp/.X11-unix/ \
  --expose=/dev/dri \
  --expose=$XDG_RUNTIME_DIR/pulse
$ ./radiata.x86_64Definition of the Guix manifest used for the "guix shell" command that sets up the containerized environment to run the game. The content is written in the Scheme language. It reads:

(use-modules (gnu packages))

(define %qolic-requirements  ; qolic stands for Quality of Life in Containers.
  (list "bash"
        "coreutils"))

(define %godot-requirements
  (list "alsa-lib"
        "dbus"
        "eudev"
        "fontconfig"
        "libx11"
        "libxcursor"
        "libxkbcommon"
        "libxext"
        "libxinerama"
        "libxrandr"
        "libxi"
        "mesa"
        "pulseaudio"))

(specifications->manifest
 (append %qolic-requirements
         %godot-requirements))
0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.online/users/luis_felipe/statuses/113829448757559030 on your instance and quote it. (Note that quoting is not supported in Mastodon.)