nixpkgs/pkgs/development/libraries/science/math/arpack/default.nix

56 lines
1.3 KiB
Nix
Raw Normal View History

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