Merge pull request #37147 from Ma27/fix-thumbor

pythonPackages.thumbor: fix build

authored by Robert Schütz and committed by GitHub 024acca3 6f7a23ba

+55 -45
+54
pkgs/development/python-modules/thumbor/default.nix
··· 1 + { buildPythonPackage, stdenv, tornado, pycrypto, pycurl, pytz 2 + , pillow, derpconf, python_magic, pexif, libthumbor, opencv, webcolors 3 + , piexif, futures, statsd, thumborPexif, fetchPypi, fetchpatch, isPy3k, lib 4 + }: 5 + 6 + buildPythonPackage rec { 7 + pname = "thumbor"; 8 + version = "6.4.2"; 9 + 10 + src = fetchPypi { 11 + inherit pname version; 12 + sha256 = "0y9mf78j80vjh4y0xvgnybc1wqfcwm5s19xhsfgkn12hh8pmh14d"; 13 + }; 14 + 15 + patches = [ 16 + (fetchpatch { 17 + url = "https://github.com/thumbor/thumbor/commit/4f2bc99451409e404f7fa0f3e4a3bdaea7b49869.patch"; 18 + sha256 = "0qqw1n1pfd8f8cn168718gzwf4b35j2j9ajyw643xpf92s0iq2cc"; 19 + }) 20 + ]; 21 + 22 + postPatch = '' 23 + substituteInPlace "setup.py" \ 24 + --replace '"argparse",' "" ${lib.optionalString isPy3k ''--replace '"futures",' ""''} 25 + ''; 26 + 27 + propagatedBuildInputs = [ 28 + tornado 29 + pycrypto 30 + pycurl 31 + pytz 32 + pillow 33 + derpconf 34 + python_magic 35 + pexif 36 + libthumbor 37 + opencv 38 + webcolors 39 + piexif 40 + statsd 41 + ] ++ lib.optionals (!isPy3k) [ futures thumborPexif ]; 42 + 43 + # disabled due to too many impure tests and issues with native modules in 44 + # the pure testing environment. See https://github.com/NixOS/nixpkgs/pull/37147 45 + # for further reference. 46 + doCheck = false; 47 + 48 + meta = with stdenv.lib; { 49 + description = "A smart imaging service"; 50 + homepage = https://github.com/thumbor/thumbor/wiki; 51 + license = licenses.mit; 52 + maintainers = with maintainers; [ ma27 ]; 53 + }; 54 + }
+1 -45
pkgs/top-level/python-packages.nix
··· 18909 18909 }; 18910 18910 18911 18911 18912 - thumbor = buildPythonPackage rec { 18913 - name = "thumbor-${version}"; 18914 - version = "6.3.2"; 18915 - 18916 - disabled = ! isPy27; 18917 - 18918 - buildInputs = with self; [ statsd nose ]; 18919 - 18920 - propagatedBuildInputs = with self; [ 18921 - tornado 18922 - pycrypto 18923 - pycurl 18924 - pytz 18925 - pillow 18926 - derpconf 18927 - python_magic 18928 - # thumborPexif 18929 - pexif 18930 - libthumbor 18931 - opencv 18932 - ] ++ optionals (!isPy3k) [ futures ]; 18933 - 18934 - src = pkgs.fetchurl { 18935 - url = "mirror://pypi/t/thumbor/${name}.tar.gz"; 18936 - sha256 = "0787245x4yci34cdfc9xaxhds0lv60476qgp132pwa78hrpc9m31"; 18937 - }; 18938 - 18939 - patches = [ 18940 - (pkgs.fetchurl { 18941 - url = "https://github.com/thumbor/thumbor/commit/376f688a8a0b82e50388c885d9d733572f2eb3e6.patch"; 18942 - sha256 = "1j2434yqb6pz61d65dsy8w6lvyzvh5ksizadi5hgjzfw6s46v6yn"; 18943 - }) 18944 - ]; 18945 - 18946 - prePatch = '' 18947 - substituteInPlace setup.py \ 18948 - --replace '"argparse",' "" 18949 - ''; 18950 - 18951 - meta = { 18952 - description = "A smart imaging service"; 18953 - homepage = https://github.com/globocom/thumbor/wiki; 18954 - license = licenses.mit; 18955 - }; 18956 - }; 18912 + thumbor = callPackage ../development/python-modules/thumbor { }; 18957 18913 18958 18914 thumborPexif = self.buildPythonPackage rec { 18959 18915 name = "thumbor-pexif-0.14";