From 5f5a5ba58efdd2b5d524a647cc8a43dc7dbde38f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 28 Aug 2017 10:16:16 +0100 Subject: [PATCH] python.pkgs.piexif: fix build --- .../python-modules/piexif/default.nix | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/piexif/default.nix b/pkgs/development/python-modules/piexif/default.nix index e21593993cd2..2c921959852a 100644 --- a/pkgs/development/python-modules/piexif/default.nix +++ b/pkgs/development/python-modules/piexif/default.nix @@ -1,4 +1,4 @@ -{lib, buildPythonPackage, fetchurl, pillow}: +{ stdenv, buildPythonPackage, fetchPypi, pillow }: buildPythonPackage rec { name = "${pname}-${version}"; @@ -8,17 +8,23 @@ buildPythonPackage rec { # pillow needed for unit tests buildInputs = [ pillow ]; - # No .tar.gz source available at PyPI, only .zip source, so need to use - # fetchurl because fetchPypi doesn't support .zip. - src = fetchurl { - url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.zip"; + postPatch = '' + # incompatibility with pillow => 4.2.0 + # has been resolved in https://github.com/hMatoba/Piexif/commit/c3a8272f5e6418f223b25f6486d8ddda201bbdf1 + # remove this in the next version + sed -i -e 's/RGBA/RGB/' tests/s_test.py + ''; + + src = fetchPypi { + inherit pname version; + extension = "zip"; sha256 = "15dvdr7b5xxsbsq5k6kq8h0xnzrkqzc08dzlih48a21x27i02bii"; }; - meta = { + meta = with stdenv.lib; { description = "Simplify Exif manipulations with Python"; homepage = https://github.com/hMatoba/Piexif; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ jluttine ]; + license = licenses.mit; + maintainers = with maintainers; [ jluttine ]; }; }