about summary refs log tree commit diff
path: root/pkgs/development/libraries/xsimd/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/xsimd/default.nix')
-rw-r--r--pkgs/development/libraries/xsimd/default.nix36
1 files changed, 15 insertions, 21 deletions
diff --git a/pkgs/development/libraries/xsimd/default.nix b/pkgs/development/libraries/xsimd/default.nix
index d775cef4d6734..019b3afbefc84 100644
--- a/pkgs/development/libraries/xsimd/default.nix
+++ b/pkgs/development/libraries/xsimd/default.nix
@@ -1,39 +1,31 @@
 { lib
 , stdenv
 , fetchFromGitHub
+, fetchpatch
 , cmake
 , doctest
 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "xsimd";
-  version = "12.1.1";
+  version = "13.0.0";
   src = fetchFromGitHub {
     owner = "xtensor-stack";
     repo = "xsimd";
     rev = finalAttrs.version;
-    hash = "sha256-ofUFieeRtpnzNv3Ad5oYwKWb2XcqQHoj601TIhydJyI=";
+    hash = "sha256-qElJYW5QDj3s59L3NgZj5zkhnUMzIP2mBa1sPks3/CE=";
   };
   patches = [
-    # Ideally, Accelerate/Accelerate.h should be used for this implementation,
-    # but it doesn't work... Needs a Darwin user to debug this. We apply this
-    # patch unconditionally, because the #if macros make sure it doesn't
-    # interfer with the Linux implementations.
-    ./fix-darwin-exp10-implementation.patch
+    # Fix of https://github.com/xtensor-stack/xsimd/pull/1024 for
+    # https://github.com/xtensor-stack/xsimd/issues/456 and
+    # https://github.com/xtensor-stack/xsimd/issues/807,
+    (fetchpatch {
+      url = "https://github.com/xtensor-stack/xsimd/commit/c8a87ed6e04b6782f48f94713adfb0cad6c11ddf.patch";
+      hash = "sha256-2/FvBGdqTPcayD7rdHPSzL+F8IYKAfMW0WBJ0cW9EZ0=";
+    })
   ] ++ lib.optionals stdenv.isDarwin [
-    # https://github.com/xtensor-stack/xsimd/issues/807
-    ./disable-test_error_gamma-test.patch
-  ] ++ lib.optionals (stdenv.isDarwin || stdenv.hostPlatform.isMusl) [
-    # - Darwin report: https://github.com/xtensor-stack/xsimd/issues/917
-    # - Musl   report: https://github.com/xtensor-stack/xsimd/issues/798
-    ./disable-exp10-test.patch
-  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
-    # https://github.com/xtensor-stack/xsimd/issues/798
-    ./disable-polar-test.patch
-  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
-    # Fix suggested here: https://github.com/xtensor-stack/xsimd/issues/798#issuecomment-1356884601
-    # Upstream didn't merge that from some reason.
-    ./fix-atan-test.patch
+    # https://github.com/xtensor-stack/xsimd/issues/1030
+    ./disable-test_error_gamma.patch
   ];
 
   nativeBuildInputs = [
@@ -41,7 +33,9 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   cmakeFlags = [
-    "-DBUILD_TESTS=${if (finalAttrs.finalPackage.doCheck && stdenv.hostPlatform == stdenv.buildPlatform) then "ON" else "OFF"}"
+    # Always build the tests, even if not running them, because testing whether
+    # they can be built is a test in itself.
+    "-DBUILD_TESTS=ON"
   ];
 
   doCheck = true;