2021-06-06 07:54:09 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, gtest
|
|
|
|
, xsimd
|
|
|
|
, xtl
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xtensor";
|
|
|
|
version = "0.23.10";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xtensor-stack";
|
|
|
|
repo = "xtensor";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1ayrhyh9x33b87ic01b4jzxc8x27yxpxzya5x54ikazvz8p71n14";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
propagatedBuildInputs = [ xtl xsimd ];
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DBUILD_TESTS=ON" ];
|
|
|
|
|
|
|
|
doCheck = true;
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ gtest ];
|
2021-06-06 07:54:09 +00:00
|
|
|
checkTarget = "xtest";
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
# https://github.com/xtensor-stack/xtensor/issues/2542
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace xtensor.pc.in \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
|
|
|
|
'';
|
|
|
|
|
2021-06-06 07:54:09 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Multi-dimensional arrays with broadcasting and lazy computing.";
|
|
|
|
homepage = "https://github.com/xtensor-stack/xtensor";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ cpcloud ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|