2021-01-10 13:40:19 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, gcc, boost, eigen, libxml2, mpi, python3, petsc }:
|
2019-12-11 15:39:54 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "precice";
|
2021-01-22 20:52:54 +01:00
|
|
|
version = "2.2.0";
|
2019-12-11 15:39:54 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "precice";
|
|
|
|
repo = pname;
|
2020-05-14 14:20:09 +02:00
|
|
|
rev = "v${version}";
|
2021-01-22 20:52:54 +01:00
|
|
|
sha256 = "sha256-AQc+p/twsfkzwpWeznGpLLSqINKSrWCwH+PdNIrdYA8=";
|
2019-12-11 15:39:54 +01:00
|
|
|
};
|
|
|
|
|
2020-01-04 16:32:59 +01:00
|
|
|
cmakeFlags = [
|
2020-05-14 14:20:09 +02:00
|
|
|
"-DPRECICE_PETScMapping=OFF"
|
2020-01-04 16:32:59 +01:00
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
"-DPYTHON_LIBRARIES=${python3.libPrefix}"
|
2020-11-13 21:56:05 +01:00
|
|
|
"-DPYTHON_INCLUDE_DIR=${python3}/include/${python3.libPrefix}"
|
2020-01-04 16:32:59 +01:00
|
|
|
];
|
2019-12-11 15:39:54 +01:00
|
|
|
|
2020-09-29 23:26:30 +02:00
|
|
|
NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin [ "-D_GNU_SOURCE" ];
|
|
|
|
|
2019-12-11 15:39:54 +01:00
|
|
|
nativeBuildInputs = [ cmake gcc ];
|
2021-01-10 13:40:19 +01:00
|
|
|
buildInputs = [ boost eigen libxml2 mpi python3 python3.pkgs.numpy ];
|
2020-01-04 16:32:59 +01:00
|
|
|
|
2019-12-11 15:39:54 +01:00
|
|
|
meta = {
|
|
|
|
description = "preCICE stands for Precise Code Interaction Coupling Environment";
|
|
|
|
license = with lib.licenses; [ gpl3 ];
|
|
|
|
homepage = "https://www.precice.org/";
|
2020-09-29 23:26:30 +02:00
|
|
|
platforms = lib.platforms.unix;
|
2019-12-11 15:39:54 +01:00
|
|
|
maintainers = with lib.maintainers; [ Scriptkiddi ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-01-04 16:32:59 +01:00
|
|
|
|