mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
sofa: init at 24.12.00
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
This commit is contained in:
parent
5855ab0eb2
commit
e971bd884c
1 changed files with 85 additions and 0 deletions
85
pkgs/by-name/so/sofa/package.nix
Normal file
85
pkgs/by-name/so/sofa/package.nix
Normal file
|
@ -0,0 +1,85 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
|
||||
# propagatedNativeBuildInputs
|
||||
cmake,
|
||||
qt6Packages,
|
||||
|
||||
# propagatedBuildInputs
|
||||
boost,
|
||||
cxxopts,
|
||||
eigen,
|
||||
glew,
|
||||
gtest,
|
||||
libGL,
|
||||
metis,
|
||||
tinyxml-2,
|
||||
zlib,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "sofa";
|
||||
version = "24.12.00";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sofa-framework";
|
||||
repo = "sofa";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-LeFIM1RJjA2ynimjE8XngOQ8gR7BgqqTZBbDp0KXxs0=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Include missing header for setw / setfill.
|
||||
# ref. https://github.com/sofa-framework/sofa/pull/5279
|
||||
# This was merged upstream and can be removed in next version
|
||||
(fetchpatch {
|
||||
url = "https://github.com/sofa-framework/sofa/commit/700b6cdd94fe24a51b2a7014fb0fc83e6abe1fbc.patch";
|
||||
hash = "sha256-czc1u03USQt18d7cMPmXYguBhSb5JOJLplPvoixp+3w=";
|
||||
})
|
||||
];
|
||||
|
||||
propagatedNativeBuildInputs = [
|
||||
cmake
|
||||
qt6Packages.wrapQtAppsHook
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
boost
|
||||
cxxopts
|
||||
eigen
|
||||
glew
|
||||
gtest
|
||||
qt6Packages.libqglviewer
|
||||
qt6Packages.qtbase
|
||||
libGL
|
||||
metis
|
||||
tinyxml-2
|
||||
zlib
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "SOFA_ALLOW_FETCH_DEPENDENCIES" false)
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
install_name_tool -change \
|
||||
$out/lib/libSceneChecking.${finalAttrs.version}.dylib \
|
||||
$out/plugins/SceneChecking/lib/libSceneChecking.${finalAttrs.version}.dylib \
|
||||
$out/bin/.runSofa-${finalAttrs.version}-wrapped
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Real-time multi-physics simulation with an emphasis on medical simulation";
|
||||
homepage = "https://github.com/sofa-framework/sofa/";
|
||||
changelog = "https://github.com/sofa-framework/sofa/blob/v${finalAttrs.version}/CHANGELOG.md";
|
||||
license = lib.licenses.lgpl21Only;
|
||||
maintainers = with lib.maintainers; [ nim65s ];
|
||||
mainProgram = "runSofa";
|
||||
platforms = lib.platforms.unix ++ lib.platforms.windows;
|
||||
};
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue