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