1{ lib, buildPythonPackage, fetchPypi, fetchpatch, isPy3k
2, nose, mock, blinker
3, flask, six, pytz, aniso8601, pycrypto
4}:
5
6buildPythonPackage rec {
7 pname = "Flask-RESTful";
8 version = "0.3.6";
9
10 src = fetchPypi {
11 inherit pname version;
12 sha256 = "01rlvl2iq074ciyn4schmjip7cyplkwkysbb8f610zil06am35ap";
13 };
14
15 patches = [
16 (fetchpatch {
17 url = https://github.com/flask-restful/flask-restful/commit/54979f0a49b2217babc53c5b65b5df10b6de8e05.patch;
18 sha256 = "11s6ag6l42g61ccg5jw9j1f26hwgjfa3sp890cbl5r4hy5ycpyr5";
19 })
20 (fetchpatch {
21 url = https://github.com/flask-restful/flask-restful/commit/f45e81a45ed03922fd225afe27006315811077e6.patch;
22 sha256 = "16avd369j5r08d1l23mwbba26zjwnmfqvfvnfz02am3gr5l6p3gl";
23 })
24 ];
25
26 postPatch = lib.optionalString isPy3k ''
27 # TypeError: Only byte strings can be passed to C code
28 rm tests/test_crypto.py tests/test_paging.py
29 '';
30
31 checkInputs = [ nose mock blinker ];
32
33 propagatedBuildInputs = [ flask six pytz aniso8601 pycrypto ];
34
35 meta = with lib; {
36 homepage = "http://flask-restful.readthedocs.io/";
37 description = "REST API building blocks for Flask";
38 license = licenses.bsd3;
39 };
40}