Commit e621c4fe authored by Doron Behar's avatar Doron Behar
Browse files

xtensor: switch to xsimd11

parent 7362210c
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, doctest
, enableAssertions ? false
, enableBoundChecks ? false # Broadcasts don't pass bound checks
, nlohmann_json
, xtl
# Although this dependency is of the same GitHub organization, xtensor don't
# support xsimd 11 yet, see:
# https://github.com/xtensor-stack/xtensor/issues/2721
, xsimd10
, xsimd
}:

stdenv.mkDerivation (finalAttrs: {
@@ -23,6 +21,13 @@ stdenv.mkDerivation (finalAttrs: {
    rev = finalAttrs.version;
    hash = "sha256-dVbpcBW+jK9nIl5efk5LdKdBm8CkaJWEZ0ZY7ZuApwk=";
  };
  patches = [
    # Support for xsimd 11
    (fetchpatch {
      url = "https://github.com/xtensor-stack/xtensor/commit/77a650a8018e0be6fcc76bf66685ff352ae23ef1.patch";
      hash = "sha256-vOdUzzsSK+lYcA7fZXWOTVV202GZC0DhkMMjzggnmWE=";
    })
  ];

  nativeBuildInputs = [
    cmake
@@ -33,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
  ] ++ lib.optionals (!(stdenv.isAarch64 && stdenv.isLinux)) [
    # xsimd support is broken on aarch64-linux, see:
    # https://github.com/xtensor-stack/xsimd/issues/945
    xsimd10
    xsimd
  ];

  cmakeFlags = let