2019-03-05 16:17:03 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake
|
|
|
|
, gfortran, openblas, eigen }:
|
2015-06-04 13:17:30 +01:00
|
|
|
|
|
|
|
with stdenv.lib;
|
2013-12-27 20:14:42 +00:00
|
|
|
|
2014-12-15 17:28:20 +00:00
|
|
|
let
|
2019-03-05 16:17:03 +00:00
|
|
|
version = "3.7.0";
|
2013-12-27 20:14:42 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "arpack";
|
|
|
|
inherit version;
|
2015-12-22 20:21:34 +00:00
|
|
|
|
2019-03-05 16:17:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "opencollab";
|
|
|
|
repo = "arpack-ng";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1x7a1dj3dg43nlpvjlh8jzzbadjyr3mbias6f0256qkmgdyk4izr";
|
2013-12-27 20:14:42 +00:00
|
|
|
};
|
|
|
|
|
2019-03-05 16:17:03 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ gfortran openblas eigen ];
|
2014-03-02 00:46:53 +00:00
|
|
|
|
2018-01-22 23:36:43 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2015-12-28 17:44:03 +00:00
|
|
|
BLAS_LIBS = "-L${openblas}/lib -lopenblas";
|
2015-06-04 13:17:30 +01:00
|
|
|
|
2019-03-05 16:17:03 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
"-DINTERFACE64=${optionalString openblas.blas64 "1"}"
|
|
|
|
];
|
2018-01-22 23:36:43 +00:00
|
|
|
|
2019-04-02 16:13:18 +01:00
|
|
|
preCheck = if stdenv.isDarwin then ''
|
2020-01-02 00:29:34 +00:00
|
|
|
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}`pwd`/lib
|
2019-04-02 16:13:18 +01:00
|
|
|
'' else ''
|
2020-01-02 00:29:34 +00:00
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}`pwd`/lib
|
2019-04-02 16:13:18 +01:00
|
|
|
'' + ''
|
2019-03-05 16:17:03 +00:00
|
|
|
# Prevent tests from using all cores
|
|
|
|
export OMP_NUM_THREADS=2
|
2015-12-28 17:44:03 +00:00
|
|
|
'';
|
|
|
|
|
2019-03-05 16:17:03 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/lib/pkgconfig
|
|
|
|
cp arpack.pc $out/lib/pkgconfig/
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
2013-12-27 20:14:42 +00:00
|
|
|
meta = {
|
2017-08-02 22:50:51 +01:00
|
|
|
homepage = https://github.com/opencollab/arpack-ng;
|
2014-12-15 17:28:57 +00:00
|
|
|
description = ''
|
|
|
|
A collection of Fortran77 subroutines to solve large scale eigenvalue
|
2015-09-16 17:08:39 +01:00
|
|
|
problems.
|
2014-12-15 17:28:57 +00:00
|
|
|
'';
|
2013-12-27 20:14:42 +00:00
|
|
|
license = stdenv.lib.licenses.bsd3;
|
2014-03-07 17:20:18 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.ttuegel ];
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2013-12-27 20:14:42 +00:00
|
|
|
};
|
|
|
|
}
|