Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{febio, febio-studio}: darwin sdk refactor #352943

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions pkgs/by-name/fe/febio-studio/package.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
lib,
stdenv,
overrideSDK,
fetchFromGitHub,
cmake,
ninja,
Expand All @@ -10,6 +9,8 @@
qt6Packages,
febio,
glew,
apple-sdk_11,
darwinMinVersionHook,
sshSupport ? true,
openssl,
libssh,
Expand All @@ -23,18 +24,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";

Expand Down Expand Up @@ -76,7 +66,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";
Expand Down
15 changes: 5 additions & 10 deletions pkgs/by-name/fe/febio/package.nix
Original file line number Diff line number Diff line change
@@ -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";

Expand Down Expand Up @@ -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 = {
Expand Down