Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix flake check fails on crane due to IFD #612

Open
korfuri opened this issue May 16, 2024 · 1 comment
Open

nix flake check fails on crane due to IFD #612

korfuri opened this issue May 16, 2024 · 1 comment
Labels
bug Something isn't working needs reproduction Missing a flake which easily reproduces the problem

Comments

@korfuri
Copy link

korfuri commented May 16, 2024

Describe the bug

crane's flake.nix uses an IFD in the form of he inputFromLock function, with this import. This causes nix flake check to fail in some instances, if the check happens without this derivation having been built.

This causes any flake depending on crane to fail flake checks as well.

In my case I'm hitting this because I want to run nix flake check in the CI of my homelab flake that contains multiple nixosConfigurations. I don't want to build all these configurations when I'm just running CI, that would be a ton of compute for each change, so I'm running with --no-build (I also need this as I have machines with various architectures, but my CI runners can't build for all these archs). I use https://github.com/nix-community/lanzaboote which depends on crane, and so my nix flake checks are failing.

I don't understand the Rust ecosystem well enough, but it seems this pattern is only used to import a specific version of rust-overlay. Couid this instead be done without an IFD, by depending on it as a regular flake input?

Reproduction

nix gc
nix flake check --no-build github:ipetkov/crane
@korfuri korfuri added the bug Something isn't working label May 16, 2024
@ipetkov
Copy link
Owner

ipetkov commented May 18, 2024

Hi @korfuri thanks for the report!

nix flake check --no-build github:ipetkov/crane

This is actually running all of crane's test suite; to my understanding, flake checks are never run for dependencies (or even transitive dependencies), so even if the location you linked is triggering IFD, I'm not entirely certain why that would be triggered in your flake.

Could you provide a(n ideally minimal) reproduction of your flake that I can test with?

@ipetkov ipetkov added the needs reproduction Missing a flake which easily reproduces the problem label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs reproduction Missing a flake which easily reproduces the problem
Projects
None yet
Development

No branches or pull requests

2 participants