+
+(define-public metapixel
+ ;; Follow stable branch.
+ (let ((commit "98ee9daa093b6c334941242e63f90b1c2876eb4f"))
+ (package
+ (name "metapixel")
+ (version (git-version "1.0.2" "1" commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/schani/metapixel")
+ (commit commit)
+ ;; TODO: Package rwimg and lispreader?
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0r7n3a6bvcxkbpda4mwmrpicii09iql5z69nkjqygkwxw7ny3309"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("giflib" ,giflib)
+ ("libjpeg" ,libjpeg-turbo)
+ ("libpng" ,libpng)
+ ("perl" ,perl)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("docbook-xml" ,docbook-xml)
+ ("docbook-xsl" ,docbook-xsl)
+ ("xsltproc" ,libxslt)))
+ (arguments
+ `(#:tests? #f ; No tests.
+ #:make-flags (list
+ (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ (string-append "MANPAGE_XSL="
+ (assoc-ref %build-inputs "docbook-xsl")
+ "/xml/xsl/docbook-xsl-*/manpages/docbook.xsl"))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'install 'make-local-docbook-xml
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "metapixel.xml"
+ (("http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd")
+ (string-append (assoc-ref inputs "docbook-xml")
+ "/xml/dtd/docbook/docbookx.dtd")))
+ #t))
+ (add-before 'install 'fix-directory-creation
+ (lambda* (#:key outputs #:allow-other-keys)
+ (mkdir-p (string-append (assoc-ref outputs "out") "/share/man/man1"))
+ #t)))))
+ (home-page "https://www.complang.tuwien.ac.at/schani/metapixel/")
+ (synopsis "Photomosaics generator")
+ (description "Metapixel is a program for generating photomosaics. It can
+generate classical photomosaics, in which the source image is viewed as a
+matrix of equally sized rectangles for each of which a matching image is
+substituted, as well as collage-style photomosaics, in which rectangular parts
+of the source image at arbitrary positions (i.e. not aligned to a matrix) are
+substituted by matching images.")
+ (license license:gpl2))))
+
+(define-public scantailor-advanced
+ (let ((commit "3d1e74e6ace413733511086934a66f4e3f7a6027"))
+ (package
+ (name "scantailor-advanced")
+ (version (string-append "1.0.16-" (string-take commit 7)))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/4lex4/scantailor-advanced")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0kixwjb2x457dq7927hkh34c803p7yh1pmn6n61rk9shqrcg492h"))))
+ (build-system qt-build-system)
+ (native-inputs
+ `(("qttools" ,qttools)))
+ (inputs
+ `(("boost" ,boost)
+ ("libjpeg" ,libjpeg-turbo)
+ ("libpng" ,libpng)
+ ("libtiff" ,libtiff)
+ ("qtbase" ,qtbase)
+ ("qtsvg" ,qtsvg)
+ ("zlib" ,zlib)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; Some tests require a display and fail with offscreen mode.
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (setenv "ARGS" "--exclude-regex \"imageproc_.*\"")
+ #t)))))
+ (home-page "https://github.com/4lex4/scantailor-advanced")
+ (synopsis "Clean up scanned pages")
+ (description "Scan Tailor is an interactive post-processing tool for
+scanned pages. It performs operations such as page splitting, deskewing,
+adding/removing borders, and others. You give it raw scans, and you get pages
+ready to be printed or assembled into a PDF or DJVU file. Scanning, optical
+character recognition, and assembling multi-page documents are out of scope of
+this project.
+
+Scan Tailer Advanced is a fork of Scan Tailer that merges Scan Tailor Featured
+and Scan Tailor Enhanced versions as well as including many more bug fixes.")
+ (license license:gpl3+))))
+
+(define-public stiff
+ (package
+ (name "stiff")
+ (version "2.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.astromatic.net/download/stiff/stiff-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "14m92dskzw7bwsr64ha4p0mj3ndv13gwcbfic3qxrs3zq5353s7l"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("libtiff" ,libtiff)
+ ("zlib" ,zlib)
+ ("libjpeg-turbo" ,libjpeg-turbo)))
+ (home-page "https://www.astromatic.net/software/stiff")
+ (synopsis "Convert scientific FITS images to TIFF format")
+ (description
+ "STIFF is a program that converts scientific @acronym{FITS, Flexible Image
+Transport System} images to the more popular TIFF format for illustration
+purposes.")
+ (license license:gpl3+)))