mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 02:03:01 +00:00
ced21f5e1a
The `buildPython*` function computes name from `pname` and `version`. This change removes `name` attribute from all expressions in `pkgs/development/python-modules`. While at it, some other minor changes were made as well, such as replacing `fetchurl` calls with `fetchPypi`.
51 lines
1.0 KiB
Nix
51 lines
1.0 KiB
Nix
{ stdenv
|
|
, lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, imagemagick
|
|
, pytest
|
|
, psutil
|
|
, memory_profiler
|
|
, pytest_xdist
|
|
}:
|
|
|
|
let
|
|
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";
|
|
version = "0.4.4";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "28e0454c9d16d69c5d5034918d96320d8f9f1377b4fdaf4944eec2f938c74704";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|