1{ lib
2, buildPythonPackage
3, fetchpatch
4, fetchPypi
5, isPyPy
6}:
7
8buildPythonPackage rec {
9 pname = "blist";
10 version = "1.3.6";
11 disabled = isPyPy;
12
13 src = fetchPypi {
14 inherit pname version;
15 sha256 = "1hqz9pqbwx0czvq9bjdqjqh5bwfksva1is0anfazig81n18c84is";
16 };
17
18
19 patches = [
20 # Fix compatibility for Python 3.7 https://github.com/DanielStutzbach/blist/pull/78
21 (fetchpatch {
22 url = "https://github.com/DanielStutzbach/blist/commit/2dc1ec28ed68611fcec9ac1c68070c782d6b4b4e.patch";
23 sha256 = "0ma0z6ga80w3wzh3sidwd8ckfbgx4j1y7cc29q6j9ddrvxpf276y";
24 })
25
26 # Fixes compatibility for Python 3.9 https://github.com/DanielStutzbach/blist/pull/91
27 (fetchpatch {
28 url = "https://github.com/DanielStutzbach/blist/pull/91/commits/e63514f805e42dc6a5708e629e4153d91bc90bff.patch";
29 sha256 = "1prx8znk7008v4ky7q2lx0pi6hzqd4kxgfdwbsr4zylwbrdqvsga";
30 })
31 ];
32
33 meta = with lib; {
34 homepage = "http://stutzbachenterprises.com/blist/";
35 description = "A list-like type with better asymptotic performance and similar performance on small lists";
36 license = licenses.bsd0;
37 };
38
39}