···11{ lib
22, stdenv
33, fetchFromGitLab
44+, fetchpatch
45, cmake
56}:
67···17181819 patches = [
1920 ./include-dir.patch
2121+2222+ # Fixes e.g. onnxruntime on aarch64-darwin:
2323+ # https://hydra.nixos.org/build/248915128/nixlog/1,
2424+ # originally suggested in https://github.com/NixOS/nixpkgs/pull/258392.
2525+ #
2626+ # The patch is from
2727+ # ["Fix vectorized reductions for Eigen::half"](https://gitlab.com/libeigen/eigen/-/merge_requests/699)
2828+ # which is two years old,
2929+ # but Eigen hasn't had a release in two years either:
3030+ # https://gitlab.com/libeigen/eigen/-/issues/2699.
3131+ (fetchpatch {
3232+ url = "https://gitlab.com/libeigen/eigen/-/commit/d0e3791b1a0e2db9edd5f1d1befdb2ac5a40efe0.patch";
3333+ hash = "sha256-8qiNpuYehnoiGiqy0c3Mcb45pwrmc6W4rzCxoLDSvj0=";
3434+ })
2035 ];
21362237 nativeBuildInputs = [ cmake ];