From a2f3aa4bab5a43aa8e5515a42dcce91335c0f6bc Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sun, 7 Aug 2022 13:24:28 -0700 Subject: [PATCH] EBTKS: create patch to fix build on Darwin aarch64 --- .../libraries/science/biology/EBTKS/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/science/biology/EBTKS/default.nix b/pkgs/development/libraries/science/biology/EBTKS/default.nix index 2a832fc7c37a2ef..5c56656c4e5f28b 100644 --- a/pkgs/development/libraries/science/biology/EBTKS/default.nix +++ b/pkgs/development/libraries/science/biology/EBTKS/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake, libminc }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, libminc }: stdenv.mkDerivation rec { pname = "EBTKS"; @@ -11,6 +11,15 @@ stdenv.mkDerivation rec { sha256 = "1a1qw6i47fs1izx60l1ysabpmyx9j5sjnbdv8b47wi2xcc9i3hpq"; }; + patches = [ + # Fixes compilation for Darwin aarch64 by using the isfinite macro instead + # of the finite function, which has been removed from libSystem. + (fetchpatch { + url = "https://github.com/BIC-MNI/EBTKS/pull/7/commits/03a0ef93ae274314e31c029ebb9dcaf06d19fc1e.patch"; + sha256 = "IeNCUGn0VrAh4Z32ShjGDwWCYmwhXiP1+0VcyiGg8t8="; + }) + ]; + nativeBuildInputs = [ cmake ]; buildInputs = [ libminc ];