Various ways to use GHC in nix-shell

Posted on July 29, 2017

There are many ways to use GHC in nix-shell

  • System’s default GHC
$ nix-shell -p ghc
  • System’s default GHC with additional libraries
$ nix-shell -p 'haskellPackages.ghcWithPackages (self: with self; [ random ])' 
  • Specific version with libraries
$ nix-shell -p 'haskell.packages.ghc7103.ghcWithPackages (self: with self; [ random ])'
  • with shell.nix

Originally published with more details at wizzup.github.io.

Show your support

Clapping shows how much you appreciated Wisut Hantanong’s story.