1{ lib
2, buildPythonPackage
3, fetchPypi
4, pyutil
5, setuptoolsTrial
6, twisted
7}:
8
9buildPythonPackage rec {
10 pname = "zfec";
11 version = "1.5.7.2";
12
13 src = fetchPypi {
14 inherit pname version;
15 sha256 = "sha256-TuUZvg3MfaLohIK8/Av5d6Ql4dfoJ4z1u7uNAPiir7Y=";
16 };
17
18 propagatedBuildInputs = [ pyutil ];
19
20 checkInputs = [ setuptoolsTrial twisted ];
21
22 # argparse is in the stdlib but zfec doesn't know that.
23 postPatch = ''
24 sed -i -e '/argparse/d' setup.py
25 '';
26
27 pythonImportsCheck = [ "zfec" ];
28
29 meta = with lib; {
30 homepage = "https://github.com/tahoe-lafs/zfec";
31 description = "Zfec, a fast erasure codec which can be used with the command-line, C, Python, or Haskell";
32 longDescription = ''
33 Fast, portable, programmable erasure coding a.k.a. "forward
34 error correction": the generation of redundant blocks of
35 information such that if some blocks are lost then the
36 original data can be recovered from the remaining blocks. The
37 zfec package includes command-line tools, C API, Python API,
38 and Haskell API.
39 '';
40 license = licenses.gpl2Plus;
41 maintainers = with maintainers; [ prusnak ];
42 };
43
44}