2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
2023-10-09 19:29:22 +00:00
|
|
|
, toPythonModule
|
|
|
|
, stdenv
|
2021-06-28 23:13:55 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, gtest
|
|
|
|
, xtensor
|
|
|
|
, pybind11
|
|
|
|
, numpy
|
|
|
|
}:
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
toPythonModule (stdenv.mkDerivation(finalAttrs: {
|
2021-06-28 23:13:55 +00:00
|
|
|
pname = "xtensor-python";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.26.1";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xtensor-stack";
|
2023-10-09 19:29:22 +00:00
|
|
|
repo = "xtensor-python";
|
|
|
|
rev = finalAttrs.version;
|
|
|
|
sha256 = "sha256-kLFt5Ah5/ZO6wfTZQviVXeIAVok+/F/XCwpgPSagOMo=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
pybind11
|
|
|
|
];
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
gtest
|
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
doCheck = true;
|
|
|
|
cmakeFlags = [
|
2024-01-02 11:29:13 +00:00
|
|
|
"-DBUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
xtensor
|
|
|
|
numpy
|
|
|
|
];
|
|
|
|
|
|
|
|
checkTarget = "xtest";
|
2021-06-28 23:13:55 +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 ];
|
|
|
|
};
|
2023-10-09 19:29:22 +00:00
|
|
|
}))
|