febio: init at 3.5.1

This commit is contained in:
Scriptkiddi 2022-02-21 13:24:05 +01:00
parent e2762830b8
commit e1edefa157
No known key found for this signature in database
GPG key ID: F7FBBF6334AF4872
3 changed files with 83 additions and 0 deletions

View file

@ -0,0 +1,55 @@
{ lib, stdenv, fetchFromGitHub, cmake, boost, eigen, libxml2, mpi, python3
, mklSupport ? true, mkl
}:
stdenv.mkDerivation rec {
pname = "FEBio";
version = "3.6";
src = fetchFromGitHub {
owner = "febiosoftware";
repo = pname;
rev = "v${version}";
sha256 = "187s4lyzr806xla3smq3lsvj3f6wxlhfkban89w0fnyfmfb8w9am";
};
patches = [
./fix-cmake.patch # cannot find mkl libraries without this
];
cmakeFlags = lib.optional mklSupport "-DUSE_MKL=On"
++ lib.optional mklSupport "-DMKLROOT=${mkl}"
;
installPhase = ''
runHook preInstall
mkdir -p $out/include
cp -R lib bin $out/
cp -R ../FECore \
../FEBioFluid \
../FEBioLib \
../FEBioMech \
../FEBioMix \
../FEBioOpt \
../FEBioPlot \
../FEBioXML \
../NumCore \
$out/include
runHook postInstall
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ boost eigen libxml2 mpi python3 python3.pkgs.numpy ]
++ lib.optional mklSupport mkl
;
meta = {
description = "FEBio Suite Solver";
license = with lib.licenses; [ mit ];
homepage = "https://febio.org/";
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ Scriptkiddi ];
};
}

View file

@ -0,0 +1,26 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,7 +47,7 @@ function(findLib libName libDir libOut)
find_library(TEMP NAMES ${libName}.lib ${ARGV3}.lib ${ARGV4}.lib ${ARGV5}.lib ${ARGV6}.lib
PATHS ${${libDir}} NO_DEFAULT_PATH)
else()
- find_library(TEMP NAMES lib${libName}.a lib${ARGV3}.a lib${ARGV4}.a lib${ARGV5}.a lib${ARGV6}.a
+ find_library(TEMP NAMES lib${libName}.a lib${ARGV3}.a lib${ARGV4}.a lib${ARGV5}.a lib${ARGV6}.a lib${libName}.so lib${ARGV3}.so lib${ARGV4}.so lib${ARGV5}.so lib${ARGV6}.so
PATHS ${${libDir}} NO_DEFAULT_PATH)
endif()
diff --git a/FindDependencies.cmake b/FindDependencies.cmake
index 2d644005f..7261ba923 100644
--- a/FindDependencies.cmake
+++ b/FindDependencies.cmake
@@ -46,8 +46,8 @@ if(MKLROOT)
NO_DEFAULT_PATH)
find_library(MKL_OMP_LIB
- NAMES iomp5 iomp5md libiomp5md.lib
- PATHS ${MKLROOT}/../lib ${MKLROOT}/../compiler/lib
+ NAMES libiomp5.so libiomp5 iomp5 iomp5md libiomp5md.lib
+ PATHS ${MKLROOT}/lib ${MKLROOT}/../lib ${MKLROOT}/../compiler/lib
PATH_SUFFIXES "intel64" "intel32"
NO_DEFAULT_PATH
DOC "MKL OMP Library")

View file

@ -16523,6 +16523,8 @@ with pkgs;
fcl = callPackage ../development/libraries/fcl { };
febio = callPackage ../development/libraries/febio { };
ffcast = callPackage ../tools/X11/ffcast { };
fflas-ffpack = callPackage ../development/libraries/fflas-ffpack { };