blob: afea6b94ef37283850b6f2817f12758819f063f0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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;
};
})
|