6 , enableAssertions ? false
7 , enableBoundChecks ? false # Broadcasts don't pass bound checks
10 # Although this dependency is of the same GitHub organization, xtensor don't
11 # support xsimd 11 yet, see:
12 # https://github.com/xtensor-stack/xtensor/issues/2721
16 stdenv.mkDerivation (finalAttrs: {
20 src = fetchFromGitHub {
21 owner = "xtensor-stack";
23 rev = finalAttrs.version;
24 hash = "sha256-dVbpcBW+jK9nIl5efk5LdKdBm8CkaJWEZ0ZY7ZuApwk=";
30 propagatedBuildInputs = [
33 ] ++ lib.optionals (!(stdenv.isAarch64 && stdenv.isLinux)) [
34 # xsimd support is broken on aarch64-linux, see:
35 # https://github.com/xtensor-stack/xsimd/issues/945
40 cmakeBool = x: if x then "ON" else "OFF";
42 "-DBUILD_TESTS=${cmakeBool finalAttrs.doCheck}"
43 "-DXTENSOR_ENABLE_ASSERT=${cmakeBool enableAssertions}"
44 "-DXTENSOR_CHECK_DIMENSION=${cmakeBool enableBoundChecks}"
51 checkTarget = "xtest";
54 description = "Multi-dimensional arrays with broadcasting and lazy computing.";
55 homepage = "https://github.com/xtensor-stack/xtensor";
56 license = licenses.bsd3;
57 maintainers = with maintainers; [ cpcloud ];
58 platforms = platforms.all;