summary refs log tree commit diff
path: root/gnu/packages/image.scm
diff options
context:
space:
mode:
authorArun Isaac <arunisaac@systemreboot.net>2016-09-26 01:58:32 +0530
committerKei Kebreau <kei@openmailbox.org>2016-09-25 16:53:00 -0400
commit93117227034666db18c8b0c7fd89cca72a3eeca8 (patch)
tree042a02a8113377ec4b7ddc80a32df531907d73c3 /gnu/packages/image.scm
parent5babe521c8adc722c2411b255cbeeef308339d06 (diff)
downloadguix-93117227034666db18c8b0c7fd89cca72a3eeca8.tar.gz
gnu: Add optipng.
* gnu/packages/image.scm (optipng): New variable.

Signed-off-by: Kei Kebreau <kei@openmailbox.org>
Diffstat (limited to 'gnu/packages/image.scm')
-rw-r--r--gnu/packages/image.scm33
1 files changed, 33 insertions, 0 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 931cad1a6d..4039c1a00b 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -932,3 +933,35 @@ statistical tests.")
 all included libraries only the image loading and decoding library is
 installed as @code{stb_image}.")
       (license license:public-domain))))
+
+(define-public optipng
+  (package
+    (name "optipng")
+    (version "0.7.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://prdownloads.sourceforge.net/optipng/optipng-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "105yk5qykvhiahzag67gm36s2kplxf6qn5hay02md0nkrcgn6w28"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("zlib" ,zlib)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; configure script does not accept arguments CONFIG_SHELL and SHELL
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (zero? (system* "sh" "configure"
+                             (string-append "--prefix=" (assoc-ref outputs "out")))))))))
+    (synopsis "Optimizer that recompresses PNG image files to a
+smaller size")
+    (description "OptiPNG is a PNG optimizer that recompresses image
+files to a smaller size, without losing any information.  This program
+also converts external formats (BMP, GIF, PNM and TIFF) to optimized
+PNG, and performs PNG integrity checks and corrections.")
+    (home-page "http://optipng.sourceforge.net/")
+    (license license:zlib)))