about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/graphics/PythonMagick/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/graphics/PythonMagick/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/graphics/PythonMagick/default.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/graphics/PythonMagick/default.nix b/nixpkgs/pkgs/applications/graphics/PythonMagick/default.nix
new file mode 100644
index 000000000000..487648d07ca1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/graphics/PythonMagick/default.nix
@@ -0,0 +1,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.";
+  };
+}