mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
Merge pull request #331864 from emilazy/push-posunwslrptx
febio: 3.6 -> 4.7; febio-studio: 1.6.1 -> 2.7
This commit is contained in:
commit
57b45852e3
@ -1,62 +0,0 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, zlib, libglvnd, libGLU, wrapQtAppsHook
|
||||
, sshSupport ? true, openssl, libssh
|
||||
, tetgenSupport ? true, tetgen
|
||||
, ffmpegSupport ? true, ffmpeg_4
|
||||
, dicomSupport ? false, dcmtk
|
||||
, withModelRepo ? true
|
||||
, withCadFeatures ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "febio-studio";
|
||||
version = "1.6.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "febiosoftware";
|
||||
repo = "FEBioStudio";
|
||||
rev = "v${version}";
|
||||
sha256 = "0r6pg49i0q9idp7pjymj7mlxd63qjvmfvg0l7fmx87y1yd2hfw4h";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./febio-studio-cmake.patch # Fix Errors that appear with certain Cmake flags
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DQt_Ver=5"
|
||||
"-DNOT_FIRST=On"
|
||||
"-DOpenGL_GL_PREFERENCE=GLVND"
|
||||
]
|
||||
++ lib.optional sshSupport "-DUSE_SSH=On"
|
||||
++ lib.optional tetgenSupport "-DUSE_TETGEN=On"
|
||||
++ lib.optional ffmpegSupport "-DUSE_FFMPEG=On"
|
||||
++ lib.optional dicomSupport "-DUSE_DICOM=On"
|
||||
++ lib.optional withModelRepo "-DMODEL_REPO=On"
|
||||
++ lib.optional withCadFeatures "-DCAD_FEATURES=On"
|
||||
;
|
||||
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/
|
||||
cp -R bin $out/
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake wrapQtAppsHook ];
|
||||
buildInputs = [ zlib libglvnd libGLU openssl libssh ]
|
||||
++ lib.optional sshSupport openssl
|
||||
++ lib.optional tetgenSupport tetgen
|
||||
++ lib.optional ffmpegSupport ffmpeg_4
|
||||
++ lib.optional dicomSupport dcmtk
|
||||
;
|
||||
|
||||
meta = with lib; {
|
||||
description = "FEBio Suite Solver";
|
||||
mainProgram = "FEBioStudio";
|
||||
license = with licenses; [ mit ];
|
||||
homepage = "https://febio.org/";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ Scriptkiddi ];
|
||||
};
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
diff --git a/FEBioStudio/RepositoryPanel.cpp b/FEBioStudio/RepositoryPanel.cpp
|
||||
index 382db303..314cdc68 100644
|
||||
--- a/FEBioStudio/RepositoryPanel.cpp
|
||||
+++ b/FEBioStudio/RepositoryPanel.cpp
|
||||
@@ -1364,10 +1364,10 @@ void CRepositoryPanel::loadingPageProgress(qint64 bytesSent, qint64 bytesTotal)
|
||||
|
||||
#else
|
||||
|
||||
-CRepositoryPanel::CRepositoryPanel(CMainWindow* pwnd, QWidget* parent){}
|
||||
+CRepositoryPanel::CRepositoryPanel(CMainWindow* pwnd, QDockWidget* parent){}
|
||||
CRepositoryPanel::~CRepositoryPanel(){}
|
||||
void CRepositoryPanel::OpenLink(const QString& link) {}
|
||||
-// void CRepositoryPanel::Raise() {}
|
||||
+void CRepositoryPanel::Raise() {}
|
||||
void CRepositoryPanel::SetModelList(){}
|
||||
void CRepositoryPanel::ShowMessage(QString message) {}
|
||||
void CRepositoryPanel::ShowWelcomeMessage(QByteArray messages) {}
|
||||
@@ -1396,6 +1396,7 @@ void CRepositoryPanel::on_actionSearch_triggered() {}
|
||||
void CRepositoryPanel::on_actionClearSearch_triggered() {}
|
||||
void CRepositoryPanel::on_actionDeleteRemote_triggered() {}
|
||||
void CRepositoryPanel::on_actionModify_triggered() {}
|
||||
+void CRepositoryPanel::on_actionCopyPermalink_triggered() {}
|
||||
void CRepositoryPanel::on_treeWidget_itemSelectionChanged() {}
|
||||
void CRepositoryPanel::on_treeWidget_customContextMenuRequested(const QPoint &pos) {}
|
||||
void CRepositoryPanel::DownloadItem(CustomTreeWidgetItem *item) {}
|
||||
diff --git a/FEBioStudio/WzdUpload.cpp b/FEBioStudio/WzdUpload.cpp
|
||||
index 5ce74346..20062e06 100644
|
||||
--- a/FEBioStudio/WzdUpload.cpp
|
||||
+++ b/FEBioStudio/WzdUpload.cpp
|
||||
@@ -1183,7 +1183,7 @@ void CWzdUpload::on_saveJson_triggered()
|
||||
getProjectJson(&projectInfo);
|
||||
|
||||
QFile file(filedlg.selectedFiles()[0]);
|
||||
- file.open(QIODeviceBase::WriteOnly);
|
||||
+ file.open(QIODevice::WriteOnly);
|
||||
file.write(projectInfo);
|
||||
file.close();
|
||||
}
|
@ -27,6 +27,6 @@ stdenv.mkDerivation rec {
|
||||
mainProgram = "tetgen";
|
||||
homepage = "http://tetgen.org/";
|
||||
license = lib.licenses.agpl3Plus;
|
||||
platforms = lib.platforms.linux;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
14
pkgs/by-name/fe/febio-studio/cmake-install.patch
Normal file
14
pkgs/by-name/fe/febio-studio/cmake-install.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7ad2c68eb2..0e3e978bd9 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -449,6 +449,9 @@
|
||||
set_property(TARGET ${FBS_BIN_NAME} PROPERTY AUTOGEN_BUILD_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/AutoGen/FEBioStudio_autogen)
|
||||
endif()
|
||||
|
||||
+include(GNUInstallDirs)
|
||||
+install(TARGETS ${FBS_BIN_NAME} BUNDLE DESTINATION Applications)
|
||||
+
|
||||
macro(addLib name)
|
||||
add_library(${name} ${HDR_${name}} ${SRC_${name}})
|
||||
set_property(TARGET ${name} PROPERTY AUTOGEN_BUILD_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/AutoGen/${name}_autogen)
|
89
pkgs/by-name/fe/febio-studio/package.nix
Normal file
89
pkgs/by-name/fe/febio-studio/package.nix
Normal file
@ -0,0 +1,89 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
overrideSDK,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
ninja,
|
||||
zlib,
|
||||
libGLU,
|
||||
qt6Packages,
|
||||
febio,
|
||||
glew,
|
||||
sshSupport ? true,
|
||||
openssl,
|
||||
libssh,
|
||||
tetgenSupport ? true,
|
||||
tetgen,
|
||||
ffmpegSupport ? true,
|
||||
ffmpeg_7,
|
||||
dicomSupport ? false,
|
||||
dcmtk,
|
||||
withModelRepo ? true,
|
||||
withCadFeatures ? false,
|
||||
}:
|
||||
|
||||
let
|
||||
stdenv' =
|
||||
if stdenv.isDarwin then
|
||||
overrideSDK stdenv {
|
||||
darwinSdkVersion = "11.0";
|
||||
darwinMinVersion = "10.15";
|
||||
}
|
||||
else
|
||||
stdenv;
|
||||
in
|
||||
|
||||
stdenv'.mkDerivation (finalAttrs: {
|
||||
pname = "febio-studio";
|
||||
version = "2.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "febiosoftware";
|
||||
repo = "FEBioStudio";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-ggIzz6bvNjqlI8s31EVnbM0TOspBSc9/myKpWukS3MU=";
|
||||
};
|
||||
|
||||
patches = [ ./cmake-install.patch ];
|
||||
|
||||
cmakeFlags =
|
||||
[ (lib.cmakeFeature "Qt_Root" "${qt6Packages.qtbase}") ]
|
||||
++ lib.optional sshSupport "-DUSE_SSH=On"
|
||||
++ lib.optional tetgenSupport "-DUSE_TETGEN=On"
|
||||
++ lib.optional ffmpegSupport "-DUSE_FFMPEG=On"
|
||||
++ lib.optional dicomSupport "-DUSE_DICOM=On"
|
||||
++ lib.optional withModelRepo "-DMODEL_REPO=On"
|
||||
++ lib.optional withCadFeatures "-DCAD_FEATURES=On";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
qt6Packages.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
zlib
|
||||
libGLU
|
||||
glew
|
||||
qt6Packages.qtbase
|
||||
febio
|
||||
]
|
||||
++ lib.optionals sshSupport [
|
||||
openssl
|
||||
libssh
|
||||
]
|
||||
++ lib.optional tetgenSupport tetgen
|
||||
++ lib.optional ffmpegSupport ffmpeg_7
|
||||
++ lib.optional dicomSupport dcmtk;
|
||||
|
||||
meta = {
|
||||
description = "FEBio Suite Solver";
|
||||
mainProgram = "FEBioStudio";
|
||||
license = with lib.licenses; [ mit ];
|
||||
homepage = "https://febio.org/";
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ Scriptkiddi ];
|
||||
};
|
||||
})
|
71
pkgs/by-name/fe/febio/fix-cmake.patch
Normal file
71
pkgs/by-name/fe/febio/fix-cmake.patch
Normal file
@ -0,0 +1,71 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c1bc953edf..f6aaf92fb5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -2,6 +2,7 @@
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
mark_as_advanced(FORCE CMAKE_INSTALL_PREFIX)
|
||||
+include(GNUInstallDirs)
|
||||
|
||||
project(FEBio)
|
||||
set(FEBIO_LIBS FEBioFluid FEBioLib FEBioMech FEBioMix FEBioOpt FECore NumCore FEAMR FEBioRVE FEImgLib)
|
||||
@@ -51,7 +52,7 @@
|
||||
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()
|
||||
|
||||
@@ -154,7 +155,7 @@
|
||||
##### Find Source Files #####
|
||||
|
||||
macro(findHdrSrc name)
|
||||
- file(GLOB HDR_${name} "${name}/*.h")
|
||||
+ file(GLOB HDR_${name} "${name}/*.h" "${name}/*.hpp")
|
||||
file(GLOB SRC_${name} "${name}/*.cpp")
|
||||
endmacro()
|
||||
|
||||
@@ -171,8 +172,9 @@
|
||||
|
||||
macro(addLib name TYPE)
|
||||
string(TOLOWER ${name} lname)
|
||||
- add_library(${lname} ${TYPE} ${HDR_${name}} ${SRC_${name}})
|
||||
+ add_library(${lname} ${TYPE} ${SRC_${name}})
|
||||
set_property(TARGET ${lname} PROPERTY AUTOGEN_BUILD_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/AutoGen/${name}_autogen)
|
||||
+ target_sources(${lname} PUBLIC FILE_SET HEADERS TYPE HEADERS FILES ${HDR_${name}})
|
||||
|
||||
if(NOT WIN32)
|
||||
set_property(TARGET ${lname} PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
@@ -181,6 +183,8 @@
|
||||
if(APPLE)
|
||||
target_link_libraries(${lname} PRIVATE "-undefined dynamic_lookup")
|
||||
endif()
|
||||
+
|
||||
+ install(TARGETS ${lname} FILE_SET HEADERS)
|
||||
endmacro()
|
||||
|
||||
foreach(name IN LISTS FEBIO_LIBS)
|
||||
@@ -194,6 +198,7 @@
|
||||
##### Set up executable compilation #####
|
||||
file(GLOB SOURCES "FEBio/*.cpp")
|
||||
add_executable (febio4 ${SOURCES})
|
||||
+install(TARGETS febio4)
|
||||
|
||||
if(WIN32)
|
||||
target_compile_options(febio4 PRIVATE /openmp)
|
||||
@@ -269,7 +274,6 @@
|
||||
mark_as_advanced(EXTRA_INC)
|
||||
|
||||
##### Setup includes, defnitions, and linking options #####
|
||||
-include_directories(${PROJECT_SOURCE_DIR})
|
||||
|
||||
# Link LEVMAR
|
||||
if(USE_LEVMAR)
|
||||
@@ -438,3 +442,4 @@
|
||||
file(WRITE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/febio.xml "${filedata}")
|
||||
endif()
|
||||
|
||||
+install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/febio.xml TYPE BIN)
|
72
pkgs/by-name/fe/febio/package.nix
Normal file
72
pkgs/by-name/fe/febio/package.nix
Normal file
@ -0,0 +1,72 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
overrideSDK,
|
||||
fetchFromGitHub,
|
||||
fetchpatch2,
|
||||
substituteAll,
|
||||
cmake,
|
||||
ninja,
|
||||
zlib,
|
||||
darwin,
|
||||
mklSupport ? true,
|
||||
mkl,
|
||||
}:
|
||||
|
||||
let
|
||||
stdenv' = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv;
|
||||
in
|
||||
|
||||
stdenv'.mkDerivation (finalAttrs: {
|
||||
pname = "FEBio";
|
||||
version = "4.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "febiosoftware";
|
||||
repo = "FEBio";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-RRdIOyXg4jYW76ABfJdMfVtCYMLYFdvyOI98nHXCof8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix library searching and installation
|
||||
(substituteAll {
|
||||
src = ./fix-cmake.patch;
|
||||
so = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||
})
|
||||
|
||||
# Fixed missing header include for strcpy
|
||||
# https://github.com/febiosoftware/FEBio/pull/92
|
||||
(fetchpatch2 {
|
||||
url = "https://github.com/febiosoftware/FEBio/commit/ad9e80e2aa8737828855458a703822f578db2fd3.patch?full_index=1";
|
||||
hash = "sha256-/uLnJB/oAwLQnsZtJnUlaAEpyZVLG6o2riRwwMCH8rI=";
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags = lib.optionals mklSupport [
|
||||
(lib.cmakeBool "USE_MKL" true)
|
||||
(lib.cmakeFeature "MKLROOT" "${mkl}")
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[ zlib ]
|
||||
++ lib.optionals mklSupport [ mkl ]
|
||||
++ lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.CoreGraphics
|
||||
darwin.apple_sdk.frameworks.CoreVideo
|
||||
darwin.apple_sdk.frameworks.Accelerate
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "FEBio Suite Solver";
|
||||
license = with lib.licenses; [ mit ];
|
||||
homepage = "https://febio.org/";
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ Scriptkiddi ];
|
||||
};
|
||||
})
|
@ -1,61 +0,0 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, boost, eigen, libxml2, mpi, python3
|
||||
, mklSupport ? true, mkl
|
||||
, substituteAll
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "FEBio";
|
||||
version = "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "febiosoftware";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "187s4lyzr806xla3smq3lsvj3f6wxlhfkban89w0fnyfmfb8w9am";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./fix-cmake.patch; # cannot find mkl libraries without this
|
||||
so = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags = lib.optional mklSupport "-DUSE_MKL=On"
|
||||
++ lib.optional mklSupport "-DMKLROOT=${mkl}"
|
||||
;
|
||||
|
||||
env.CXXFLAGS = lib.optionalString stdenv.isLinux "-include cstring";
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
--- 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")
|
@ -20113,8 +20113,6 @@ with pkgs;
|
||||
|
||||
fcl = callPackage ../development/libraries/fcl { };
|
||||
|
||||
febio = callPackage ../development/libraries/febio { };
|
||||
|
||||
ffcast = callPackage ../tools/X11/ffcast { };
|
||||
|
||||
fflas-ffpack = callPackage ../development/libraries/fflas-ffpack { };
|
||||
@ -37016,8 +37014,6 @@ with pkgs;
|
||||
|
||||
fastp = callPackage ../applications/science/biology/fastp { };
|
||||
|
||||
febio-studio = libsForQt5.callPackage ../applications/science/biology/febio-studio { };
|
||||
|
||||
flywheel-cli = callPackage ../applications/science/biology/flywheel-cli { };
|
||||
|
||||
hh-suite = callPackage ../applications/science/biology/hh-suite {
|
||||
|
Loading…
Reference in New Issue
Block a user