2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv
|
2021-02-05 17:12:51 +00:00
|
|
|
, lib
|
2023-03-08 16:32:21 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
2020-04-24 23:36:52 +00:00
|
|
|
, lapack
|
2020-11-06 00:33:48 +00:00
|
|
|
, which
|
2023-10-09 19:29:22 +00:00
|
|
|
, gfortran
|
|
|
|
, blas
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
2020-11-06 00:33:48 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-11-06 00:33:48 +00:00
|
|
|
pname = "qrupdate";
|
2023-03-08 16:32:21 +00:00
|
|
|
version = "1.1.5";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mpimd-csc";
|
|
|
|
repo = "qrupdate-ng";
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2023-03-08 16:32:21 +00:00
|
|
|
hash = "sha256-dHxLPrN00wwozagY2JyfZkD3sKUD2+BcnbjNgZepzFg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
cmakeFlags = assert (blas.isILP64 == lapack.isILP64); [
|
|
|
|
"-DCMAKE_Fortran_FLAGS=${toString ([
|
|
|
|
"-std=legacy"
|
|
|
|
] ++ lib.optionals blas.isILP64 [
|
|
|
|
# If another application intends to use qrupdate compiled with blas with
|
|
|
|
# 64 bit support, it should add this to it's FFLAGS as well. See (e.g):
|
|
|
|
# https://savannah.gnu.org/bugs/?50339
|
|
|
|
"-fdefault-integer-8"
|
|
|
|
])}"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
# https://github.com/mpimd-csc/qrupdate-ng/issues/4
|
2024-09-26 11:04:55 +00:00
|
|
|
patches = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
|
2024-07-27 06:49:29 +00:00
|
|
|
./disable-zch1dn-test.patch
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
which
|
|
|
|
gfortran
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
blas
|
|
|
|
lapack
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Library for fast updating of qr and cholesky decompositions";
|
2023-03-08 16:32:21 +00:00
|
|
|
homepage = "https://github.com/mpimd-csc/qrupdate-ng";
|
2020-11-06 00:33:48 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ doronbehar ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2023-10-09 19:29:22 +00:00
|
|
|
})
|