Hi, I have a few projects setup as nix flakes and everything has been going very smoothly for the past few months until today when I ran into an issue I haven’t been able to resolve. On a CI job that builds the project, I’m seeing a NAR hash error for one of the flake inputs (which is another flake/repo that I’m in control of). The error is:
error: NAR hash mismatch in input 'git+ssh://git@{URL}?ref={REF}&rev={REV}' (/nix/store/9rlg5jbjmxf4czb8yzqf6z3a4lzz3wpk-source), expected 'sha256-1BEMZQ6U1hDb5sxVbiio/BCAtapmhjJBIQSn5D0peJw=', got 'sha256-RpY/JLE1MK2lOoiPZqzvMrpHDa+cA4Paiy953VhbtYE='
It’s odd in that it just started happening and seems to related to state on the CI runner (re-running the CI job for commits that have previously run successfully is resulting in this error), it’s still currently working locally on my machine, as well as on my machine from docker using nixpkgs/cachix-flakes:latest
which is the image the CI job runs from.
Does anyone have any ideas about why this might happen? I’ve been having trouble getting to the bottom of it.
Thank you in advance for any help
EDIT: Some additional info:
- Job is being run with GitLab CI using
nixpkgs/cachix-flakes:latest
docker image - nix --version:
nix (Nix) 2.4pre20210707_02dd6bb
EDIT2:
I’m thinking this is potentially a reproducibility problem but I’m not sure where that would be coming from. It seems like /nix/store/9rlg5jbjmxf4czb8yzqf6z3a4lzz3wpk-source
is even different since this directory doesn’t exist on my local machine after building.