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

Not working with recent Hydra versions #48

Open
dhess opened this issue Jul 30, 2020 · 3 comments
Open

Not working with recent Hydra versions #48

dhess opened this issue Jul 30, 2020 · 3 comments

Comments

@dhess
Copy link

dhess commented Jul 30, 2020

Hi, thanks for this project -- it's super useful.

I have noticed, unfortunately, that it doesn't seem to work with recent Hydra versions. I'm not sure when this happened, nor whether it was a change in gitignore.nix or Hydra itself, but with the most recent version of gitignore.nix and Hydra 2020-06-23 (the latest version in nixpkgs as of 2020-07-28), I get a restricted mode error any time I try to use gitignoreSource ./. as a src attribute inside a project; e.g.,

hydra-eval-jobs returned exit code 1:
error: "\u001b[31;1merror:\u001b[0m\u001b[34;1m --- RestrictedPathError --- hydra-eval-jobs\u001b[0m\naccess to path '\u001b[33;1m/nix/store/2k8r1any80g67n58iaghcrwad8kwhh3r-source\u001b[0m' is forbidden in restricted mode"
error: --- EndOfFile --- hydra-eval-jobs
unexpected EOF reading a line

(Sorry for the HTML escaping -- Hydra's error messages are pretty bad.)

Is anyone else able to reproduce this behavior?

@phile314
Copy link

We have run into this problem as well. For now we have patched our Hydra to disable the restrictions, but that is not really a proper fix ....

@roberth
Copy link
Member

roberth commented Sep 16, 2020

It looks like either hydra is putting sources in the store before evaluating, or you're invoking gitignore on a source that's already in the store. Could you enable --show-trace and/or check what the contents of the store path are?

@dhess
Copy link
Author

dhess commented Jan 26, 2021

I think this down to haskell.nix, actually. See input-output-hk/haskell.nix#496

I noticed because, now that we've switched one of our haskell.nix projects to a Flake, we're having the same issue with nix flake check when we use gitignoreSource on the Haskell project (or nearly any other source filter, including nixpkgs's own cleanSourceWith; though haskell.nix's own cleanGit function works, strangely enough). However, we have a PureScript project in the same repo that is built with vanilla mkDerivation, and we can use gitignoreSource on the PureScript project's src attribute without any issues (neither nix flake check, nor on our Hydra).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants