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

Weird evaluation failure in CI #201

Open
jla2000 opened this issue Dec 16, 2024 · 1 comment
Open

Weird evaluation failure in CI #201

jla2000 opened this issue Dec 16, 2024 · 1 comment
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@jla2000
Copy link

jla2000 commented Dec 16, 2024

The following issue happens sometimes in my GitLab pipeline. I'm using nix flakes and a devshell that contains a rust-overlay toolchain.

$ nix develop .# -c cargo build
unpacking 'github:numtide/flake-utils/11707dc2f618dd54ca8739b309ec4fc024de578b?narHash=sha256-l0KFg5HjrsfsO/JpG%2Br7fRrqm12kzFHyUHqHCVpMMbI%3D' into the Git cache...
unpacking 'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e?narHash=sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768%3D' into the Git cache...
copying path '/nix/store/9j895vklndff575s0rc8xhhvr0qcri2i-source' from 'https://cache.nixos.org'...
unpacking 'github:oxalica/rust-overlay/4eb3f096e14431bd0ab4cca039f9c9d77331cbfc?narHash=sha256-uDfJ/TrLLqrtoNzfPODDOVyZ%2BJWsJfd5T1r7xuE6h6g%3D' into the Git cache...
error:
       … while evaluating a branch condition
         at /nix/store/9j895vklndff575s0rc8xhhvr0qcri2i-source/lib/trivial.nix:859:27:
          858|   */
          859|   throwIfNot = cond: msg: if cond then x: x else throw msg;
             |                           ^
          860|in the left operand of the OR (||) operator
         at /nix/store/9j895vklndff575s0rc8xhhvr0qcri2i-source/lib/trivial.nix:991:41:
          990|   */
          991|   isFunction = f: builtins.isFunction f ||
             |                                         ^
          992|     (f ? __functor && isFunction (f.__functor f));
       (stack trace truncated; use '--show-trace' to show the full, detailed trace)
       error: cannot read file 'rust-overlay-4eb3f096e14431bd0ab4cca039f9c9d77331cbfc/manifests/stable/1.83.0.nix' from tarball

The error seems to happen during fetching of the flake inputs.
I'm not even using version 1.83, I have it pinned to the 1.80 version like this:

pkgs = import nixpkgs {
    inherit system;
    overlays = [ (import rust-overlay) ];
};
rustToolchain = pkgs.rust-bin.stable."1.80.1".minimal;
@oxalica oxalica added help wanted Extra attention is needed question Further information is requested labels Jan 1, 2025
@oxalica
Copy link
Owner

oxalica commented Jan 1, 2025

The following issue happens sometimes in my GitLab pipeline.

We need a reliable reproduction code to figure out why. Your error message is also truncated (without --show-trace).
If it happens relatively common to you, please add --show-trace for the build command, and print your Nix and nixpkgs version. And also provide the full content of your flake.nix.
It can also be cache-related so maybe cleaning the tarball and/or eval cache could help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants