You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to set up a nix-shell for a stack project, and no matter what I try to do, it fails with the same message:
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:34:12:
33|
34| strict = derivationStrict drvAttrs;
| ^
35|
… while evaluating derivation 'ghc-shell-for-example'
whose name attribute is located at /nix/store/3dkd7jjg354lylv9s5lm3387f4yfls7y-source/pkgs/stdenv/generic/make-derivation.nix:333:7
… while evaluating attribute 'nativeBuildInputs' of derivation 'ghc-shell-for-example'
at /nix/store/3dkd7jjg354lylv9s5lm3387f4yfls7y-source/pkgs/stdenv/generic/make-derivation.nix:377:7:
376| depsBuildBuild = elemAt (elemAt dependencies 0) 0;
377| nativeBuildInputs = elemAt (elemAt dependencies 0) 1;
| ^
378| depsBuildTarget = elemAt (elemAt dependencies 0) 2;
… while evaluating the option `packages.hruby.components.library.pkgconfig':
… while evaluating definitions from `/nix/store/kk5jv9cbl9xd97al28qg4n3wjv8kwrxg-source/modules/plan.nix':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: The pkg-conf packages does not contain the package: ruby (pkg-conf dependency).
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
It is noteworthy that I am not depending on hruby in any way shape or form.
In trying to debug this I found out I get this error even on an empty project, across multiple haskell.nix versions, multiple nixpkgs versions, and multiple stackage resolvers.
nix-build runs just fine, but nix-shell fails with the aforementioned error. All of this happening on x86_64-linux (not NixOS).
It is my understanding that by pinning a specific haskell.nix tarball I'm also pinning a specific nixpkgs version, so this should be reproducible on any nix machine?
At first I thought this is a legitimate issue with pkg-config, and after a lot of staring at https://input-output-hk.github.io/haskell.nix/tutorials/pkg-map.html (I gotta say, the docs are not super clear about what exactly I need to do), I managed to produce the correct incantation for my default.nix:
After which, it stops complaining about hruby and now complains about llvm-hs, which once again I am not depending on:
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:34:12:
33|
34| strict = derivationStrict drvAttrs;
| ^
35|
… while evaluating derivation 'ghc-shell-for-example'
whose name attribute is located at /nix/store/3dkd7jjg354lylv9s5lm3387f4yfls7y-source/pkgs/stdenv/generic/make-derivation.nix:333:7
… while evaluating attribute 'nativeBuildInputs' of derivation 'ghc-shell-for-example'
at /nix/store/3dkd7jjg354lylv9s5lm3387f4yfls7y-source/pkgs/stdenv/generic/make-derivation.nix:377:7:
376| depsBuildBuild = elemAt (elemAt dependencies 0) 0;
377| nativeBuildInputs = elemAt (elemAt dependencies 0) 1;
| ^
378| depsBuildTarget = elemAt (elemAt dependencies 0) 2;
… while evaluating the option `packages.llvm-hs.package.identifier.version':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: The option `packages.llvm-hs.package.identifier.version' is used but not defined.
All of which leads me to conclude that somehow it's trying to evaluate every haskell package in existence even if I'm not using it, and some of them have random failures like this.
The text was updated successfully, but these errors were encountered:
I've been trying to set up a nix-shell for a stack project, and no matter what I try to do, it fails with the same message:
It is noteworthy that I am not depending on
hruby
in any way shape or form.In trying to debug this I found out I get this error even on an empty project, across multiple haskell.nix versions, multiple nixpkgs versions, and multiple stackage resolvers.
Here's my empty project:
stack.yaml
:default.nix
:shell.nix
The complete MWE repo can be found at: https://github.com/mniip/nix-test
nix-build
runs just fine, butnix-shell
fails with the aforementioned error. All of this happening onx86_64-linux
(not NixOS).It is my understanding that by pinning a specific haskell.nix tarball I'm also pinning a specific nixpkgs version, so this should be reproducible on any nix machine?
At first I thought this is a legitimate issue with pkg-config, and after a lot of staring at https://input-output-hk.github.io/haskell.nix/tutorials/pkg-map.html (I gotta say, the docs are not super clear about what exactly I need to do), I managed to produce the correct incantation for my
default.nix
:After which, it stops complaining about
hruby
and now complains aboutllvm-hs
, which once again I am not depending on:All of which leads me to conclude that somehow it's trying to evaluate every haskell package in existence even if I'm not using it, and some of them have random failures like this.
The text was updated successfully, but these errors were encountered: