summaryrefslogtreecommitdiff
path: root/shell.nix
blob: 42bbe08e5eb19e94614f7f41c150de9a21349704 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ nixpkgs ? import <nixpkgs> {} }:
let p = nixpkgs; in

  let
  myStack = p.writeShellScriptBin "stack" ''
    exec ${p.stack}/bin/stack --no-nix --no-docker --system-ghc $STACK_IN_NIX_EXTRA_ARGS "$@"
  '';
in
p.haskell.lib.buildStackProject {
  name = "hmatrix";

  buildInputs = [
    p.zlib
    p.sundials
    p.blas
    p.gfortran.cc
    p.liblapack
    p.gsl
    p.glpk
    p.pkgconfig
    p.stack
    p.sundials
    myStack
  ] ++ (if p.stdenv.isDarwin then [p.darwin.apple_sdk.frameworks.Accelerate] else [])
    ++ (if p.stdenv.isDarwin then [p.darwin.apple_sdk.frameworks.Cocoa] else []);
}