diff --git a/pkgs/by-name/pr/precice/package.nix b/pkgs/by-name/pr/precice/package.nix index ac12dbdd38e6..4d4cea292f5d 100644 --- a/pkgs/by-name/pr/precice/package.nix +++ b/pkgs/by-name/pr/precice/package.nix @@ -3,29 +3,32 @@ stdenv, fetchFromGitHub, cmake, + pkg-config, boost, eigen, libxml2, mpi, python3Packages, petsc, - pkg-config, + ctestCheckHook, + mpiCheckPhaseHook, }: -stdenv.mkDerivation { +assert petsc.mpiSupport; + +stdenv.mkDerivation (finalAttrs: { pname = "precice"; - version = "3.2.0-unstable-2025-05-23"; + version = "3.3.0"; src = fetchFromGitHub { owner = "precice"; repo = "precice"; - rev = "6ee3e347843d4d3c416a32917f6505d35b822445"; - hash = "sha256-BxNAbpeLqJPzQ9dvvgC9jJQQFBdVMunSqIekz7SIHv4="; + tag = "v${finalAttrs.version}"; + hash = "sha256-1FbTNo2F+jH1EVV6gXc9o0T31UHY/wBK3vQeCV7wW5E="; }; cmakeFlags = [ - (lib.cmakeBool "PRECICE_PETScMapping" false) - (lib.cmakeBool "BUILD_SHARED_LIBS" true) + (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) ]; nativeBuildInputs = [ @@ -43,12 +46,26 @@ stdenv.mkDerivation { python3Packages.numpy ]; + __darwinAllowLocalNetworking = true; + + doCheck = true; + + nativeCheckInputs = [ + ctestCheckHook + mpiCheckPhaseHook + ]; + + disabledTests = [ + # Because preciceDt becomes very small. Test is likely to fail on other platform. + "precice.Integration/Serial/Time/Explicit/ParallelCoupling/ReadWriteScalarDataWithSubcycling6400Steps" + ]; + meta = { description = "PreCICE stands for Precise Code Interaction Coupling Environment"; homepage = "https://precice.org/"; - license = with lib.licenses; [ gpl3 ]; + license = with lib.licenses; [ lgpl3Only ]; maintainers = with lib.maintainers; [ Scriptkiddi ]; - mainProgram = "binprecice"; + mainProgram = "precice-tools"; platforms = lib.platforms.unix; }; -} +})