[Nix-dev] GHC-bundled terminfo collides with the actual package

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Fri Aug 22 18:00:36 CEST 2014


Hi,

I want to have Agda available everywhere on my system so I wanted to
stick it in systemPackages. nix-shell does not work in this scenario
because I use it for its input method in emacs so it needs to be
available everywhere, all the time: I don't want to have to start
separate emacs sessions.

That worked for a while but few weeks ago I started getting this:

##
collision between
`/nix/store/kb4kpcvmiiacvfabjldk7590js6v1f41-ghc-7.8.3/lib/ghc-7.8.3/terminfo-0.4.0.0/System/Console/Terminfo/Cursor.dyn_hi'
and
`/nix/store/rn1zydhnd5li8dh2ldn3yasdwglk3lyj-haskell-terminfo-ghc7.8.3-0.4.0.0-shared/lib/ghc-7.8.3/terminfo-0.4.0.0/System/Console/Terminfo/Cursor.dyn_hi'
at /nix/store/9z6d76pz8rr7gci2n3igh5dqi7ac5xqj-builder.pl line 72.
##

This stops the rebuild.

Is there a clean way to proceed? A hack which overrides terminfo to
produce nothing doesn't work as we end up with

##
Loading package terminfo-0.4.0.0 ... <command line>: can't load .so/.DLL
for: libncursesw.so (libncursesw.so: cannot open shared object file: No
such file or directory)
##

Another hack which passes terminfo = null to haskeline which is the
dependency of Agda that actually pulls terminfo is doesn't work either:

##
/nix/store/ngsbygsjzv0fbj1543306l0a48qqy1vs-binutils-2.23.1/bin/ld:
cannot find -lncursesw
##

The only thing I have in systemPackages is as follows:
##
      (haskellPackages.ghcWithPackages (self :
        [ self.Agda
          self.AgdaStdlib
          self.HTTP
          self.tar
        ]))
##


Can someone advise how I can have Agda (or any terminfo-dependent
program) in systemPackages? My current workaround is going to involve
using nix-env to get Agda and AgdaStdlib into my user's profile but I
don't like using nix-env, I have no packages active through that way and
I'd hate to have to make an exception.
-- 
Mateusz K.


More information about the nix-dev mailing list