2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
arrow,
|
|
|
|
buildPythonPackage,
|
|
|
|
cloudpickle,
|
|
|
|
cryptography,
|
|
|
|
fetchFromGitHub,
|
|
|
|
lz4,
|
|
|
|
numpy,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
ruamel-yaml,
|
|
|
|
setuptools,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-01-02 11:29:13 +00:00
|
|
|
pname = "construct";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "2.10.70";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
2024-01-02 11:29:13 +00:00
|
|
|
owner = "construct";
|
|
|
|
repo = "construct";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-5otjjIyje0+z/Y/C2ivmu08PNm0oJcSSvZkQfGxHDuQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
propagatedBuildInputs = [
|
2024-01-02 11:29:13 +00:00
|
|
|
# Not an explicit dependency, but it's imported by an entrypoint
|
2021-04-26 19:14:03 +00:00
|
|
|
lz4
|
|
|
|
];
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2024-01-02 11:29:13 +00:00
|
|
|
extras = [
|
|
|
|
arrow
|
|
|
|
cloudpickle
|
|
|
|
cryptography
|
|
|
|
numpy
|
|
|
|
ruamel-yaml
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
2024-10-04 16:56:33 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "construct" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_benchmarks"
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_multiprocessing" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Powerful declarative parser (and builder) for binary data";
|
|
|
|
homepage = "https://construct.readthedocs.org/";
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/construct/construct/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bjornfor ];
|
|
|
|
};
|
|
|
|
}
|