[Backport release-24.11] {febio, febio-studio}: darwin sdk refactor; fix qt 6.8 build (#357439)

This commit is contained in:
Austin Horstman 2024-11-19 18:40:23 -06:00 committed by GitHub
commit 21006d313d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 25 deletions

View File

@ -1,7 +1,6 @@
{
lib,
stdenv,
overrideSDK,
fetchFromGitHub,
cmake,
ninja,
@ -10,6 +9,9 @@
qt6Packages,
febio,
glew,
apple-sdk_11,
darwinMinVersionHook,
fetchpatch,
sshSupport ? true,
openssl,
libssh,
@ -23,18 +25,7 @@
withCadFeatures ? false,
}:
let
stdenv' =
if stdenv.hostPlatform.isDarwin then
overrideSDK stdenv {
darwinSdkVersion = "11.0";
darwinMinVersion = "10.15";
}
else
stdenv;
in
stdenv'.mkDerivation (finalAttrs: {
stdenv.mkDerivation (finalAttrs: {
pname = "febio-studio";
version = "2.7";
@ -45,7 +36,14 @@ stdenv'.mkDerivation (finalAttrs: {
hash = "sha256-ggIzz6bvNjqlI8s31EVnbM0TOspBSc9/myKpWukS3MU=";
};
patches = [ ./cmake-install.patch ];
patches = [
./cmake-install.patch
# Fix qt 6.8 compile, can be removed after next release
(fetchpatch {
url = "https://github.com/febiosoftware/FEBioStudio/commit/15524d958a6f5ef81ccee58b4efa1ea25de91543.patch";
hash = "sha256-LRToK1/RQC+bLXgroDTQOV6H8pI+IZ38Y0nsl/Fz1WE=";
})
];
cmakeFlags =
[ (lib.cmakeFeature "Qt_Root" "${qt6Packages.qtbase}") ]
@ -76,7 +74,11 @@ stdenv'.mkDerivation (finalAttrs: {
]
++ lib.optional tetgenSupport tetgen
++ lib.optional ffmpegSupport ffmpeg
++ lib.optional dicomSupport dcmtk;
++ lib.optional dicomSupport dcmtk
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_11
(darwinMinVersionHook "10.15")
];
meta = {
description = "FEBio Suite Solver";

View File

@ -1,23 +1,19 @@
{
lib,
stdenv,
overrideSDK,
fetchFromGitHub,
fetchpatch2,
substituteAll,
apple-sdk_11,
cmake,
darwinMinVersionHook,
ninja,
zlib,
darwin,
mklSupport ? true,
mkl,
}:
let
stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv;
in
stdenv'.mkDerivation (finalAttrs: {
stdenv.mkDerivation (finalAttrs: {
pname = "FEBio";
version = "4.7";
@ -57,9 +53,8 @@ stdenv'.mkDerivation (finalAttrs: {
[ zlib ]
++ lib.optionals mklSupport [ mkl ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.CoreGraphics
darwin.apple_sdk.frameworks.CoreVideo
darwin.apple_sdk.frameworks.Accelerate
apple-sdk_11
(darwinMinVersionHook "10.15")
];
meta = {