1{ lib, buildPythonPackage, fetchFromGitLab, isPy3k, pytest, baseline }:
2
3buildPythonPackage rec {
4 pname = "plum-py";
5 version = "0.4.0";
6 disabled = !isPy3k;
7
8 src = fetchFromGitLab {
9 owner = "dangass";
10 repo = "plum";
11 rev = "6a9ff863c0e9fa21f7b2230d25402155a5522e4b";
12 sha256 = "1iv62yb704c61b0dvsmyp3j6xpbmay532g9ny4pw4zbg3l69vd5j";
13 };
14
15 postPatch = ''
16 substituteInPlace src/plum/int/flag/_flag.py \
17 --replace 'if sys.version_info < (3, 7):' 'if True:'
18 '';
19
20 checkInputs = [ pytest baseline ];
21 checkPhase = "pytest tests";
22
23 meta = with lib; {
24 description = "Classes and utilities for packing/unpacking bytes";
25 homepage = "https://plum-py.readthedocs.io/en/latest/index.html";
26 license = licenses.mit;
27 maintainers = with maintainers; [ dnr ];
28 };
29}