This PR fixes a performance regression noticed during the review of #35537.
Since commit 008a3e29c8844c0be4457279f5c27c1bc57401c7 ("guix: split builds into Linux(gui) and macOS/Windows"), each host is built in two containers: one instantiated from manifest_build.scm and the other from the union of manifest_build.scm and manifest_gui.scm. The resulting Guix profiles necessarily differ, and because $(realpath $(GUIX_ENVIRONMENT)) is hashed into every depends package id, the built-package cache is invalidated whenever the profile changes:
- All non-GUI packages are built twice per host, as the GUI container cannot reuse the packages just cached by the base container.
- All depends are rebuilt when switching to another branch with identical Guix scripts and the depends subdirectory.
Drop GUIX_ENVIRONMENT from the gen_id inputs. The toolchain remains fully accounted for: the verbose compiler output hashed by gen_id embeds the store paths of the toolchain packages themselves, so any change to the toolchain still invalidates the cache. Given the pinned time-machine commit and the manifests, the only remaining user-provided inputs that can alter the build environment are the ADDITIONAL_GUIX_*_FLAGS, which are now conservatively folded into the ids by passing them to gen_id via the {BUILD,HOST}_ID_SALT variables.
Related: #34228.