Skip to content

cabal inside nix shell seems confused about build-tools such as happy #798

@Ptival

Description

@Ptival

To reproduce, you can try to use this repository (it's fairly small)

Ptival/language-ocaml@0df752c

To try and reproduce (hopefully it's not just my machine):

$ nix-shell
# wait...
[nix-shell] $ cabal build language-ocaml

If it behaves like me, you will get the following message:

Warning: No remote package servers have been specified. Usually you would have
one specified in the config file.
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: language-ocaml-0.2.2 (user goal)
[__1] unknown package: language-ocaml:happy:exe.happy (dependency of
language-ocaml)
[__1] fail (backjumping, conflict set: language-ocaml,
language-ocaml:happy:exe.happy)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: language-ocaml,
language-ocaml:happy:exe.happy

I've been able to have happy, the executable, in path, but still, when trying to build the library, cabal seems to want some target <lib>:happy:exe.happy and does not know what it is.

Also, I don't know if it's just me, but in the nix-shell, when I run cabal update, I get:

$ cabal update
newParallelJobControl: not a sensible number of jobs: 0
CallStack (from HasCallStack):
  error, called at ./Distribution/Client/JobControl.hs:101:3 in main:Distribution.Client.JobControl

Metadata

Metadata

Assignees

No one assigned

    Labels

    preservedKeep stale bot away

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions