summaryrefslogtreecommitdiff
path: root/shell.nix
diff options
context:
space:
mode:
authoridontgetoutmuch <dominic@steinitz.org>2018-03-26 00:15:39 -0700
committerGitHub <noreply@github.com>2018-03-26 00:15:39 -0700
commit560f38ab27bcc44c80ce7d9c2e4972342170fe28 (patch)
tree2aef5c26b5d19b6029078f27533515a679c8267e /shell.nix
parentf7ea5ed206af85cafec1e8bef824f0dd5a9f63fb (diff)
parent13fcfabce2edf2a276bb5ba1f47cdf8fdfd9958a (diff)
Merge pull request #1 from mboes/sundials
Cleanups to Sundials PR
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)