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