1{ lib
2, stdenv
3, fetchFromGitHub
4, cmake
5, gtest
6, xsimd
7, xtl
8}:
9stdenv.mkDerivation rec {
10 pname = "xtensor";
11 version = "0.23.10";
12
13 src = fetchFromGitHub {
14 owner = "xtensor-stack";
15 repo = "xtensor";
16 rev = version;
17 sha256 = "1ayrhyh9x33b87ic01b4jzxc8x27yxpxzya5x54ikazvz8p71n14";
18 };
19
20 nativeBuildInputs = [ cmake ];
21 propagatedBuildInputs = [ xtl xsimd ];
22
23 cmakeFlags = [ "-DBUILD_TESTS=ON" ];
24
25 doCheck = true;
26 checkInputs = [ gtest ];
27 checkTarget = "xtest";
28
29 meta = with lib; {
30 description = "Multi-dimensional arrays with broadcasting and lazy computing.";
31 homepage = "https://github.com/xtensor-stack/xtensor";
32 license = licenses.bsd3;
33 maintainers = with maintainers; [ cpcloud ];
34 platforms = platforms.all;
35 };
36}