diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/xsimd')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/xsimd/10.nix | 47 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/xsimd/default.nix | 8 |
2 files changed, 51 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/development/libraries/xsimd/10.nix b/nixpkgs/pkgs/development/libraries/xsimd/10.nix new file mode 100644 index 000000000000..afea6b94ef37 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/xsimd/10.nix @@ -0,0 +1,47 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, doctest +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "xsimd"; + version = "10.0.0"; + + src = fetchFromGitHub { + owner = "xtensor-stack"; + repo = "xsimd"; + rev = finalAttrs.version; + sha256 = "sha256-+ewKbce+rjNWQ0nQzm6O4xSwgzizSPpDPidkQYuoSTU="; + }; + + nativeBuildInputs = [ + cmake + ]; + patches = lib.optionals stdenv.isDarwin [ + # https://github.com/xtensor-stack/xsimd/issues/807 + ./disable-test_error_gamma-test.patch + ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + # https://github.com/xtensor-stack/xsimd/issues/798 + ./disable-polar-test.patch + ]; + + cmakeFlags = [ + "-DBUILD_TESTS=${if (finalAttrs.doCheck && stdenv.hostPlatform == stdenv.buildPlatform) then "ON" else "OFF"}" + ]; + + doCheck = true; + nativeCheckInputs = [ + doctest + ]; + checkTarget = "xtest"; + + meta = with lib; { + description = "C++ wrappers for SIMD intrinsics"; + homepage = "https://github.com/xtensor-stack/xsimd"; + license = licenses.bsd3; + maintainers = with maintainers; [ tobim ]; + platforms = platforms.all; + }; +}) diff --git a/nixpkgs/pkgs/development/libraries/xsimd/default.nix b/nixpkgs/pkgs/development/libraries/xsimd/default.nix index a481a12932f9..8b53db0388fe 100644 --- a/nixpkgs/pkgs/development/libraries/xsimd/default.nix +++ b/nixpkgs/pkgs/development/libraries/xsimd/default.nix @@ -5,13 +5,13 @@ , doctest }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "xsimd"; version = "11.1.0"; src = fetchFromGitHub { owner = "xtensor-stack"; repo = "xsimd"; - rev = version; + rev = finalAttrs.version; sha256 = "sha256-l6IRzndjb95hIcFCCm8zmlNHWtKduqy2t/oml/9Xp+w="; }; patches = [ @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { ]; cmakeFlags = [ - "-DBUILD_TESTS=${if (doCheck && stdenv.hostPlatform == stdenv.buildPlatform) then "ON" else "OFF"}" + "-DBUILD_TESTS=${if (finalAttrs.doCheck && stdenv.hostPlatform == stdenv.buildPlatform) then "ON" else "OFF"}" ]; doCheck = true; @@ -57,4 +57,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ tobim ]; platforms = platforms.all; }; -} +}) |