1{ buildPythonPackage, fetchPypi, jinja2, werkzeug, flask
2, requests, pytz, backports_tempfile, cookies, jsondiff, botocore, aws-xray-sdk, docker, responses
3, six, boto, httpretty, xmltodict, nose, sure, boto3, freezegun, dateutil, mock, pyaml, python-jose }:
4
5buildPythonPackage rec {
6 pname = "moto";
7 version = "1.3.7";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "129de2e04cb250d9f8b2c722ec152ed1b5426ef179b4ebb03e9ec36e6eb3fcc5";
12 };
13
14 postPatch = ''
15 # regarding aws-xray-sdk: https://github.com/spulec/moto/commit/31eac49e1555c5345021a252cb0c95043197ea16
16 # regarding python-jose: https://github.com/spulec/moto/pull/1927
17 substituteInPlace setup.py \
18 --replace "aws-xray-sdk<0.96," "aws-xray-sdk" \
19 --replace "jsondiff==1.1.1" "jsondiff>=1.1.1" \
20 --replace "python-jose<3.0.0" "python-jose<4.0.0"
21 '';
22
23 propagatedBuildInputs = [
24 aws-xray-sdk
25 boto
26 boto3
27 dateutil
28 flask
29 httpretty
30 jinja2
31 pytz
32 werkzeug
33 requests
34 six
35 xmltodict
36 mock
37 pyaml
38 backports_tempfile
39 cookies
40 jsondiff
41 botocore
42 docker
43 responses
44 python-jose
45 ];
46
47 checkInputs = [ boto3 nose sure freezegun ];
48
49 checkPhase = "nosetests";
50
51 # TODO: make this true; I think lots of the tests want network access but we can probably run the others
52 doCheck = false;
53}