Various ways to use GHC in nix-shell

Wisut Hantanong
Jul 29, 2017 · 1 min read

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.

Wisut Hantanong

Written by

wizzup.github.io

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade