unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kei Kebreau <kei@openmailbox.org>
To: contact.ng0@cryptolab.net
Cc: guix-devel@gnu.org, ng0 <ng0@libertad.pw>
Subject: Re: [PATCH] gnu: Add imgcat.
Date: Sun, 29 Jan 2017 14:19:34 -0500	[thread overview]
Message-ID: <874m0hznax.fsf@openmailbox.org> (raw)
In-Reply-To: <20170119175040.17403-2-contact.ng0@cryptolab.net> (contact's message of "Thu, 19 Jan 2017 17:50:40 +0000")

[-- Attachment #1: Type: text/plain, Size: 4072 bytes --]

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.

> +                 (("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.

> +             (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)))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2017-01-29 19:20 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 [this message]
2017-01-29 21:14     ` ng0
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=874m0hznax.fsf@openmailbox.org \
    --to=kei@openmailbox.org \
    --cc=contact.ng0@cryptolab.net \
    --cc=guix-devel@gnu.org \
    --cc=ng0@libertad.pw \
    /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).