summaryrefslogtreecommitdiff
path: root/shell.nix
blob: c034dde52bbf234b56fdcd8d3afa47acc7712cb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ghc}:

with import <nixpkgs> {};

let
  gfortranlibdir = "${gfortran7.cc.lib}";
  # XXX Workaround https://ghc.haskell.org/trac/ghc/ticket/11042.
  libHack = if stdenv.isDarwin then {
      DYLD_LIBRARY_PATH = [gfortranlibdir];
    } else {
      LD_LIBRARY_PATH = [gfortranlibdir];
    };
in
haskell.lib.buildStackProject ({
  name = "haskell-sundials";
  buildInputs = [blas liblapack sundials zlib];
  inherit ghc;
  # XXX Workaround https://ghc.haskell.org/trac/ghc/ticket/11042.
  extraArgs = ["--extra-lib-dirs=${gfortranlibdir}"];
} // libHack)