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