unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#30353] [PATCH] gnu: Add colormake.
@ 2018-02-05  6:30 Oleg Pykhalov
  2018-02-09 10:11 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Oleg Pykhalov @ 2018-02-05  6:30 UTC (permalink / raw)
  To: 30353

* gnu/packages/colorize.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add this.
---
 gnu/local.mk              |  1 +
 gnu/packages/colorize.scm | 83 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+)
 create mode 100644 gnu/packages/colorize.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 6fdea16c8..b8c860bc2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -102,6 +102,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/conkeror.scm			\
   %D%/packages/conky.scm			\
   %D%/packages/connman.scm			\
+  %D%/packages/colorize.scm			\
   %D%/packages/cook.scm				\
   %D%/packages/cpio.scm				\
   %D%/packages/cpp.scm 				\
diff --git a/gnu/packages/colorize.scm b/gnu/packages/colorize.scm
new file mode 100644
index 000000000..75e47d9a8
--- /dev/null
+++ b/gnu/packages/colorize.scm
@@ -0,0 +1,83 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages colorize)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages)
+  #:use-module (guix build-system trivial)
+  #:use-module (guix download)
+  #:use-module (guix licenses)
+  #:use-module (guix packages))
+
+(define-public colormake
+  (package
+    (name "colormake")
+    (version "0.9.20140503")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/pagekite/Colormake/archive/"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "08ldss9zd8ls6bjahvxhffpsjcysifr720yf3jz9db2mlklzmyd3"))))
+    (build-system trivial-build-system)
+    (native-inputs
+     `(("bash" ,bash)
+       ("gzip" ,gzip)
+       ("perl" ,perl)
+       ("tar" ,tar)))
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         ;; bootstrap
+         (setenv "PATH" (string-append
+                         (assoc-ref %build-inputs "tar") "/bin" ":"
+                         (assoc-ref %build-inputs "gzip") "/bin"))
+         (invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
+         (chdir (string-append (string-capitalize ,name) "-" ,version))
+         (patch-shebang  "colormake.pl"
+                         (list (string-append (assoc-ref %build-inputs "perl")
+                                              "/bin")))
+         (let* ((out (assoc-ref %outputs "out"))
+                (bin (string-append out "/bin"))
+                (doc (string-append out "/share/doc"))
+                (install-files (lambda (files directory)
+                                 (for-each (lambda (file)
+                                             (install-file file directory))
+                                           files))))
+           (substitute* "colormake"
+             (("colormake\\.pl") (string-append bin "/colormake.pl"))
+             (("/bin/bash")
+              (string-append (assoc-ref %build-inputs "bash") "/bin/sh")))
+           (install-file "colormake.1" (string-append doc "/man/man1"))
+           (install-files '("AUTHORS" "BUGS" "ChangeLog" "README") doc)
+           (install-files '("colormake" "colormake-short" "clmake"
+                            "clmake-short" "colormake.pl")
+                          bin)))))
+    (home-page "http://bre.klaki.net/programs/colormake/")
+    (synopsis "Simple wrapper around make to make it's output more readable")
+    (description "This package provides a simple wrapper around make to make
+it's output more readable.")
+    (license gpl2+)))
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#30353] [PATCH] gnu: Add colormake.
  2018-02-05  6:30 [bug#30353] [PATCH] gnu: Add colormake Oleg Pykhalov
@ 2018-02-09 10:11 ` Ludovic Courtès
  2018-02-09 20:50   ` Oleg Pykhalov
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2018-02-09 10:11 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 30353

Oleg Pykhalov <go.wigust@gmail.com> skribis:

> * gnu/packages/colorize.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add this.

[...]

> +    (home-page "http://bre.klaki.net/programs/colormake/")
> +    (synopsis "Simple wrapper around make to make it's output more readable")

Rather: “Wrapper around @command{make} to produce colored output”.

> +    (description "This package provides a simple wrapper around make to make
> +it's output more readable.")

Likewise.

Rather than create a new file, perhaps put it in code.scm?

OK with these changes, thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#30353] [PATCH] gnu: Add colormake.
  2018-02-09 10:11 ` Ludovic Courtès
@ 2018-02-09 20:50   ` Oleg Pykhalov
  0 siblings, 0 replies; 3+ messages in thread
From: Oleg Pykhalov @ 2018-02-09 20:50 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 30353, 30353-done

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

Hello Ludovic,

Thank you for review.

ludo@gnu.org (Ludovic Courtès) writes:

  >> +    (synopsis "Simple wrapper around make to make it's output more readable")
  > Rather: “Wrapper around @command{make} to produce colored output”.

  >> +    (description "…")
  > Likewise.

  > Rather than create a new file, perhaps put it in code.scm?

OK.

  > OK with these changes, thank you!

OK, I pushed as dc993847f1a2eed3c0e2b573ee7ad1974ffc3bd0 but I forgot
about description of the commit (is the same as the patch before).  :-\

Apologies.


I'll close the bug report.

Oleg.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-09 20:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-05  6:30 [bug#30353] [PATCH] gnu: Add colormake Oleg Pykhalov
2018-02-09 10:11 ` Ludovic Courtès
2018-02-09 20:50   ` Oleg Pykhalov

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).