summary refs log tree commit diff
path: root/pkgs/development/libraries/science/math/arpack/default.nix
blob: c9f9bcfa9a752081529cfd8845ed5a9b3aefed4d (plain) (blame)
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
27
28
29
30
31
32
33
34
35
36
37
{ stdenv, lib, copyPathsToStore, fetchurl, autoconf, automake, gettext, libtool
, gfortran, openblas }:

with stdenv.lib;

let
  version = "3.3.0";
in
stdenv.mkDerivation {
  name = "arpack-${version}";

  src = fetchurl {
    url = "https://github.com/opencollab/arpack-ng/archive/${version}.tar.gz";
    sha256 = "1cz53wqzcf6czmcpfb3vb61xi0rn5bwhinczl65hpmbrglg82ndd";
  };

  nativeBuildInputs = [ autoconf automake gettext libtool ];
  buildInputs = [ gfortran openblas ];

  BLAS_LIBS = "-L${openblas}/lib -lopenblas";

  FFLAGS = optional openblas.blas64 "-fdefault-integer-8";

  preConfigure = ''
    ./bootstrap
  '';

  meta = {
    homepage = "http://github.com/opencollab/arpack-ng";
    description = ''
      A collection of Fortran77 subroutines to solve large scale eigenvalue
      problems.
    '';
    license = stdenv.lib.licenses.bsd3;
    maintainers = [ stdenv.lib.maintainers.ttuegel ];
  };
}