1{ lib
2, buildPythonPackage
3, fetchPypi
4, isPy27
5, six
6, pytestCheckHook
7, hypothesis
8}:
9
10buildPythonPackage rec {
11 pname = "pyrsistent";
12 version = "0.18.1";
13
14 disabled = isPy27;
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "sha256-1NYfi5k6clW6cU3zrKUnAPgSUon4T3BM+AkWUXxG65Y=";
19 };
20
21 propagatedBuildInputs = [ six ];
22
23 checkInputs = [ pytestCheckHook hypothesis ];
24
25 postPatch = ''
26 substituteInPlace setup.py \
27 --replace 'pytest<5' 'pytest' \
28 --replace 'hypothesis<5' 'hypothesis'
29 '';
30
31 pythonImportsCheck = [ "pyrsistent" ];
32
33 meta = with lib; {
34 homepage = "https://github.com/tobgu/pyrsistent/";
35 description = "Persistent/Functional/Immutable data structures";
36 license = licenses.mit;
37 maintainers = with maintainers; [ desiderius ];
38 };
39
40}