Skip to content

Make cachix builds from CI/CD match CLI/flake inputs#81

Merged
automergerpr-permission-manager[bot] merged 2 commits into
masterfrom
cachix-build-matching
May 30, 2025
Merged

Make cachix builds from CI/CD match CLI/flake inputs#81
automergerpr-permission-manager[bot] merged 2 commits into
masterfrom
cachix-build-matching

Conversation

@juliankuners

Copy link
Copy Markdown
Contributor

This pull request fixes the same kind of issue that I already observed and fixed in evm-semantics, kontrol, and more, see, e.g., evm-semantics#2739, evm-semantics#2745, and kontrol#1013.

The CI/CD pipeline for komet builds and publishes komet 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, komet is built on the local machine instead of fetched from the binary cache.

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. After merging this pull request, kup install komet will download komet from the nix build cache instead of building it locally.

@juliankuners

Copy link
Copy Markdown
Contributor Author

I just tested this with the upstream branch from this pull request and can confirm that hashes now match.

@automergerpr-permission-manager automergerpr-permission-manager Bot merged commit f87cabf into master May 30, 2025
4 checks passed
@automergerpr-permission-manager automergerpr-permission-manager Bot deleted the cachix-build-matching branch May 30, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants