2024-02-29 20:09:43 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, gcc, boost, eigen, libxml2, mpi, python3, petsc, pkg-config }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "precice";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "3.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "precice";
|
|
|
|
repo = pname;
|
2020-06-02 18:00:15 +00:00
|
|
|
rev = "v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-RuZ18BFdusMHC+Yuapc2N8cEetLu32e28J34HH+gHOg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/precice/precice/commit/9dffe04144ab0f6a92fbff9be91cda71718b9c8e.patch";
|
|
|
|
hash = "sha256-kSvIfBQH1mBA5CFJo9Usiypol0u9VgHMlUEHK/uHVNQ=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
cmakeFlags = [
|
2020-06-02 18:00:15 +00:00
|
|
|
"-DPRECICE_PETScMapping=OFF"
|
2020-04-24 23:36:52 +00:00
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
"-DPYTHON_LIBRARIES=${python3.libPrefix}"
|
2020-11-30 08:33:03 +00:00
|
|
|
"-DPYTHON_INCLUDE_DIR=${python3}/include/${python3.libPrefix}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString (
|
|
|
|
lib.optionals stdenv.isDarwin [ "-D_GNU_SOURCE" ]
|
|
|
|
# libxml2-2.12 changed const qualifiers
|
|
|
|
++ [ "-fpermissive" ]
|
|
|
|
);
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [ cmake gcc pkg-config python3 python3.pkgs.numpy ];
|
|
|
|
buildInputs = [ boost eigen libxml2 mpi petsc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "preCICE stands for Precise Code Interaction Coupling Environment";
|
2022-01-03 16:56:52 +00:00
|
|
|
homepage = "https://precice.org/";
|
2022-05-18 14:49:53 +00:00
|
|
|
license = with lib.licenses; [ gpl3 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with lib.maintainers; [ Scriptkiddi ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "binprecice";
|
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|