1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pipInstallHook,
7 blessed,
8 docutils,
9 llvm,
10 pytestCheckHook,
11 typesentry,
12}:
13
14buildPythonPackage rec {
15 pname = "datatable";
16 # python 3.10+ support is not in the 1.0.0 release
17 version = "unstable-2022-12-15";
18 format = "pyproject";
19
20 src = fetchFromGitHub {
21 owner = "h2oai";
22 repo = "datatable";
23 rev = "9522f0833d3e965656396de4fffebd882d39c25d";
24 hash = "sha256-lEXQwhx2msnJkkRrTkAwYttlYTISyH/Z7dSalqRrOhI=";
25 };
26
27 postPatch = ''
28 # tarball doesn't appear to have been shipped totally ready-to-build
29 substituteInPlace ci/ext.py \
30 --replace \
31 'shell_cmd(["git"' \
32 '"0000000000000000000000000000000000000000" or shell_cmd(["git"'
33 # TODO revert back to use ${version} when bumping to the next stable release
34 echo '1.0' > VERSION.txt
35
36 # don't make assumptions about architecture
37 sed -i '/-m64/d' ci/ext.py
38 '';
39 DT_RELEASE = "1";
40
41 propagatedBuildInputs = [
42 typesentry
43 blessed
44 ];
45 buildInputs = [
46 llvm
47 pipInstallHook
48 ];
49 nativeCheckInputs = [
50 docutils
51 pytestCheckHook
52 ];
53
54 LLVM = llvm;
55 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-isystem ${lib.getInclude stdenv.cc.libcxx}/include/c++/v1";
56
57 # test suite is very cpu intensive, only run small subset to ensure package is working as expected
58 enabledTestPaths = [ "tests/test-sets.py" ];
59
60 disabledTests = [
61 # skip tests which are irrelevant to our installation or use way too much memory
62 "test_xfunction_paths"
63 "test_fread_from_cmd2"
64 "test_cast_huge_to_str"
65 "test_create_large_string_column"
66 ];
67 pythonImportsCheck = [ "datatable" ];
68
69 meta = with lib; {
70 description = "data.table for Python";
71 homepage = "https://github.com/h2oai/datatable";
72 license = licenses.mpl20;
73 maintainers = [ ];
74 };
75}