Closed fmthoma closed 6 years ago
Thanks for the suggestion. The problem is that the relevant library is available by different names in different systems. On some it's ncurses
, for some it's curses
, some it's tinfo
, etc...for an example of how tricky this is, see: https://ghc.haskell.org/trac/ghc/ticket/7281
Currently we solve this issue using Build-type: Configure
in the .cabal file (and then checking which library is installed in the configure
script. Is there a way for stack/nix to run the ./configure script in order to figure out which package to use?
Okay, point taken :-)
Unfortunately, NixOS won't even provide the ncurses
dependency unless it is explicitly listed, which is why the build script fails. On the other hand, since the name of the library is stable in NixOS, there won't be any guessing necessary.
I guess adding a default.nix
file in the project root will do the trick for this specific case. I will have a look into it and maybe come up with a pull request one of the next days.
Closing since it looks like the nixpkgs ghc now provides ncurses automatically.
Although
(n)curses.h
is obviously a dependency, it is not listed in the cabal file. This might be the reason why stack/nix builds break for some people including me.This can be resolved by adding
in the
stack.yaml
of projects usingterminfo
.However, I would assume that a
(or
libncurses
?) in yourterminfo.cabal
would just solve this problem for everyone.