Created
November 23, 2018 11:02
-
-
Save alpmestan/9411fefaf7ef6491339f9a9cd14f0289 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} | |
, compiler ? "ghc822" | |
}: | |
with pkgs; | |
let | |
ghc = haskell.packages.${compiler}.ghcWithPackages (ps: with ps; [ cabal-install ]); | |
in | |
stdenv.mkDerivation { | |
name = "cabal-env"; | |
buildInputs = [ ghc zlib ]; | |
shellHook = '' | |
eval $(grep export ${ghc}/bin/ghc) | |
export LD_LIBRARY_PATH="${zlib}/lib:$LD_LIBRARY_PATH"; | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment