1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 hypothesis,
6 pyutil,
7 setuptools,
8 twisted,
9}:
10
11buildPythonPackage rec {
12 pname = "zfec";
13 version = "1.6.0.0";
14 pyproject = true;
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-xaGGHCU7USaYwuczrk2D9eLW6myIG32+ETNLaU51WgA=";
19 };
20
21 nativeBuildInputs = [ setuptools ];
22
23 propagatedBuildInputs = [ pyutil ];
24
25 nativeCheckInputs = [
26 hypothesis
27 twisted
28 ];
29
30 checkPhase = ''
31 trial zfec
32 '';
33
34 pythonImportsCheck = [ "zfec" ];
35
36 meta = with lib; {
37 homepage = "https://github.com/tahoe-lafs/zfec";
38 description = "Fast erasure codec which can be used with the command-line, C, Python, or Haskell";
39 longDescription = ''
40 Fast, portable, programmable erasure coding a.k.a. "forward
41 error correction": the generation of redundant blocks of
42 information such that if some blocks are lost then the
43 original data can be recovered from the remaining blocks. The
44 zfec package includes command-line tools, C API, Python API,
45 and Haskell API.
46 '';
47 license = licenses.gpl2Plus;
48 maintainers = with maintainers; [ prusnak ];
49 };
50}