Make cachix builds from CI/CD match CLI/flake inputs#4804
Merged
automergerpr-permission-manager[bot] merged 1 commit intoApr 30, 2025
Conversation
tothtamas28
approved these changes
Apr 30, 2025
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request fixes the same kind of issue that I already observed and fixed in
evm-semanticsandkontrol, see evm-semantics#2739, evm-semantics#2745, and kontrol#1013.The CI/CD pipeline for k releases builds and publishes kontrol to the nix build cache k-framework-binary. In the respective GitHub action job, the nix derivation is built by cloning the repository and building the derivation locally. When building the nix project locally with a cloned git repository, nix does not include and consider empty submodule directories included by git for building the project. On the other hand, when the repository is referenced in a flake input or built by specifying a github URL in a nix CLI command, the empty submodule directories are included. This causes the package requested by kup, nix CLI, or nix flake inputs to not match the package built by CI/CD that is pushed to the build cache.
As a consequence, k is built on the local machine instead of fetched from the binary cache. Though typically the requested version/hash is still available in the cache, as it is pushed to the cache by cache pushing jobs of other runtime verification repositories.
This pull request fixes this issue such that the same version/hash of the derivation is always built for the cache and requested by flake inputs/CLI/kup.