[Nix-dev] Haskell packages installation

Sergey Mironov ierton at gmail.com
Tue Jul 17 08:03:17 CEST 2012


Hi. +1 to the question. Could you please explain in details: where can
I find this ghc-wrapper ? Grepping nixpkgs returns no result..

Sergey

2012/7/16 Dmitry Malikov <malikov.d.y at gmail.com>:
> On 07/16/2012 03:50 PM, Alexander Foremny wrote:
>> Hello Dmitry,
>>
>> Nix uses the cabal build process (cabal configure, cabal build, cabal
>> install) internally to install Haskell packages. However, this differs
>> from just saying
>>
>>> $ cabal install split
>> I suspect you are using incompatible GHC and split versions. As you
>> can see Haskell packages in Nixpkgs are not only referenced by their
>> name and version but also by the compiler's version they are built
>> for. Thus, if you use GHC 7.4.2 you should install
>> haskell-split-ghc7.4.2 for instance.
>>
>> Please check the version of GHC, for example by running.
>>
>>> $ ghc --version
>> Another possible problem could be that you installed ghc instead of
>> ghc-wrapper as ghc-wrapper takes care that GHC finds all the libraries
>> installed by Nix.
>>
>> Regards,
>> Alexander Foremny
>>
>> 2012/7/15 Dmitry Malikov <malikov.d.y at gmail.com>:
>>> Hi.
>>>
>>> Could you please explain how haskell packages installation is really
>>> works in Nixos?
>>>
>>> For example, there is split hackage package, which is named
>>> haskell-split-ghc7.4.1-0.1.4.3.
>>> I've installed it:
>>> $ nix-env -q '*' | grep split
>>> haskell-split-ghc7.4.1-0.1.4.3
>>>
>>> Then I'm trying to load it from ghci:
>>>   > :m + Data.List.Split
>>>
>>> <no location info>:
>>>       Could not find module `Data.List.Split'
>>>       It is not a module in the current program, or in any known package.
>>>
>>> What am I doing wrong?
>>>
>>> It's hard to understand what happens after `nix-env -i
>>> haskell-split-ghc7.4.1` (seems like it's not installed via cabal, just
>>> «linked» to my profile).
>>>
>>> --
>>> Best regards,
>>> dmitry malikov
>>> !
>>>
>>> _______________________________________________
>>> nix-dev mailing list
>>> nix-dev at lists.science.uu.nl
>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
> Hi, Alexander.
>
>> Another possible problem could be that you installed ghc instead of
>> ghc-wrapper as ghc-wrapper takes care that GHC finds all the libraries
>> installed by Nix.
> You are right. Installing ghc-wrapper actually helps.
>
> It's sad that fact that I need to use ghc-wrapper instead of ghc is
> really non obvious.
>
> Thanks for help.
>
>
> --
> Best regards,
> dmitry malikov
> !
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list