about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/graphics/PythonMagick/default.nix
blob: 487648d07ca1af63a7ad8b882e6eed9223335a47 (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 {
  pname = "pythonmagick";
  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.";
  };
}