-
Notifications
You must be signed in to change notification settings - Fork 116
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
Building project1 with cabal fails with dependency error #20
Comments
Looked into this some more today. On one machine that I have that's running Ubuntu 16.04 I need to enter nix-shell, run Strangely, on another machine I have that's running Ubuntu 14.04 I need to run In hindsight, of course you need to run But anyways, if the docs included instructions to run |
The root of the problem is that you need to use $ nix-shell -A project1.env release0.nix Then |
Ah interesting. That's non-intuitive that if you use the incorrect attribute the nix shell will starts successfully but commands will fail. Your explanation in #19 really helped as well. I think I assumed that the Is my understanding somewhat correct? (Apologies if these are more Nix questions and less "Haskell Nix" questions). |
I don't know the reason why there are two separate derivations for building the project and the shell and I don't know why the default derivation (i.e. |
I have just reinstalled
|
@zoranbosnjak: What is the output of |
|
What is the output of these commands? $ git status
$ cat project1/release0.nix
$ cat project1/default.nix |
The status is clean. How can I check what version of nixpkgs is in use (if I don't explicitly pin the version)? |
@zoranbosnjak: Not that I know of. The problem is that the You can get the path to the $ nix-instantiate --eval --expr '<nixpkgs>' ... which (if you are not pinning |
@zoranbosnjak The root of a channel should have a file
The second part of that is the git commit hash in the nixpkgs repository (or a prefix of it, but a unique one) |
@zoranbosnjak |
Thanks for all useful answers! Just one more question... |
For actually setting nixpkgs to a specific git revision, check out NixOS/nixpkgs#27994. Although I suggest not setting it to anything newer than the unstable branches at https://github.com/NixOS/nixpkgs-channels so that you still get binary downloads, instead of having to compile everything (assuming you would want that), and a basic automated level of testing (from my knowledge channels only get updated if a particular set of their packages build successfully, even if there are newer nixpkgs commits). |
When trying to build project1 using the "Building with cabal" instructions from the project0 readme I get an error about it being unable to resolve dependencies.
Steps to reproduce
So
nix-build
is able to resolve theturtle
dependency butcabal configure
is not. The steps above work when building and runningproject0
though.Shell Output
snip:1 Output from
nix-build release0.nix
(irrelevant lines removed)Full output at https://gist.github.com/m-renaud/b497478c059a79112393aeb015739730
Versions
The text was updated successfully, but these errors were encountered: