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