Skip to content

Instantly share code, notes, and snippets.

@adinapoli
Created July 25, 2014 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adinapoli/67b2689c460d24bd1667 to your computer and use it in GitHub Desktop.
Save adinapoli/67b2689c460d24bd1667 to your computer and use it in GitHub Desktop.
default.nix
let
pkgs = import <nixpkgs> {};
ghc = pkgs.ghc.ghc783;
myCabal = pkgs.haskellPackages.cabal.override {
extension = self : super : {
self.hyperlinkSource = false;
};
};
hsEnv = pkgs.haskellPackages.ghcWithPackages (hsPkgs : ([
myCabal
hsPkgs.happy_1_19_4
hsPkgs.alex_3_1_3
hsPkgs.cabalInstall_1_20_0_3
hsPkgs.hlint
]));
in pkgs.stdenv.mkDerivation rec {
name = "snap-compat";
buildInputs = with pkgs; [
binutils
git
autoconf
ack
libtool
automake
gmp
m4
openssh
coreutils
which
less
perl
python
ghc
hsEnv
];
shellHook = ''
export NIX_ENV=1
source /Users/adinapoli/bin/git-completion.bash
alias e=/usr/local/bin/emacs
alias vi=/usr/local/bin/vim
alias ghci-dev="./inplace/bin/ghc-stage2 --interactive"
alias ghc-dev=./inplace/bin/ghc-stage2
export PATH=$PATH:${builtins.getEnv "HOME"}/.cabal/bin
export PATH=$PATH:./.cabal-sandbox/bin
export PATH=$PATH:/Users/adinapoli/bin
# For libgmp.dylib
export DYLD_LIBRARY_PATH=/usr/local/Cellar/openssl/1.0.1f/lib/engines
'';
extraCmds = ''
export NIX_ENV=1
alias e=/usr/local/bin/emacs
export PATH=$PATH:${builtins.getEnv "HOME"}/.cabal/bin
export PATH=$PATH:./.cabal-sandbox/bin
$(grep export ${hsEnv.outPath}/bin/ghc)
'';
}
@Raahul-Kumar
Copy link

Does this currently work? I'm also interested in getting 7.8.3 running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment