Skip to content

nix-builder: let genSdkFlakeOutputs generate metadata - #1062

Merged
danieldk merged 4 commits into
mainfrom
backend-metadata
Nov 30, 2026
Merged

danieldk merged 4 commits into
mainfrom
backend-metadata

Conversation

@danieldk

Copy link
Copy Markdown
Member

Before this change, an SDK would have to generate metadata.json itself. This is error-prone, since SDKs could write invalid metadata or outdated metadata (not adopt newer fields).

This change makes genSdkFlakeOutputs generate metadata.json. We have to do this from Nix-land, since SDKs don't use build.toml and all the information is visible to Nix, but we do use kernel-builder to validate the metadata.

There is also a related change, kernel-builder zip-build would read build.toml to check the requested layout. This also doesn't work for SDKs due to the absence of build.toml. Instead, make kernel-builder zip-build always zip the build and let the zip-build-hook hook decide whether the build should be zipped, depending on the requested layout (either from build.toml for kernels or through the buildLayout argument of genSdkFlakeOutputs for SDKs).

The decision whether to actually zip the variants is left to the
hook. This makes `zip-build` agnostic to whether we are using a
`build.toml` (kernels) or not (SDKs).

@drbh drbh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@danieldk
danieldk merged commit cd38872 into main Nov 30, 2026
55 checks passed
@danieldk
danieldk deleted the backend-metadata branch November 30, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants