at master 1.3 kB view raw
1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 fetchPypi, 6 imagemagickBig, 7 py, 8 pytestCheckHook, 9}: 10 11buildPythonPackage rec { 12 pname = "wand"; 13 version = "0.6.13"; 14 format = "setuptools"; 15 16 src = fetchPypi { 17 pname = "Wand"; 18 inherit version; 19 hash = "sha256-9QE0hOr3og6yLRghqu/mC1DMMpciNytfhWXUbUqq/Mo="; 20 }; 21 22 postPatch = '' 23 substituteInPlace wand/api.py --replace \ 24 "magick_home = os.environ.get('MAGICK_HOME')" \ 25 "magick_home = '${imagemagickBig}'" 26 ''; 27 28 nativeCheckInputs = [ 29 py 30 pytestCheckHook 31 ]; 32 33 disabledTests = [ 34 # https://github.com/emcconville/wand/issues/558 35 "test_forward_fourier_transform" 36 "test_inverse_fourier_transform" 37 # our imagemagick doesn't set MagickReleaseDate 38 "test_configure_options" 39 ] 40 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 41 # AssertionError: assert wand.color.Color('srgb(255,0,1.41553e-14)') == wand.color.Color('srgb(255,0,0)') 42 "test_sparse_color" 43 ]; 44 45 passthru.imagemagick = imagemagickBig; 46 47 meta = with lib; { 48 changelog = "https://docs.wand-py.org/en/${version}/changes.html"; 49 description = "Ctypes-based simple MagickWand API binding for Python"; 50 homepage = "http://wand-py.org/"; 51 license = [ licenses.mit ]; 52 maintainers = with maintainers; [ dotlambda ]; 53 }; 54}