2024-07-08 15:07:24 +05:00
|
|
|
{
|
2024-07-18 15:49:05 +05:00
|
|
|
bonLib,
|
2024-07-08 15:07:24 +05:00
|
|
|
stdenv,
|
|
|
|
pkgs,
|
2024-07-24 13:34:38 +05:00
|
|
|
version ? "6.2.2404",
|
|
|
|
sha256 ? "sha256-SZPZT49BqUzssPcOo/5yAkjqAHDErC86xCUFL88Iew4=",
|
2024-07-08 15:07:24 +05:00
|
|
|
...
|
2024-07-24 13:34:38 +05:00
|
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "netgen";
|
|
|
|
inherit version;
|
2023-12-19 12:36:54 +05:00
|
|
|
|
2024-07-24 13:34:38 +05:00
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "NGSolve";
|
|
|
|
repo = "netgen";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = sha256;
|
|
|
|
};
|
2023-12-19 12:36:54 +05:00
|
|
|
|
2024-07-24 13:34:38 +05:00
|
|
|
patches = [
|
|
|
|
./regex-version.patch
|
|
|
|
];
|
2023-12-19 12:36:54 +05:00
|
|
|
|
2024-07-24 13:34:38 +05:00
|
|
|
cmakeFlags = [
|
|
|
|
"-G Ninja"
|
|
|
|
"-D CMAKE_BUILD_TYPE=Release"
|
|
|
|
"-D USE_NATIVE_ARCH:BOOL=OFF"
|
|
|
|
"-D USE_OCC:BOOL=ON"
|
|
|
|
"-D USE_PYTHON:BOOL=ON"
|
|
|
|
"-D USE_GUI:BOOL=ON"
|
|
|
|
"-D USE_MPI:BOOL=ON"
|
|
|
|
"-D USE_SUPERBUILD:BOOL=OFF"
|
|
|
|
"-D PREFER_SYSTEM_PYBIND11:BOOL=ON"
|
|
|
|
];
|
2023-12-19 12:36:54 +05:00
|
|
|
|
2024-07-24 13:34:38 +05:00
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
cmake
|
|
|
|
ninja
|
|
|
|
git
|
|
|
|
(python3.withPackages (ps:
|
|
|
|
with ps; [
|
|
|
|
pybind11
|
|
|
|
mpi4py
|
|
|
|
]))
|
|
|
|
];
|
2023-12-19 12:36:54 +05:00
|
|
|
|
2024-07-24 13:34:38 +05:00
|
|
|
buildInputs = with pkgs; [
|
|
|
|
zlib
|
|
|
|
tcl
|
|
|
|
tk
|
|
|
|
mpi
|
|
|
|
opencascade-occt
|
|
|
|
libGL
|
|
|
|
libGLU
|
|
|
|
xorg.libXmu
|
|
|
|
metis
|
|
|
|
];
|
2023-12-19 12:36:54 +05:00
|
|
|
|
2024-07-24 13:34:38 +05:00
|
|
|
passthru = {
|
|
|
|
shellHook = with pkgs; ''
|
|
|
|
export PYTHONPATH="${python3}/${python3.sitePackages}"
|
|
|
|
export PYTHONPATH="$PYTHONPATH:${pkg}/${python3.sitePackages}"
|
|
|
|
'';
|
|
|
|
};
|
2024-04-20 01:33:40 +05:00
|
|
|
|
2024-07-24 13:34:38 +05:00
|
|
|
meta = with pkgs.lib; {
|
|
|
|
homepage = "https://github.com/NGSolve/netgen";
|
|
|
|
description = "NETGEN is an automatic 3d tetrahedral mesh generator";
|
|
|
|
license = licenses.lgpl21Only;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with bonLib.maintainers; [L-Nafaryus];
|
|
|
|
broken = false;
|
2024-07-08 15:07:24 +05:00
|
|
|
};
|
2024-07-24 13:34:38 +05:00
|
|
|
}
|