* Add: imgcat
@ 2017-01-19 17:50 contact.ng0
2017-01-19 17:50 ` [PATCH] gnu: Add imgcat contact.ng0
0 siblings, 1 reply; 8+ messages in thread
From: contact.ng0 @ 2017-01-19 17:50 UTC (permalink / raw)
To: guix-devel
This adds imgcat, basically "cat for imagefiles".
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] gnu: Add imgcat.
2017-01-19 17:50 Add: imgcat contact.ng0
@ 2017-01-19 17:50 ` contact.ng0
2017-01-29 19:19 ` Kei Kebreau
0 siblings, 1 reply; 8+ messages in thread
From: contact.ng0 @ 2017-01-19 17:50 UTC (permalink / raw)
To: guix-devel; +Cc: ng0
From: ng0 <ng0@libertad.pw>
* gnu/packages/image-viewers.scm (imgcat): New variable.
---
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.
+ (("convert") convert))
+ #t)))
+ (replace 'build
+ (lambda _
+ (zero? (system* "cmake" "-D"
+ (string-append "CMAKE_INSTALL_PREFIX="
+ (assoc-ref %outputs "out"))
+ " " "."))
+ (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)))
--
2.11.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: Add imgcat.
2017-01-19 17:50 ` [PATCH] gnu: Add imgcat contact.ng0
@ 2017-01-29 19:19 ` Kei Kebreau
2017-01-29 21:14 ` ng0
0 siblings, 1 reply; 8+ messages in thread
From: Kei Kebreau @ 2017-01-29 19:19 UTC (permalink / raw)
To: contact.ng0; +Cc: guix-devel, ng0
[-- 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 --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: Add imgcat.
2017-01-29 19:19 ` Kei Kebreau
@ 2017-01-29 21:14 ` ng0
2017-01-29 21:32 ` imgcat, v2 contact.ng0
0 siblings, 1 reply; 8+ messages in thread
From: ng0 @ 2017-01-29 21:14 UTC (permalink / raw)
To: Kei Kebreau; +Cc: guix-devel
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/
^ permalink raw reply [flat|nested] 8+ messages in thread
* imgcat, v2.
2017-01-29 21:14 ` ng0
@ 2017-01-29 21:32 ` contact.ng0
2017-01-29 21:32 ` [PATCH] gnu: Add catimg contact.ng0
2017-01-29 21:36 ` imgcat, v2 ng0
0 siblings, 2 replies; 8+ messages in thread
From: contact.ng0 @ 2017-01-29 21:32 UTC (permalink / raw)
To: guix-devel
Fixed name in commit, edited the comments to clarify the not-obvious phases.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] gnu: Add catimg.
2017-01-29 21:32 ` imgcat, v2 contact.ng0
@ 2017-01-29 21:32 ` contact.ng0
2017-01-29 21:36 ` imgcat, v2 ng0
1 sibling, 0 replies; 8+ messages in thread
From: contact.ng0 @ 2017-01-29 21:32 UTC (permalink / raw)
To: guix-devel; +Cc: ng0
From: ng0 <ng0@libertad.pw>
* gnu/packages/image-viewers.scm (catimg): New variable.
---
gnu/packages/image-viewers.scm | 59 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index bc56041f8..05d39ba87 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,59 @@ 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"
+ ;; By replacing "convert", we also replace the "convert"
+ ;; in the message 'The version of convert is too old, don't
+ ;; expect good results :('. This should not happen, but in
+ ;; practice this error message should not affect us.
+ (("convert") convert))
+ #t)))
+ (replace 'build
+ (lambda _
+ (zero? (system* "cmake" "-D"
+ (string-append "CMAKE_INSTALL_PREFIX="
+ (assoc-ref %outputs "out"))
+ "."))
+ (zero? (system* "make"))))
+ (add-before 'install 'install-script
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; The bashscript lacks an file extension, we have to rename
+ ;; it so that the C program and the bash script can be happy
+ ;; side by side.
+ (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 bash 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)))
--
2.11.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: imgcat, v2.
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 ` ng0
2017-01-30 0:47 ` Kei Kebreau
1 sibling, 1 reply; 8+ messages in thread
From: ng0 @ 2017-01-29 21:36 UTC (permalink / raw)
To: guix-devel
contact.ng0@cryptolab.net writes:
> Fixed name in commit, edited the comments to clarify the not-obvious phases.
>
>
If the dependency on imagemagick is undesired, I can split it off
into two packages.
The C program doesn't need imagemagick, while the bash script
does. The quality in how they generate images differs according
to the upstream README.
--
ng0 -- https://www.inventati.org/patternsinthechaos/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: imgcat, v2.
2017-01-29 21:36 ` imgcat, v2 ng0
@ 2017-01-30 0:47 ` Kei Kebreau
0 siblings, 0 replies; 8+ messages in thread
From: Kei Kebreau @ 2017-01-30 0:47 UTC (permalink / raw)
To: ng0; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 646 bytes --]
ng0 <contact.ng0@cryptolab.net> writes:
> contact.ng0@cryptolab.net writes:
>
>> Fixed name in commit, edited the comments to clarify the not-obvious phases.
>>
>>
>
> If the dependency on imagemagick is undesired, I can split it off
> into two packages.
> The C program doesn't need imagemagick, while the bash script
> does. The quality in how they generate images differs according
> to the upstream README.
This patch looks good to me. According to the README the script produces
higher quality images, so we can keep the dependency on imagemagick.
Pushed to master as 9016dbc2bb469c31915c46cf8a1baecdfe022373. Thanks for
the cool package!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-01-30 0:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).