[Nix-dev] Mixing cabal and Nix? Or: Best way to install development versions of Haskell packages?

Aristid Breitkreuz aristidb at googlemail.com
Fri Mar 9 16:18:24 CET 2012


When I use cabal by hand, I don't get a clean Nix environment of course. Is
the best way to write a Nix package for the development version of Agda?
Note that I figured out a way to get it to work by hand, by passing --force
to ghc-pkg (in my last email, when I copied the command the --force got
clipped off, but I really had to call it with --force).

If I don't use the cabal binary but rather Setup.hs for configure, I do get

Using Cabal-1.14.0 compiled by ghc-7.4

But it still finds the system tools like /usr/bin/pkg-config. Either way,
it doesn't work without me passing --force to ghc-pkg.

Note that if I look at the way Nix packages are installed by the
cabal.mkDerivation thing, it also passes --force to ghc-pkg.


Aristid

2012/3/9 Peter Simons <simons at cryp.to>

> Hi Aristid,
>
> the build log says:
>
>  > Using Cabal-1.10.2.0 compiled by ghc-7.0
>
> That doesn't seem right. That library almost certainly didn't come from
> Nix. Is
> it possible that your ~/.cabal and/or ~/.ghc directories contained
> remnants of
> earlier builds that were performed with the system compiler? Could you
> please
> remove both ~/.cabal and ~/.ghc, and then try the build again in a clean
> environment?
>
> Also, the build log shows several other tools that were used from the
> system,
> i.e.:
>
>  > Using ar found on system at: /usr/bin/ar
>  > Using gcc version 4.6.1 found on system at: /usr/bin/gcc
>  > Using haddock version 2.9.2 found on system at: /usr/bin/haddock
>  > Using ld found on system at: /usr/bin/ld
>  > Using pkg-config version 0.26 found on system at: /usr/bin/pkg-config
>  > Using ranlib found on system at: /usr/bin/ranlib
>  > Using strip found on system at: /usr/bin/strip
>  > Using tar found on system at: /bin/tar
>
> I don't believe that those tools are causing the errors that you're
> seeing, but
> still it's a little worrying, especially use of /usr/bin/pkg-config.
>
> I hope this helps,
> Peter
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120309/d56d7ae1/attachment-0001.html 


More information about the nix-dev mailing list