2010-08-02 12:20:39 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, gfortran
|
2020-03-31 15:47:18 +01:00
|
|
|
, blas
|
|
|
|
, lapack
|
2020-09-21 11:21:13 +01:00
|
|
|
, which
|
2010-08-02 12:20:39 +01:00
|
|
|
}:
|
2020-09-22 22:20:47 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "qrupdate";
|
|
|
|
version = "1.1.2";
|
2010-08-02 12:20:39 +01:00
|
|
|
src = fetchurl {
|
2020-09-22 22:20:47 +01:00
|
|
|
url = "mirror://sourceforge/qrupdate/${pname}-${version}.tar.gz";
|
2015-06-07 19:44:24 +01:00
|
|
|
sha256 = "024f601685phcm1pg8lhif3lpy5j9j0k6n0r46743g4fvh8wg8g2";
|
2010-08-02 12:20:39 +01:00
|
|
|
};
|
2015-06-07 19:44:24 +01:00
|
|
|
|
2020-09-22 22:20:47 +01:00
|
|
|
preBuild =
|
|
|
|
# Check that blas and lapack are compatible
|
|
|
|
assert (blas.isILP64 == lapack.isILP64);
|
|
|
|
# We don't have structuredAttrs yet implemented, and we need to use space
|
|
|
|
# seprated values in makeFlags, so only this works.
|
|
|
|
''
|
|
|
|
makeFlagsArray+=(
|
|
|
|
"LAPACK=-L${lapack}/lib -llapack"
|
|
|
|
"BLAS=-L${blas}/lib -lblas"
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
${stdenv.lib.optionalString blas.isILP64
|
|
|
|
# Use their FFLAGS along with `-fdefault-integer-8`. If another
|
|
|
|
# application intends to use arpack, it should add this to it's FFLAGS as
|
|
|
|
# well. Otherwise (e.g): https://savannah.gnu.org/bugs/?50339
|
|
|
|
"FFLAGS=-fimplicit-none -O3 -funroll-loops -fdefault-integer-8"
|
|
|
|
}
|
|
|
|
)
|
|
|
|
'';
|
2012-02-22 22:41:44 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkTarget = "test";
|
|
|
|
|
2015-06-07 19:44:24 +01:00
|
|
|
buildFlags = [ "lib" "solib" ];
|
|
|
|
|
2019-11-04 12:33:53 +00:00
|
|
|
installTargets = stdenv.lib.optionals stdenv.isDarwin [ "install-staticlib" "install-shlib" ];
|
2012-02-22 22:41:44 +00:00
|
|
|
|
2020-09-22 22:20:47 +01:00
|
|
|
buildInputs = [ gfortran ];
|
2016-08-02 17:06:29 +01:00
|
|
|
|
2020-09-21 11:21:13 +01:00
|
|
|
nativeBuildInputs = [ which ];
|
|
|
|
|
2018-10-27 13:59:39 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Library for fast updating of qr and cholesky decompositions";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://sourceforge.net/projects/qrupdate/";
|
2020-09-22 22:20:47 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2020-09-21 11:24:04 +01:00
|
|
|
maintainers = with maintainers; [ doronbehar ];
|
2018-10-27 13:59:39 +01:00
|
|
|
platforms = platforms.unix;
|
2016-08-02 17:06:29 +01:00
|
|
|
};
|
2010-08-02 12:20:39 +01:00
|
|
|
}
|