-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
buildStackProject: fails downloading resolver #32005
Comments
Related? haskell/wreq#5 (comment) |
I guess it makes sense: The nix sandbox doesn't allow networking for non-fixed-output derivations. As expected, turning off sandboxing makes it work: The resolver build dependencies should be downloaded with a fixed-output derivation instead, but I'm not sure how to do that. Will tinker with it though. |
@peti I'd say this issue is valid. I believe the stack home can be a fixed output derivation, which would actually be enough to change the |
Er, actually no. Though I bet Stack's build plan is 100% deterministic, GHC is not. So the libraries Stack builds won't be fixed. Ugh. |
I wonder if you can get stack to do the 100% deterministic build plan as a fixed output derivation, do the actual Haskell dependency building as another derivation, and finally have the stack project on top of all that. EDIT: wording |
Unfortunately, |
I thought Stackage had a bunch of stuff to deal with that? I don’t have a source; just vaguely remember some rants on Stack issue pages about this stuff. |
If it does, then I am not aware of it. |
@peti So newer resolvers do pin revisions, but older ones do not. Also I believe that Nevertheless, I think we can fix all of this by pinning the Hackage DB version that stack looks at. |
I'm going to reopen this issue because this should at least be documented in the manual. |
Please don't keep this issue open. If you feel like there should be documentation of the status quo, then please don't hesitate to submit a PR that extends the documentation. Keeping old issues open that nobody has acted upon for 1+ years is no good way to accomplish anything. Doing it is a good way to accomplish things you are about. |
This issue is not resolved and the issue description is still as valid as it was when I opened it, as already mentioned by @ElvishJerricco a while ago. I've reopened this because I just had to explain to a user on IRC how |
No-one disputes that this issue exists. It does. But that does not mean that we need to track it in the Nixpkgs bugtracker as an open issue. We cannot possibly have an open bug in here for every single use case that some person somewhere in the world might think of. It's too much noise and it drowns out that issues that are more important. |
This isn't a random usecase though, it's the way to have a Nix build for a stack project. By keeping it open it serves as a ToDo item, for nixpkgs maintainers and myself, this gets forgotten otherwise, and indeed I did already forget about this because you closed this a while ago, yet the problem is still not solved or even remedied. Closed issues are for "won't fix" or "not an issue" or "issue is fixed", and not "don't want to fix right now". |
Some excerpts from #nixos:
That's at least 4 known people (with the person in #19526, which you also closed) to have had this issue. And I think it's fair to double this to include instances I couldn't find. That's a significant number. Do we close issues for [insert random software here] because the single person using it encounters an issue with it? No. Then we also shouldn't close this issue which is a problem for an order of magnitude more people. |
Would a good approach be to have |
@jkarni The issue is in determining what exactly to hash. Stack needs to download info from Hackage to build a plan, but this info is ever-changing, as the Hackage index changes. So you have to somehow hash the plan that Stack comes up with, and that plan needs to be 100% deterministic (unclear whether it really is, given The simplest thing for the plan part would be somehow controlling the Hackage index tarfile that Stack uses. This tarfile is append-only, with new entries having a later date, so simply truncating it on a date set in the recent past can make a fixed-output derivation. If Stack can be told to use this tarfile, the plan can be constructed without internet access. But this doesn't include source hashes, so you'd need either IFD, or a separate derivation with a separate user-supplied hash to represent all the required sources. It's a mess. |
Reopening so I can close it with a PR that actually addresses this.. |
Issue description
According to #30072 it should now be possible to use
nix-build
to build abuildStackProject
derivation. This however doesn't seem to work due to stack failing to download the resolver build plan:This is the same error as in #19526 from before the new
buildStackProject
, which was closed without a solution.Pinging the participants of these two issues @ElvishJerricco @peti @mboes @vaibhavsagar @wizzup and @vklquevs
Steps to reproduce
stack new test && cd test
default.nix
with the contentsstack.yaml
:nix-build -I nixpkgs=$HOME/src/nixpkgs
Technical details
"x86_64-linux"
Linux 4.9.61, NixOS, 18.03.git.e3ab8368c0 (Impala)
yes
yes
nix-env (Nix) 1.11.15
""
"nixos-18.03pre119086.737b466031"
/cfg/nixpkgs
The text was updated successfully, but these errors were encountered: