2023-03-15 09:49:59 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, gfortran
|
|
|
|
, blas
|
|
|
|
, lapack
|
|
|
|
, mctc-lib
|
|
|
|
, mstore
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert !blas.isILP64 && !lapack.isILP64;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "multicharge";
|
|
|
|
version = "0.2.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "grimme-lab";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-oUI5x5/Gd0EZBb1w+0jlJUF9X51FnkHFu8H7KctqXl0=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake gfortran ];
|
|
|
|
|
|
|
|
buildInputs = [ blas lapack mctc-lib mstore ];
|
|
|
|
|
2024-01-11 16:28:55 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
# Fix the Pkg-Config files for doubled store paths
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace config/template.pc \
|
|
|
|
--replace "\''${prefix}/" ""
|
2023-03-15 09:49:59 +00:00
|
|
|
'';
|
|
|
|
|
2024-01-11 16:28:55 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
|
|
|
];
|
|
|
|
|
2023-03-15 09:49:59 +00:00
|
|
|
doCheck = true;
|
|
|
|
preCheck = ''
|
|
|
|
export OMP_NUM_THREADS=2
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Electronegativity equilibration model for atomic partial charges";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "multicharge";
|
2023-03-15 09:49:59 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = "https://github.com/grimme-lab/multicharge";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.sheepforce ];
|
|
|
|
};
|
|
|
|
}
|