diff --git a/pkgs/applications/graphics/graphicsmagick/compat.nix b/pkgs/applications/graphics/graphicsmagick/compat.nix new file mode 100644 index 000000000000..bd1ce2ed893a --- /dev/null +++ b/pkgs/applications/graphics/graphicsmagick/compat.nix @@ -0,0 +1,37 @@ +{ stdenv, graphicsmagick }: + +stdenv.mkDerivation rec { + name = "graphicsmagick-imagemagick-compat-${version}"; + inherit (graphicsmagick) version; + + unpackPhase = "true"; + buildPhase = "true"; + + utils = [ + "composite" + "conjure" + "convert" + "identify" + "mogrify" + "montage" + "animate" + "display" + "import" + ]; + + # TODO: symlink libraries? + installPhase = '' + mkdir -p "$out"/bin + mkdir -p "$out"/share/man/man1 + for util in ''${utils[@]}; do + ln -s ${graphicsmagick}/bin/gm "$out/bin/$util" + ln -s ${graphicsmagick}/share/man/man1/gm.1.gz "$out/share/man/man1/$util.1.gz" + done + ''; + + meta = { + description = "ImageMagick interface for GraphicsMagick"; + license = stdenv.lib.licenses.free; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/applications/graphics/graphicsmagick/default.nix b/pkgs/applications/graphics/graphicsmagick/default.nix index 4258d91b42af..872afb39ec6f 100644 --- a/pkgs/applications/graphics/graphicsmagick/default.nix +++ b/pkgs/applications/graphics/graphicsmagick/default.nix @@ -2,10 +2,9 @@ , libjpeg, libpng, libtiff, libxml2, zlib, libtool, xz, libX11 , libwebp, quantumdepth ? 8, fixDarwinDylibNames }: -let version = "1.3.29"; in - -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "graphicsmagick-${version}"; + version = "1.3.29"; src = fetchurl { url = "mirror://sourceforge/graphicsmagick/GraphicsMagick-${version}.tar.xz"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d6759098dfaa..1079126521e8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16142,6 +16142,8 @@ with pkgs; graphicsmagick = callPackage ../applications/graphics/graphicsmagick { }; graphicsmagick_q16 = callPackage ../applications/graphics/graphicsmagick { quantumdepth = 16; }; + graphicsmagick-imagemagick-compat = callPackage ../applications/graphics/graphicsmagick/compat.nix { }; + grisbi = callPackage ../applications/office/grisbi { gtk = gtk2; }; gtkpod = callPackage ../applications/audio/gtkpod { };