2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
toPythonModule,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cmake,
|
|
|
|
gtest,
|
|
|
|
xtensor,
|
|
|
|
pybind11,
|
|
|
|
numpy,
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
toPythonModule (
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "xtensor-python";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.27.0";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xtensor-stack";
|
|
|
|
repo = "xtensor-python";
|
|
|
|
rev = finalAttrs.version;
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-Cy/aXuiriE/qxSd4Apipzak30DjgE7jX8ai1ThJ/VnE=";
|
2024-06-05 15:53:02 +00:00
|
|
|
};
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ pybind11 ];
|
|
|
|
nativeCheckInputs = [ gtest ];
|
|
|
|
doCheck = true;
|
2024-06-20 14:57:18 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
# Always build the tests, even if not running them, because testing whether
|
|
|
|
# they can be built is a test in itself.
|
|
|
|
"-DBUILD_TESTS=ON"
|
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
xtensor
|
|
|
|
numpy
|
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
checkTarget = "xtest";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/xtensor-stack/xtensor-python";
|
|
|
|
description = "Python bindings for the xtensor C++ multi-dimensional array library";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ lsix ];
|
|
|
|
};
|
|
|
|
})
|
|
|
|
)
|