Alternative to #35929
The GUI and non-GUI Guix profiles produce different depends build IDs. However, depends deletes the existing per-package cache directory when storing a new build. Sharing a cache root therefore causes each profile to evict the other's packages, forcing rebuilds on subsequent runs.
This PR keeps these packages in separate GUIX/BUILD and GUIX/GUI directories under the cache root. This also keeps them separate from ordinary developer builds when BASE_CACHE is being used there.
#35929 replaces GUIX_ENVIRONMENT in package ID generation with a hash of selected Guix inputs. Its current implementation covers the manifests, patches, pinned Guix revision and additional flags, but that list needs to stay aligned with how we construct the environment and may therefore be brittle to future changes.
In this version I prefer keeping the resolved environment in the cache key and simply keeping the caches separate.
Tradeoffs vs #35929
This PR means building and storing some dependencies twice, which I consider a reasonable cost for simpler cache tracking/invalidation. This is likely going to be the case for Linux anyway i.e after a change like #36193 or #25573.