I’ve been working on integrating Nix in a project and so far everything has been running smoothly. Recently though, I added a derivation which includes a source that looks like src = ./.
(some filtering logic left out of the example for simplicity). The problem is that in the resulting .drv
file, the path to src
includes the name of the folder. Since the CI server uses a different checkout folder name (<some-path>/linux
), this means that e.g. the nix cache is not usable since the derivation hash will change accordingly.
As an example, this is what I see locally in the .drv
:
("src","/nix/store/zn6z7w70bnmqavxgvhxz926i721jh36q-status-react")
and this is what I see on the CI server’s .drv
:
("src","/nix/store/3kk4h02cm848s77smi5ahh1x9n2fmrai-linux")
Is there a way to set the suffix for that directory so that it is reproducible, regardless of where in the user’s machine it ends up getting checked out to?