1{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder
2, pytestCheckHook, pytest-benchmark, numpy, arrow, ruamel-yaml
3, lz4, cloudpickle
4}:
5
6buildPythonPackage rec {
7 pname = "construct";
8 version = "2.10.68";
9
10 disabled = pythonOlder "3.6";
11
12 # no tests in PyPI tarball
13 src = fetchFromGitHub {
14 owner = pname;
15 repo = pname;
16 rev = "v${version}";
17 sha256 = "sha256-bp/YyRFP0rrBHPyhiqnn6o1iC5l61oedShZ2phGeqaw=";
18 };
19
20 # not an explicit dependency, but it's imported by an entrypoint
21 propagatedBuildInputs = [
22 lz4
23 ];
24
25 checkInputs = [ pytestCheckHook numpy arrow ruamel-yaml cloudpickle ];
26
27 disabledTests = [ "test_benchmarks" ] ++ lib.optionals stdenv.isDarwin [ "test_multiprocessing" ];
28
29 meta = with lib; {
30 description = "Powerful declarative parser (and builder) for binary data";
31 homepage = "https://construct.readthedocs.org/";
32 license = licenses.mit;
33 maintainers = with maintainers; [ bjornfor ];
34 };
35}