From 9b005004920f6ae7bda252f85357ed167892785c Mon Sep 17 00:00:00 2001 From: Reno Dakota <170618376+paparodeo@users.noreply.github.com> Date: Fri, 25 Oct 2024 08:15:34 +0000 Subject: [PATCH] stockfish: fix x64 darwin use sdk 11 and set min version to 10.15 to match the makefiles --- pkgs/games/stockfish/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pkgs/games/stockfish/default.nix b/pkgs/games/stockfish/default.nix index b4531fc0015d..134eaa660d3a 100644 --- a/pkgs/games/stockfish/default.nix +++ b/pkgs/games/stockfish/default.nix @@ -1,4 +1,12 @@ -{ lib, stdenv, fetchurl, fetchFromGitHub }: +{ + lib, + stdenv, + fetchurl, + fetchFromGitHub, + apple-sdk, + apple-sdk_11, + darwinMinVersionHook +}: let # The x86-64-modern may need to be refined further in the future @@ -46,6 +54,14 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out)" "ARCH=${arch}" "CXX=${stdenv.cc.targetPrefix}c++" ]; buildFlags = [ "build" ]; + buildInputs = lib.optionals ( + stdenv.hostPlatform.isDarwin + && lib.versionOlder apple-sdk.version "11") [ + apple-sdk_11 + (darwinMinVersionHook "10.15") + ]; + + enableParallelBuilding = true; meta = with lib; {