summaryrefslogtreecommitdiff
path: root/shell.nix
diff options
context:
space:
mode:
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/shell.nix b/shell.nix
new file mode 100644
index 0000000..c034dde
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,20 @@
1{ghc}:
2
3with import <nixpkgs> {};
4
5let
6 gfortranlibdir = "${gfortran7.cc.lib}";
7 # XXX Workaround https://ghc.haskell.org/trac/ghc/ticket/11042.
8 libHack = if stdenv.isDarwin then {
9 DYLD_LIBRARY_PATH = [gfortranlibdir];
10 } else {
11 LD_LIBRARY_PATH = [gfortranlibdir];
12 };
13in
14haskell.lib.buildStackProject ({
15 name = "haskell-sundials";
16 buildInputs = [blas liblapack sundials zlib];
17 inherit ghc;
18 # XXX Workaround https://ghc.haskell.org/trac/ghc/ticket/11042.
19 extraArgs = ["--extra-lib-dirs=${gfortranlibdir}"];
20} // libHack)