1{ buildPythonPackage, tornado, pycrypto, pycurl, pytz 2, pillow, derpconf, python_magic, pexif, libthumbor, opencv, webcolors 3, piexif, futures, statsd, thumborPexif, fetchPypi, isPy3k, lib 4}: 5 6buildPythonPackage rec { 7 pname = "thumbor"; 8 version = "6.5.2"; 9 10 disabled = isPy3k; # see https://github.com/thumbor/thumbor/issues/1004 11 12 src = fetchPypi { 13 inherit pname version; 14 sha256 = "1icfnzwzi5lvnh576n7v3r819jaw15ph9ja2w3fwg5z9qs40xvl8"; 15 }; 16 17 postPatch = '' 18 substituteInPlace "setup.py" \ 19 --replace '"argparse",' "" ${lib.optionalString isPy3k ''--replace '"futures",' ""''} 20 ''; 21 22 propagatedBuildInputs = [ 23 tornado 24 pycrypto 25 pycurl 26 pytz 27 pillow 28 derpconf 29 python_magic 30 pexif 31 libthumbor 32 opencv 33 webcolors 34 piexif 35 statsd 36 ] ++ lib.optionals (!isPy3k) [ futures thumborPexif ]; 37 38 # disabled due to too many impure tests and issues with native modules in 39 # the pure testing environment. See https://github.com/NixOS/nixpkgs/pull/37147 40 # for further reference. 41 doCheck = false; 42 43 meta = with lib; { 44 description = "A smart imaging service"; 45 homepage = https://github.com/thumbor/thumbor/wiki; 46 license = licenses.mit; 47 maintainers = with maintainers; [ ma27 ]; 48 }; 49}