1{ buildPythonPackage 2, exempi 3, fetchFromGitHub 4, mock 5, pytz 6, lib, stdenv 7}: 8 9buildPythonPackage { 10 pname = "python-xmp-toolkit"; 11 version = "2.0.2"; 12 13 # PyPi has version 2.0.1; the tests fail 14 # There are commits for a 2.0.2 release that was never published 15 # Not to github, not to PyPi 16 # This is the latest commit from Jun 29, 2017 (as of Mar 13, 2019) 17 # It includes the commits for the unreleased version 2.0.2 and more 18 # Tests pass with this version 19 src = fetchFromGitHub { 20 owner = "python-xmp-toolkit"; 21 repo = "python-xmp-toolkit"; 22 rev = "5692bdf8dac3581a0d5fb3c5aeb29be0ab6a54fc"; 23 sha256 = "16bylcm183ilzp7mrpdzw0pzp6csv9v5v247914qsv2abg0hgl5y"; 24 }; 25 26 buildInputs = [ exempi ]; 27 28 propagatedBuildInputs = [ pytz ]; 29 30 postPatch = '' 31 substituteInPlace libxmp/exempi.py \ 32 --replace "ctypes.util.find_library('exempi')" "'${exempi}/lib/libexempi${stdenv.hostPlatform.extensions.sharedLibrary}'" 33 ''; 34 35 # hangs on darwin + sandbox 36 doCheck = !stdenv.isDarwin; 37 38 preCheck = '' 39 rm test/{test_exempi,test_files}.py 40 ''; 41 42 meta = with lib; { 43 homepage = "https://github.com/python-xmp-toolkit/python-xmp-toolkit"; 44 description = "Python XMP Toolkit for working with metadata"; 45 license = licenses.bsd3; 46 maintainers = [ maintainers.kiwi ]; 47 }; 48}