about summary refs log tree commit diff
path: root/pkgs/applications/graphics/PythonMagick/default.nix
blob: 938df76e25725c9ce179c1502e9c49d4126d9ddf (plain) (blame)
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
# This expression provides Python bindings to ImageMagick. Python libraries are supposed to be called via `python-packages.nix`.

{ stdenv, fetchurl, python, pkgconfig, imagemagick, autoreconfHook }:

stdenv.mkDerivation rec {
  name = "pythonmagick-${version}";
  version = "0.9.16";

  src = fetchurl {
    url = "mirror://imagemagick/python/releases/PythonMagick-${version}.tar.xz";
    sha256 = "137278mfb5079lns2mmw73x8dhpzgwha53dyl00mmhj2z25varpn";
  };

  postPatch = ''
    rm configure
  '';

  configureFlags = [ "--with-boost=${python.pkgs.boost}" ];

  nativeBuildInputs = [ pkgconfig autoreconfHook ];
  buildInputs = [ python python.pkgs.boost imagemagick ];

  meta = with stdenv.lib; {
    homepage = http://www.imagemagick.org/script/api.php;
    license = licenses.imagemagick;
    description = "PythonMagick provides object oriented bindings for the ImageMagick Library.";
  };
}