2019-09-13 23:06:06 +00:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, substituteAll, pythonOlder
|
|
|
|
, blessed
|
|
|
|
, docutils
|
2019-08-01 17:54:41 +00:00
|
|
|
, libcxx
|
|
|
|
, libcxxabi
|
2019-06-03 15:12:25 +00:00
|
|
|
, llvm
|
2019-08-01 17:54:41 +00:00
|
|
|
, openmp
|
2019-06-03 15:12:25 +00:00
|
|
|
, pytest
|
2019-08-01 17:54:41 +00:00
|
|
|
, typesentry
|
2019-06-03 15:12:25 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "datatable";
|
2019-09-13 23:06:06 +00:00
|
|
|
version = "0.9.0";
|
|
|
|
disabled = pythonOlder "3.5";
|
2019-06-03 15:12:25 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-09-13 23:06:06 +00:00
|
|
|
sha256 = "1shwjkm9nyaj6asn57vwdd74pn13pggh14r6dzv729lzxm7nm65f";
|
2019-06-03 15:12:25 +00:00
|
|
|
};
|
|
|
|
|
2019-09-13 23:06:06 +00:00
|
|
|
patches = lib.optionals stdenv.isDarwin [
|
2019-08-01 17:54:41 +00:00
|
|
|
# Replace the library auto-detection with hardcoded paths.
|
|
|
|
(substituteAll {
|
|
|
|
src = ./hardcode-library-paths.patch;
|
|
|
|
|
|
|
|
libomp_dylib = "${lib.getLib openmp}/lib/libomp.dylib";
|
|
|
|
libcxx_dylib = "${lib.getLib libcxx}/lib/libc++.1.dylib";
|
|
|
|
libcxxabi_dylib = "${lib.getLib libcxxabi}/lib/libc++abi.dylib";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-06-03 15:12:25 +00:00
|
|
|
propagatedBuildInputs = [ typesentry blessed ];
|
2019-08-01 17:54:41 +00:00
|
|
|
buildInputs = [ llvm ] ++ lib.optionals stdenv.isDarwin [ openmp ];
|
2019-09-13 23:06:06 +00:00
|
|
|
checkInputs = [ docutils pytest ];
|
2019-06-03 15:12:25 +00:00
|
|
|
|
|
|
|
LLVM = llvm;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
mv datatable datatable.hidden
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "data.table for Python";
|
|
|
|
homepage = "https://github.com/h2oai/datatable";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|