The upstream project now ships a Yarn Berry lockfile with metadata
version 8. The previous fetchYarnDeps/prefetch-yarn-deps flow only
supports Yarn v1 lockfiles, so it failed before dependency hashes could
be updated.
Switch dependency fetching to yarn-berry_4.fetchYarnBerryDeps and install
dependencies with yarnBerryConfigHook. Add missing-hashes.json for
optional platform packages whose checksums are omitted from yarn.lock, so
the offline cache can still be verified reproducibly.
Keep Yarn from refreshing or migrating the v8 lockfile during the Nix
build, and replace the Yarn v1 build/install hooks with explicit phases
compatible with Yarn Berry. Adjust the manual dependency copies for the
hoisted node_modules layout produced by the Berry node-modules linker.
Assisted-by: Codex (GPT-5.5)
Without the change the eval fails on `master` as:
$ nix build --no-link -f. aws-cdk-cli.tests
error:
… while evaluating the attribute 'version'
at pkgs/by-name/aw/aws-cdk-cli/package.nix:104:5:
103| passthru = {
104| tests.version = testers.testVersion { package = finalAttrs.package; };
| ^
105| updateScript = nix-update-script {
… while evaluating the 'name' attribute of a derivation
… while evaluating a branch condition
at lib/strings.nix:2882:5:
2881| # First detect the common case of already valid strings, to speed those up
2882| if stringLength string <= 207 && okRegex string != null then
| ^
2883| unsafeDiscardStringContext string
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute 'package' missing
at pkgs/by-name/aw/aws-cdk-cli/package.nix:104:53:
103| passthru = {
104| tests.version = testers.testVersion { package = finalAttrs.package; };
| ^
105| updateScript = nix-update-script {