[Nix-dev] Haskell-env (via nix-shell) - am I doing this right?
Matthias Beyer
mail at beyermatthias.de
Sat May 23 18:22:16 CEST 2015
Hi Peter,
thanks, thanks for your suggestion, now I got it working.
Unfortunately, I cannot `cabal build` because of one recursive
dependency is missing:
$ cabal build
Building ratehs-0.1...
Preprocessing executable 'ratehs' for ratehs-0.1...
<command line>: cannot satisfy -package-id
snap-0.14.0.2-ef658c66823be8387d049aa89445f690:
snap-0.14.0.2-ef658c66823be8387d049aa89445f690 is unusable due
to missing or recursive dependencies:
clientsession-0.9.1.1-f379c9ed2e350715ba6cdc20d73894b3
(use -v for more information)
Do you have an idea how I can fix this?
I'll send you my default.nix / shell.nix and cabal file, if you need
them, but basically they say (pseudo-code):
env = haskellngPackages.ghcWithPackages ...
pkgs.stdenv
cabal-install
hlint
snap
snap-core
snap-server
snap-loader-static
snaplet-persistent
persistent
persistent-postgresql
persistent-sqlite
heist
and
Build-depends:
heist
persistent
persistent-postgresql
persistent-sqlite
snap
snap-core
snap-server
snap-loader-static
(and everything else which is generated by `snap init`, of course.
On 22-05-2015 21:44:30, Peter Simons wrote:
> Hi Peter,
>
> > 3) The ghc argument in shell.nix allows me to specify different
> > versions of GHC so I can test with multiple versions. (I'd love
> > some feedback on how to make this more flexible.)
>
> I use the following "shell.nix" to switch between compiler versions:
>
> { compiler ? "ghc7101" }:
>
> with (import <nixpkgs> {}).pkgs;
> let
> ghc = haskell.packages.${compiler}.ghcWithPackages
> (pkgs: with pkgs; [ aeson lens monad-par ]);
> in
> stdenv.mkDerivation {
> name = "my-haskell-env-0";
> buildInputs = [ ghc ];
> shellHook = "eval $(grep export ${ghc}/bin/ghc)";
> }
>
> Now run "nix-shell --argstr compiler ghc784" to select a compiler other
> than the default.
>
> 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
--
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer
Proudly sent with mutt.
Happily signed with gnupg.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150523/8a40a1dd/attachment.bin
More information about the nix-dev
mailing list