From: ng0 <contact.ng0@cryptolab.net>
To: Kei Kebreau <kei@openmailbox.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add imgcat.
Date: Sun, 29 Jan 2017 21:14:58 +0000 [thread overview]
Message-ID: <87sho1d0vh.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <874m0hznax.fsf@openmailbox.org>
Kei Kebreau <kei@openmailbox.org> writes:
> contact.ng0@cryptolab.net writes:
>
>> From: ng0 <ng0@libertad.pw>
>>
>> * gnu/packages/image-viewers.scm (imgcat): New variable.
> You mean catimg, yes?
>> ---
>> gnu/packages/image-viewers.scm | 54 ++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 54 insertions(+)
>>
>> diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
>> index bc56041f8..1559e6668 100644
>> --- a/gnu/packages/image-viewers.scm
>> +++ b/gnu/packages/image-viewers.scm
>> @@ -4,6 +4,7 @@
>> ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
>> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
>> ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
>> +;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
>> ;;;
>> ;;; This file is part of GNU Guix.
>> ;;;
>> @@ -25,6 +26,7 @@
>> #:use-module (guix download)
>> #:use-module (guix packages)
>> #:use-module (guix build-system gnu)
>> + #:use-module (guix build-system cmake)
>> #:use-module (gnu packages autotools)
>> #:use-module (gnu packages base)
>> #:use-module (gnu packages curl)
>> @@ -33,6 +35,7 @@
>> #:use-module (gnu packages gnome)
>> #:use-module (gnu packages gtk)
>> #:use-module (gnu packages image)
>> + #:use-module (gnu packages imagemagick)
>> #:use-module (gnu packages photo)
>> #:use-module (gnu packages pkg-config)
>> #:use-module (gnu packages xorg))
>> @@ -205,3 +208,54 @@ your images. Among its features are:
>> @item Configurable mouse actions
>> @end enumerate\n")
>> (license license:gpl3+)))
>> +
>> +(define-public catimg
>> + (package
>> + (name "catimg")
>> + (version "2.2.1")
>> + (source
>> + (origin
>> + (method url-fetch)
>> + (uri (string-append "https://github.com/posva/catimg/archive"
>> + "/v" version ".tar.gz"))
>> + (file-name (string-append name "-" version ".tar.gz"))
>> + (sha256
>> + (base32
>> + "14g90zwh2d3s13hgyxypx2vc0rj1g58l6zcxhgc84wsyxfxd6xpb"))))
>> + (build-system cmake-build-system)
>> + (arguments
>> + `(#:tests? #f ; no check target
>> + #:phases
>> + (modify-phases %standard-phases
>> + (replace 'configure
>> + (lambda* (#:key inputs #:allow-other-keys)
>> + (let* ((magic (assoc-ref %build-inputs "imagemagick"))
>> + (convert (string-append magic "/bin/convert")))
>> + (substitute* "catimg"
>> + ;; FIME: The message 'The version of convert'(…)
>> + ;; gets substituted too, we should revert this.
>
> I'm not sure what to do here, though the message should never appear
> when using the officially packaged version of imagemagick that you refer
> to here.
I'm no imagemagick user, so I can't debug the cause of this
message. The practical reasons: the application works as
intended, despite any error messages.
>> + (("convert") convert))
>> + #t)))
>> + (replace 'build
>> + (lambda _
>> + (zero? (system* "cmake" "-D"
>> + (string-append "CMAKE_INSTALL_PREFIX="
>> + (assoc-ref %outputs "out"))
>> + " " "."))
>
> The " " string isn't necessary here; system* adds its own spaces between
> its arguments.
Ok.
>> + (zero? (system* "make"))))
>> + (add-before 'install 'install-script
>> + (lambda* (#:key outputs #:allow-other-keys)
>> + (let* ((out (assoc-ref outputs "out"))
>> + (bin (string-append out "/bin")))
>> + (install-file "catimg" bin)
>> + (rename-file (string-append bin "/catimg")
>> + (string-append bin "/catimg.sh"))
>> + #t))))))
>> + (inputs
>> + `(("imagemagick" ,imagemagick))) ; For the script version
>> + (home-page "https://github.com/posva/catimg")
>> + (synopsis "Render images in the terminal")
>> + (description
>> + "Catimg is a little program that prints images in the terminal.
>> +It supports JPEG, PNG and GIF formats.")
>> + (license license:expat)))
Thanks!
--
ng0 -- https://www.inventati.org/patternsinthechaos/
next prev parent reply other threads:[~2017-01-29 21:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 17:50 Add: imgcat contact.ng0
2017-01-19 17:50 ` [PATCH] gnu: Add imgcat contact.ng0
2017-01-29 19:19 ` Kei Kebreau
2017-01-29 21:14 ` ng0 [this message]
2017-01-29 21:32 ` imgcat, v2 contact.ng0
2017-01-29 21:32 ` [PATCH] gnu: Add catimg contact.ng0
2017-01-29 21:36 ` imgcat, v2 ng0
2017-01-30 0:47 ` Kei Kebreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sho1d0vh.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me \
--to=contact.ng0@cryptolab.net \
--cc=guix-devel@gnu.org \
--cc=kei@openmailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).