diff mbox series

[bug#38480] gnu: Add lolcat

Message ID fa8f7a346d9f190892f49e1538ed909d184c1412.camel@student.tugraz.at
State Accepted
Headers show
Series [bug#38480] gnu: Add lolcat | expand

Commit Message

Leo Prikler Dec. 5, 2019, 5:41 p.m. UTC
Hi Brett,

Am Dienstag, den 03.12.2019, 21:00 -0600 schrieb Brett Gilio:
> Leo Prikler <leo.prikler@student.tugraz.at> writes:
> 
> > +       `(#:tests? #f ;; tests don't exist
> 
> LGTM! Though, perhaps an aesthetic issue. I usually prefer (and see)
> "no check target". Carry on!
Fair enough, I've adapted the patch.

Regards,
Leo

Comments

Ludovic Courtès Dec. 14, 2019, 11:28 p.m. UTC | #1
Hello!

Leo Prikler <leo.prikler@student.tugraz.at> skribis:

> From: Leo Prikler <leo.prikler@student.tugraz.at>
> Date: Wed,  4 Dec 2019 02:46:44 +0100
> Subject: [PATCH] gnu: Add lolcat
>
> * gnu/packages/games.scm (lolcat): New package.

[...]

> +           (replace 'install
> +             (lambda* (#:key outputs #:allow-other-keys)
> +               (let ((dest (map (lambda (path) (string-append path "/bin"))
> +                                (list (assoc-ref outputs "out")
> +                                      (assoc-ref outputs "censor")))))
> +                 (for-each mkdir-p dest)
> +                 (install-file "lolcat" (car dest))
> +                 (install-file "censor" (cadr dest))
> +                 #t))))))
> +      (outputs (list "out" "censor"))

Can’t we keep them both in the same output?  Separate outputs are
normally only used when it helps save space, but I don’t think that’s a
concern here.  :-)

> +      (home-page "https://github.com/jaseg/lolcat")
> +      (synopsis "Rainbow coloring effect for text console display")
> +      (description "Lolcat concatenates files and streams like regular cat,
                       ^                                                  ^
Maybe @command{cat} and @command{lolcat}.

Could you send an updated patch?

Thanks,
Ludo’.
diff mbox series

Patch

From: Leo Prikler <leo.prikler@student.tugraz.at>
Date: Wed,  4 Dec 2019 02:46:44 +0100
Subject: [PATCH] gnu: Add lolcat

* gnu/packages/games.scm (lolcat): New package.
---
 gnu/packages/games.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 8dd08844ee..b15016e4bb 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -498,6 +498,47 @@  cows can think too: all you have to do is run @comma=
nd{cowthink}.  If you're
 tired of cows, a variety of other ASCII-art messengers are available.")
     (license license:gpl3+)))

+(define-public lolcat
+  (let ((commit "35dca3d0a381496d7195cd78f5b24aa7b62f2154")
+        (revision "0"))
+    (package
+      (name "lolcat")
+      (version (git-version "1.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/jaseg/lolcat.git")
+               (commit commit)))
+         (sha256
+          (base32
+           "0jjbkqcc2ikjxd1xgdyv4rb0vsw218181h89f2ywg29ffs3ypd8g"))
+         (file-name (git-file-name name version))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ;; no check target
+         #:make-flags (list "CC=gcc")
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'bootstrap)
+           (delete 'configure)
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((dest (map (lambda (path) (string-append path "/bin"))
+                                (list (assoc-ref outputs "out")
+                                      (assoc-ref outputs "censor")))))
+                 (for-each mkdir-p dest)
+                 (install-file "lolcat" (car dest))
+                 (install-file "censor" (cadr dest))
+                 #t))))))
+      (outputs (list "out" "censor"))
+      (home-page "https://github.com/jaseg/lolcat")
+      (synopsis "Rainbow coloring effect for text console display")
+      (description "Lolcat concatenates files and streams like regular cat,
+but it also adds terminal escape codes between characters and lines resulting
+in a rainbow effect.")
+      (license license:wtfpl2))))
+
 (define-public freedoom
   (package
     (name "freedoom")
--
2.24.0