1{ 2 lib, 3 toPythonModule, 4 stdenv, 5 fetchFromGitHub, 6 cmake, 7 gtest, 8 xtensor, 9 pybind11, 10 numpy, 11}: 12 13toPythonModule ( 14 stdenv.mkDerivation (finalAttrs: { 15 pname = "xtensor-python"; 16 version = "0.26.1"; 17 18 src = fetchFromGitHub { 19 owner = "xtensor-stack"; 20 repo = "xtensor-python"; 21 rev = finalAttrs.version; 22 sha256 = "sha256-kLFt5Ah5/ZO6wfTZQviVXeIAVok+/F/XCwpgPSagOMo="; 23 }; 24 25 nativeBuildInputs = [ cmake ]; 26 buildInputs = [ pybind11 ]; 27 nativeCheckInputs = [ gtest ]; 28 doCheck = true; 29 cmakeFlags = [ "-DBUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}" ]; 30 31 propagatedBuildInputs = [ 32 xtensor 33 numpy 34 ]; 35 36 checkTarget = "xtest"; 37 38 meta = with lib; { 39 homepage = "https://github.com/xtensor-stack/xtensor-python"; 40 description = "Python bindings for the xtensor C++ multi-dimensional array library"; 41 license = licenses.bsd3; 42 maintainers = with maintainers; [ lsix ]; 43 }; 44 }) 45)