cpcm-x: init at 1.1.0
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
diff --git a/config/config.cmake.in b/config/config.cmake.in
|
||||
index e5e4f6b..d41c070 100644
|
||||
--- a/config/config.cmake.in
|
||||
+++ b/config/config.cmake.in
|
||||
@@ -23,6 +23,10 @@ if(NOT TARGET "@PROJECT_NAME@::@PROJECT_NAME@")
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
+ if(NOT TARGET "numsa::numsa")
|
||||
+ find_dependency("numsa" REQUIRED)
|
||||
+ endif()
|
||||
+
|
||||
if(NOT TARGET "mctc-lib::mctc-lib")
|
||||
find_dependency("mctc-lib" REQUIRED)
|
||||
endif()
|
||||
@@ -0,0 +1,107 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
|
||||
buildType ? "meson",
|
||||
|
||||
gfortran,
|
||||
pkg-config,
|
||||
python3,
|
||||
meson,
|
||||
ninja,
|
||||
cmake,
|
||||
|
||||
# buildInputs
|
||||
blas,
|
||||
lapack,
|
||||
test-drive,
|
||||
|
||||
# propagatedBuildInputs
|
||||
mctc-lib,
|
||||
numsa,
|
||||
toml-f,
|
||||
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
assert (
|
||||
builtins.elem buildType [
|
||||
"meson"
|
||||
"cmake"
|
||||
]
|
||||
);
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "cpcm-x";
|
||||
version = "1.1.0";
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "grimme-lab";
|
||||
repo = "CPCM-X";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-FyPUECbcqUHoGq1LASvPF4qSUKQ5N/y1itq8e2wGliE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# The installed CMake package config links numsa::numsa transitively but
|
||||
# never re-discovers it, so consumers fail with "target numsa::numsa not
|
||||
# found". Add the missing find_dependency call.
|
||||
./cmake-config-find-numsa.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace config/install-mod.py \
|
||||
--replace-fail "/usr/bin/env python" "${lib.getExe python3}"
|
||||
'';
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
gfortran
|
||||
pkg-config
|
||||
python3
|
||||
]
|
||||
++ lib.optionals (buildType == "meson") [
|
||||
meson
|
||||
ninja
|
||||
]
|
||||
++ lib.optionals (buildType == "cmake") [
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
blas
|
||||
lapack
|
||||
# only needed to build the bundled test suite
|
||||
test-drive
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
mctc-lib
|
||||
numsa
|
||||
toml-f
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
preCheck = ''
|
||||
export OMP_NUM_THREADS=2
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "Extended conductor-like polarizable continuum solvation model";
|
||||
homepage = "https://github.com/grimme-lab/CPCM-X";
|
||||
changelog = "https://github.com/grimme-lab/CPCM-X/releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.lgpl3;
|
||||
maintainers = with lib.maintainers; [ GaetanLepage ];
|
||||
mainProgram = "cpx";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user