[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 23:13:51 CET 2012


Hi Alexander,

I am using the development version of Agda which is not on Hackage yet.
That's why I did not use cabal2nix. :-)

Cheers,

Aristid


2012/3/9 Alexander Foremny <alexanderforemny at googlemail.com>

> > 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?
>
> Hello,
>
> there is cabal2nix which works very well. I usually run cabal2nix to
> get a Nix expression for a package which is on Hackage but not in Nix'
> repositories and then use nix-env to install it. Note that cabal2nix
> can handle URLs to .cabal files and that Hackage provides those URLs
> on the package's page at the bottom.
>
> Regards
> Alexander Foremny
>
> Am 9. März 2012 16:18 schrieb Aristid Breitkreuz <aristidb at googlemail.com
> >:
> >
> > 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
> >
> >
> >
> > _______________________________________________
> > 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/152c665b/attachment.html 


More information about the nix-dev mailing list