blob: 617460d7072ffe499d187e4d432367c490cf4745 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
{
lib,
stdenv,
toPythonModule,
fetchFromGitHub,
cmake,
gtest,
xtensor,
pybind11,
numpy,
}:
toPythonModule (
stdenv.mkDerivation (finalAttrs: {
pname = "xtensor-python";
version = "0.28.0";
src = fetchFromGitHub {
owner = "xtensor-stack";
repo = "xtensor-python";
tag = finalAttrs.version;
hash = "sha256-xByqAYtSRKOnllMUFdRM25bXGft/43EEpEMIlcjdrgE=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ pybind11 ];
nativeCheckInputs = [ gtest ];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
cmakeFlags = [
# Always build the tests, even if not running them, because testing whether
# they can be built is a test in itself.
(lib.cmakeBool "BUILD_TESTS" true)
];
propagatedBuildInputs = [
xtensor
numpy
];
checkTarget = "xtest";
meta = {
homepage = "https://github.com/xtensor-stack/xtensor-python";
description = "Python bindings for the xtensor C++ multi-dimensional array library";
license = lib.licenses.bsd3;
};
})
)
|