nixpkgs/pkgs/development/python-modules/Wand/default.nix

51 lines
1.0 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, buildPythonPackage
, fetchPypi
, imagemagick
, pytest
, psutil
, memory_profiler
, pytest_xdist
}:
let
2017-09-12 12:36:41 -07:00
soext = stdenv.hostPlatform.extensions.sharedLibrary;
magick_wand_library = "${imagemagick}/lib/libMagickWand-6.Q16${soext}";
imagemagick_library = "${imagemagick}/lib/libMagickCore-6.Q16${soext}";
in buildPythonPackage rec {
pname = "Wand";
2018-11-20 02:58:34 -08:00
version = "0.4.5";
src = fetchPypi {
inherit pname version;
2018-11-20 02:58:34 -08:00
sha256 = "b40a2215545e8c7193b3fccd6e7251dc556ec9b878a4f67d992b056ff396bc65";
};
checkInputs = [ pytest pytest_xdist memory_profiler psutil ];
buildInputs = [ imagemagick ];
patches = [
./libraries.patch
];
inherit magick_wand_library imagemagick_library;
postPatch = ''
substituteAllInPlace wand/api.py
'';
# No tests
doCheck = false;
meta = {
description = "Ctypes-based simple MagickWand API binding for Python";
homepage = http://wand-py.org/;
license = with lib.licenses; [ mit ];
};
passthru = {
inherit imagemagick;
};
}