diff mbox series

[bug#37603] gnu: Add aha.

Message ID 20191003141529.3940-1-wz@freeshell.de
State Accepted
Headers show
Series [bug#37603] gnu: Add aha. | expand

Commit Message

Wiktor Żelazny Oct. 3, 2019, 2:15 p.m. UTC
From: Wiktor Żelazny <wzelazny@vurv.cz>

* gnu/packages/textutils.scm (aha): new variable.
---
Hi, This is the first time that I’m submitting something that uses the
git-fetch method. I tried to follow the manual. Unfortunately, it does
not explain the role of this "0.9" string. I noticed that other
contributors use various values. I left it at "0.9".
 gnu/packages/textutils.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

Comments

vasilii.smirnov--- via Guix-patches" via Oct. 3, 2019, 2:47 p.m. UTC | #1
Wiktor,

Thanks for the patch!  This isn't a review, just an answer to your 
question:

Wiktor Żelazny 写道:
> Hi, This is the first time that I’m submitting something that 
> uses the
> git-fetch method. I tried to follow the manual. Unfortunately, 
> it does
> not explain the role of this "0.9" string. I noticed that other
> contributors use various values. I left it at "0.9".

It's not a random value; it's the last ‘real’ release, think of it 
as ‘release 0.9 + some more commits that were needed for some 
reason’.  If the project has never seen a release, ‘0.0.0’ is 
used.  You'll find that this is quite common, too.

At https://github.com/theZiz/aha/releases, we can see that the 
last release before this commit was ‘0.5’, so that's what you 
should use.

However: we prefer packaging releases, not arbitrary commits.  Why 
not package 0.5?  If it's because it's old (it is) and missing 
cool features, consider asking the author to cut a new release.

Whatever the case, please note the reason in a comment: ‘The last 
release 0.5 is missing the vital foo feature and/or crashes on 
Fridays’.

Since I'm here (still not a review! :-):

> +        (revision "1"))          ;Guix package revision

I know you probably copied this from elsewhere, but don't think 
this comment adds anything.

> +                (url "git://github.com/theZiz/aha.git")

Please use https:// instead of git://.

Kind regards,

T G-R
Wiktor Żelazny Oct. 4, 2019, 1:18 p.m. UTC | #2
On Thu, Oct 03, 2019 at 04:47:07PM +0200, Tobias Geerinckx-Rice wrote:

> Wiktor Żelazny 写道:
>
> > I tried to follow the manual. Unfortunately, it does not explain the
> > role of this "0.9" string.
>
> It's not a random value; it's the last ‘real’ release,

Hi Tobias,

Thank you for this explanation and for the other remarks. I noted them
down for future reference. The amended patch is on the way.

Have a nice weekend,

WŻ
diff mbox series

Patch

diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 79cf172179..1bf5a4fb1b 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -17,6 +17,7 @@ 
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2018 Meiyo Peng <meiyo.peng@gmail.com>
 ;;; Copyright © 2019 Yoshinori Arai <kumagusu08@gmail.com>
+;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1011,3 +1012,32 @@  instance one can add new syntax elements to markdown, etc.
 
 This package provides Python bindings.")
     (license license:bsd-3)))
+
+(define-public aha
+  (let ((commit "2592da4330b4df6d482a631f4a35543b96f4744d")
+        (revision "1"))          ;Guix package revision
+    (package
+      (name "aha")
+      (version (git-version "0.9" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+                (url "git://github.com/theZiz/aha.git")
+                (commit commit)))
+         (sha256
+          (base32
+           "0fq81ibxqg27b3860wmqd4zym2mymkr7sgvfhsyl0kb7ck367w4q"))
+         (file-name (git-file-name name version))))
+      (build-system gnu-build-system)
+      (arguments
+       '(#:phases (modify-phases %standard-phases (delete 'configure))
+         #:make-flags (list "CC=gcc"
+                            (string-append "PREFIX="
+                                           (assoc-ref %outputs "out")))
+         #:tests? #f)) ; no check target
+      (home-page "https://github.com/theZiz/aha")
+      (synopsis "Ansi HTML Adapter")
+      (description "@code{aha} converts ANSI escape sequences of a Unix terminal
+to HTML code.")
+      (license (list license:lgpl2.0+ license:mpl1.1)))))