diff options
author | idontgetoutmuch <dominic@steinitz.org> | 2018-03-26 00:15:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-26 00:15:39 -0700 |
commit | 560f38ab27bcc44c80ce7d9c2e4972342170fe28 (patch) | |
tree | 2aef5c26b5d19b6029078f27533515a679c8267e /shell.nix | |
parent | f7ea5ed206af85cafec1e8bef824f0dd5a9f63fb (diff) | |
parent | 13fcfabce2edf2a276bb5ba1f47cdf8fdfd9958a (diff) |
Merge pull request #1 from mboes/sundials
Cleanups to Sundials PR
Diffstat (limited to 'shell.nix')
-rw-r--r-- | shell.nix | 20 |
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 | |||
3 | with import <nixpkgs> {}; | ||
4 | |||
5 | let | ||
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 | }; | ||
13 | in | ||
14 | haskell.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) | ||