2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder
|
2021-11-13 11:35:55 +00:00
|
|
|
, pytestCheckHook, pytest-benchmark, numpy, arrow, ruamel-yaml
|
2021-03-24 19:04:52 +00:00
|
|
|
, lz4, cloudpickle
|
2018-09-12 01:18:37 +00:00
|
|
|
}:
|
2017-10-29 13:32:12 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2018-09-12 01:18:37 +00:00
|
|
|
pname = "construct";
|
2022-03-02 21:41:55 +00:00
|
|
|
version = "2.10.68";
|
2017-10-29 13:32:12 +00:00
|
|
|
|
2020-08-11 14:59:07 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
# no tests in PyPI tarball
|
2017-10-29 13:32:12 +00:00
|
|
|
src = fetchFromGitHub {
|
2018-09-12 01:18:37 +00:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-03-02 21:41:55 +00:00
|
|
|
sha256 = "sha256-bp/YyRFP0rrBHPyhiqnn6o1iC5l61oedShZ2phGeqaw=";
|
2017-10-29 13:32:12 +00:00
|
|
|
};
|
|
|
|
|
2021-03-24 19:04:52 +00:00
|
|
|
# not an explicit dependency, but it's imported by an entrypoint
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
lz4
|
|
|
|
];
|
|
|
|
|
2021-10-20 00:57:07 +00:00
|
|
|
checkInputs = [ pytestCheckHook numpy arrow ruamel-yaml cloudpickle ];
|
2018-03-10 22:36:00 +00:00
|
|
|
|
2021-10-20 00:57:07 +00:00
|
|
|
disabledTests = [ "test_benchmarks" ] ++ lib.optionals stdenv.isDarwin [ "test_multiprocessing" ];
|
2017-10-29 13:32:12 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-10-29 13:32:12 +00:00
|
|
|
description = "Powerful declarative parser (and builder) for binary data";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://construct.readthedocs.org/";
|
2017-10-29 13:32:12 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bjornfor ];
|
|
|
|
};
|
|
|
|
}
|