2018-08-15 12:54:27 +01:00
|
|
|
{ buildPythonPackage, tornado, pycrypto, pycurl, pytz
|
2018-03-15 21:34:10 +00:00
|
|
|
, pillow, derpconf, python_magic, pexif, libthumbor, opencv, webcolors
|
2018-06-21 23:01:32 +01:00
|
|
|
, piexif, futures, statsd, thumborPexif, fetchPypi, isPy3k, lib
|
2018-03-15 21:34:10 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "thumbor";
|
2018-08-15 12:54:27 +01:00
|
|
|
version = "6.5.2";
|
2018-03-15 21:34:10 +00:00
|
|
|
|
2018-03-19 07:49:28 +00:00
|
|
|
disabled = isPy3k; # see https://github.com/thumbor/thumbor/issues/1004
|
|
|
|
|
2018-03-15 21:34:10 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-08-15 12:54:27 +01:00
|
|
|
sha256 = "1icfnzwzi5lvnh576n7v3r819jaw15ph9ja2w3fwg5z9qs40xvl8";
|
2018-03-15 21:34:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace "setup.py" \
|
|
|
|
--replace '"argparse",' "" ${lib.optionalString isPy3k ''--replace '"futures",' ""''}
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
tornado
|
|
|
|
pycrypto
|
|
|
|
pycurl
|
|
|
|
pytz
|
|
|
|
pillow
|
|
|
|
derpconf
|
|
|
|
python_magic
|
|
|
|
pexif
|
|
|
|
libthumbor
|
|
|
|
opencv
|
|
|
|
webcolors
|
|
|
|
piexif
|
|
|
|
statsd
|
|
|
|
] ++ lib.optionals (!isPy3k) [ futures thumborPexif ];
|
|
|
|
|
|
|
|
# disabled due to too many impure tests and issues with native modules in
|
|
|
|
# the pure testing environment. See https://github.com/NixOS/nixpkgs/pull/37147
|
|
|
|
# for further reference.
|
|
|
|
doCheck = false;
|
|
|
|
|
2018-08-15 12:54:27 +01:00
|
|
|
meta = with lib; {
|
2018-03-15 21:34:10 +00:00
|
|
|
description = "A smart imaging service";
|
|
|
|
homepage = https://github.com/thumbor/thumbor/wiki;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ma27 ];
|
|
|
|
};
|
|
|
|
}
|