diff options
author | Mathieu Boespflug <m@tweag.io> | 2018-03-25 12:19:41 +0200 |
---|---|---|
committer | Mathieu Boespflug <m@tweag.io> | 2018-03-25 12:19:41 +0200 |
commit | 72c116cb338b91ba59af048b0363cb8f113f8535 (patch) | |
tree | 9756e3ee6f6eea4f426190cfb95006c67596199e /shell.nix | |
parent | 4b8e066fd25c1e5eb5abfb0b75146a739d60d01f (diff) |
Unify the stack.yaml files at top-level.
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) | ||