Closed fxttr closed 2 years ago
Try using the Haskell.nix commit b944c8087d9931d920b7d2c50ba1c875c40c94ee
Hi, thanks for your reply. Could you give me a hint how to use it? Do I need to pin it somewhere? In source.nix?
How did you make sources.nix
? Is that with niv
?
Yes I used niv
like described in the manual.
Ok, have a look at niv --help
- there should be a way to specify a particular commit when you niv add
Haskell.nix
Sadly that didn't solved it.
I will append the trace here :
error: while evaluating the attribute 'NIX_GHC_LIBDIR' of the derivation 'ghc-shell-for-stream' at /nix/store/bn14fy2mc2p1q44681il8idfv5fr5x3z-source/pkgs/stdenv/generic/make-derivation.nix:205:7:
while evaluating the attribute 'buildCommand' of the derivation 'ghc-shell-for-stream-ghc-8.10.7-env' at /nix/store/bn14fy2mc2p1q44681il8idfv5fr5x3z-source/pkgs/stdenv/generic/make-derivation.nix:205:7:
while evaluating 'optionalString' at /nix/store/bn14fy2mc2p1q44681il8idfv5fr5x3z-source/lib/strings.nix:202:5, called from /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/builder/shell-for.nix:111:19:
while evaluating the attribute 'buildCommand' of the derivation 'hoogle-with-packages' at /nix/store/bn14fy2mc2p1q44681il8idfv5fr5x3z-source/pkgs/stdenv/generic/make-derivation.nix:205:7:
while evaluating the attribute 'hoogle' at /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/builder/default.nix:59:16:
while evaluating 'tool' at /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/overlays/tools.nix:71:35, called from /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/builder/default.nix:48:32:
while evaluating 'hackage-tool' at /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/overlays/tools.nix:60:18, called from /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/overlays/tools.nix:76:7:
while evaluating 'hackage-package' at /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/overlays/haskell.nix:449:11, called from /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/overlays/tools.nix:64:8:
while evaluating 'getPackage' at /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/overlays/haskell.nix:663:26, called from /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/overlays/haskell.nix:451:14:
while evaluating the attribute 'pkg-set' at /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/overlays/haskell.nix:522:26:
while evaluating anonymous function at /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/lib/import-and-filter-project.nix:5:1, called from /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/overlays/haskell.nix:495:27:
while evaluating the attribute 'buildCommand' of the derivation 'hoogle-plan-to-nix-pkgs' at /nix/store/bn14fy2mc2p1q44681il8idfv5fr5x3z-source/pkgs/stdenv/generic/make-derivation.nix:205:7:
string '/nix/store/6qxhfiwjkmga9lmjrz9n43v6lcxgd6pc-hoogle-5.0.18.3-src' cannot refer to other paths, at /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/lib/clean-source-with.nix:109:52
What version of nix are you on?
nix --version
nix (Nix) 2.3.16
Are you certain you're on b944c8087d9931d920b7d2c50ba1c875c40c94ee? Can you share your new sources.nix
file?
I think upgrading to 2.4 will fix this or pinning Haskell.nix to b944c8087d9931d920b7d2c50ba1c875c40c94ee. I'm not sure of the correct way to do that, but what I usually do is to edit nix/sources.json
and replace the commit hash in there, then change the sha256
(the hash nix uses) to something invalid (change some of the characters in the hash to 0 or something). The first time you build there will be an error telling you the correct sha256 to use. There may be a niv
command to do this, but I am not sure what it is.
Thanks, that did the trick. I tried niv modify haskellNix -r b944c8087d9931d920b7d2c50ba1c875c40c94ee
but it only modifies the rev
attribute in sources.json
.
After modifing url
and sha256
by hand it worked.
Thanks for your help, except some failing dependency resolving in cabal nix-shell
works now.
Closed because my Problem is solved.
Hi,
I have a problem with creating a nix-shell.
I followed the manual and successfully created a default.nix. I can build my project with
nix-build -A project.components.exes.project-exe
I use a stack based project with enabled nix-integration. But when I try to create a development environment via shell.nix I am getting the errorerror: string '/nix/store/6qxhfiwjkmga9lmjrz9n43v6lcxgd6pc-hoogle-5.0.18.3-src' cannot refer to other paths, at /nix/store/471hzbkjgpy80rc5l8gzvv6wscb4ajw8-haskellNix-src/lib/clean-source-with.nix:109:52
because I enabled "withHoogle". The same happends with any tool I try to install viatools
. I am rather new to nix and can't really figure out what the error is.Informations: OS: NixOS 21.11 Buildsystem: Stack
default.nix:
shell.nix:
stack.yaml:
Thanks for your help!