1{ stdenv, buildPythonPackage, fetchFromGitHub, six, pythonOlder }:
2
3buildPythonPackage rec {
4 pname = "construct";
5 version = "2.8.16";
6 name = pname + "-" + version;
7
8 src = fetchFromGitHub {
9 owner = "construct";
10 repo = "construct";
11 rev = "v${version}";
12 sha256 = "0lzz1dy419n254qccch7yx4nkpwd0fsyjhnsnaf6ysgwzqxxv63j";
13 };
14
15 propagatedBuildInputs = [ six ];
16
17 # Tests fail with the following error on Python 3.5+
18 # TypeError: not all arguments converted during string formatting
19 doCheck = pythonOlder "3.5";
20
21 meta = with stdenv.lib; {
22 description = "Powerful declarative parser (and builder) for binary data";
23 homepage = http://construct.readthedocs.org/;
24 license = licenses.mit;
25 platforms = platforms.linux;
26 maintainers = with maintainers; [ bjornfor ];
27 };
28}