GNU bug report logs - #52189
[PATCH] gnu: Add notcurses

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Blake Shaw <blake@HIDDEN>; Keywords: patch; dated Tue, 30 Nov 2021 00:27:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 52189 <at> debbugs.gnu.org:


Received: (at 52189) by debbugs.gnu.org; 1 Dec 2021 16:01:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 01 11:01:17 2021
Received: from localhost ([127.0.0.1]:45313 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1msS2n-0006gC-AQ
	for submit <at> debbugs.gnu.org; Wed, 01 Dec 2021 11:01:17 -0500
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:49061)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1msS2k-0006ZQ-Vy
 for 52189 <at> debbugs.gnu.org; Wed, 01 Dec 2021 11:01:15 -0500
Received: (Authenticated sender: admin@HIDDEN)
 by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 58158FF80C;
 Wed,  1 Dec 2021 16:01:08 +0000 (UTC)
From: Nicolas Goaziou <mail@HIDDEN>
To: Blake Shaw via Guix-patches via <guix-patches@HIDDEN>
Subject: Re: [bug#52189] [PATCH] gnu: Add notcurses
References: <6a6031ead6f9f61bc8eed976374638089efdaf3f.1638231894.git.blake@HIDDEN>
Date: Wed, 01 Dec 2021 17:01:07 +0100
In-Reply-To: <6a6031ead6f9f61bc8eed976374638089efdaf3f.1638231894.git.blake@HIDDEN>
 (Blake Shaw via Guix-patches via's message of "Tue, 30 Nov 2021
 07:24:54 +0700")
Message-ID: <87r1awxqkc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 52189
Cc: 52189 <at> debbugs.gnu.org, Blake Shaw <blake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hello,

Blake Shaw via Guix-patches via <guix-patches@HIDDEN> writes:

Thank you. Some comments follow.

>  gnu/packages/notcurses.scm | 71 ++++++++++++++++++++++++++++++++++++++

I don't think we should create a new file just for this package. Also,
new files need to be registered in "gnu/local.mk".

Maybe this should go into... "ncurses.scm" (!). At a later time, we may
rename ncurse.scm into tui.scm or some such.

> +(define-public notcurses
> +  (let ((commit "d15eb6003cbd65f11163916261cf6cd5600c77fa"))

Upstream use tags. It might be more readable. You'll need a variable for
the code name, tho. In any case, a comment is warranted explaining the
situation.

> +         (sha256
> +          (base32
> +           "10jf6iai1r0xafrgaz978y9bqlaw1gvd11gc0yynwwp6rcs97g17"))))

Nitpick: string should go on the same line as base32.

> +      (build-system cmake-build-system)
> +      (arguments
> +       `(#:tests? #f
> +                  #:build-type "-DVAR=val"

Indentation is off. You may want to use "etc/indent-code.el" script.
The build-type value above is suspicious.

> +                  #:make-flags
> +                  (list
> +                   (string-append "prefix="
> +                                  (assoc-ref %outputs "out"))
> +                   "CC=gcc")

This is not cross-compilation friendly. The above should be:

  (list ,(string-append "CC=" (cc-for-target))
        (string-append "prefix=" ...))

> +                  #:configure-flags
> +                  (map (lambda (s)
> +                         (string-append "-D" s))
> +                       '("USE_CPP=off"     "USE_COVERAGE=off"
> +                         "USE_DOXYGEN=off" "USE_DOCTEST=off"
> +                         "USE_GPM=off"     "USE_MULTIMEDIA=ffmpeg"
> +                         "USE_PANDOC=off"  "FSG_BUILD=ON"))
> +                  #:phases
> +                  (modify-phases %standard-phases
> +                    (add-before 'build 'patch-makefile-shell
> +                      (lambda _
> +                        (setenv "HOME" "/tmp")))

Is the phase above required for tests? If so, could you add a comment
about it?

> +                    (add-before 'build 'set-prefix-in-makefile
> +                      (lambda* (#:key outputs #:allow-other-keys)
> +                        (let ((out (assoc-ref outputs "out")))
> +                          (substitute* "Makefile"
> +                            (("PREFIX =.*")
> +                             (string-append "PREFIX = " out "\n")))
> +                          #true))))))

The trailing #true is not required anywore. You can drop it.

> +      (native-inputs
> +       `(("ncurses" ,ncurses)
> +         ("gcc-toolchain" ,gcc-10)

Could you explain why gcc-10 must be used?

> +         ("pkg-config" ,pkg-config)))
> +      (inputs
> +       `(("zlib" ,zlib)
> +         ("ffmpeg" ,ffmpeg)
> +         ("libunistring" ,libunistring)))

Pleas order inputs alphabetically.

> +      (synopsis "Not-ncurses: A library facilitating complex TUIs on modern terminals")

I suggest:

  "Library for building textual user interfaces on modern terminals"

> +      (description "Supporting vivid colors, multimedia, threads, & Unicode to the max.")

The description is not terribly useful, and sounds like an ad. Maybe:

  Notcurses is a library for building complex, textual user interfaces
  (TUIs) on modern terminal emulators. It does not use Ncurses, though
  it does make use of libtinfo from that package.

The second sentence above may even be dropped. Up to you.

Could you send an updated patch?

Regards,
-- 
Nicolas Goaziou




Information forwarded to guix-patches@HIDDEN:
bug#52189; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 Dec 2021 16:01:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 01 11:01:18 2021
Received: from localhost ([127.0.0.1]:45315 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1msS2n-0006gc-OJ
	for submit <at> debbugs.gnu.org; Wed, 01 Dec 2021 11:01:18 -0500
Received: from lists.gnu.org ([209.51.188.17]:51212)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1msS2l-0006eU-As
 for submit <at> debbugs.gnu.org; Wed, 01 Dec 2021 11:01:15 -0500
Received: from eggs.gnu.org ([209.51.188.92]:56132)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>)
 id 1msS2k-0007di-Ez
 for guix-patches@HIDDEN; Wed, 01 Dec 2021 11:01:15 -0500
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:40203)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>)
 id 1msS2h-0007lP-DX
 for guix-patches@HIDDEN; Wed, 01 Dec 2021 11:01:13 -0500
Received: (Authenticated sender: admin@HIDDEN)
 by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 58158FF80C;
 Wed,  1 Dec 2021 16:01:08 +0000 (UTC)
From: Nicolas Goaziou <mail@HIDDEN>
To: Blake Shaw via Guix-patches via <guix-patches@HIDDEN>
Subject: Re: [bug#52189] [PATCH] gnu: Add notcurses
References: <6a6031ead6f9f61bc8eed976374638089efdaf3f.1638231894.git.blake@HIDDEN>
Date: Wed, 01 Dec 2021 17:01:07 +0100
In-Reply-To: <6a6031ead6f9f61bc8eed976374638089efdaf3f.1638231894.git.blake@HIDDEN>
 (Blake Shaw via Guix-patches via's message of "Tue, 30 Nov 2021
 07:24:54 +0700")
Message-ID: <87r1awxqkc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=217.70.183.199;
 envelope-from=mail@HIDDEN; helo=relay9-d.mail.gandi.net
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7,
 RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
Cc: 52189 <at> debbugs.gnu.org, Blake Shaw <blake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

Hello,

Blake Shaw via Guix-patches via <guix-patches@HIDDEN> writes:

Thank you. Some comments follow.

>  gnu/packages/notcurses.scm | 71 ++++++++++++++++++++++++++++++++++++++

I don't think we should create a new file just for this package. Also,
new files need to be registered in "gnu/local.mk".

Maybe this should go into... "ncurses.scm" (!). At a later time, we may
rename ncurse.scm into tui.scm or some such.

> +(define-public notcurses
> +  (let ((commit "d15eb6003cbd65f11163916261cf6cd5600c77fa"))

Upstream use tags. It might be more readable. You'll need a variable for
the code name, tho. In any case, a comment is warranted explaining the
situation.

> +         (sha256
> +          (base32
> +           "10jf6iai1r0xafrgaz978y9bqlaw1gvd11gc0yynwwp6rcs97g17"))))

Nitpick: string should go on the same line as base32.

> +      (build-system cmake-build-system)
> +      (arguments
> +       `(#:tests? #f
> +                  #:build-type "-DVAR=val"

Indentation is off. You may want to use "etc/indent-code.el" script.
The build-type value above is suspicious.

> +                  #:make-flags
> +                  (list
> +                   (string-append "prefix="
> +                                  (assoc-ref %outputs "out"))
> +                   "CC=gcc")

This is not cross-compilation friendly. The above should be:

  (list ,(string-append "CC=" (cc-for-target))
        (string-append "prefix=" ...))

> +                  #:configure-flags
> +                  (map (lambda (s)
> +                         (string-append "-D" s))
> +                       '("USE_CPP=off"     "USE_COVERAGE=off"
> +                         "USE_DOXYGEN=off" "USE_DOCTEST=off"
> +                         "USE_GPM=off"     "USE_MULTIMEDIA=ffmpeg"
> +                         "USE_PANDOC=off"  "FSG_BUILD=ON"))
> +                  #:phases
> +                  (modify-phases %standard-phases
> +                    (add-before 'build 'patch-makefile-shell
> +                      (lambda _
> +                        (setenv "HOME" "/tmp")))

Is the phase above required for tests? If so, could you add a comment
about it?

> +                    (add-before 'build 'set-prefix-in-makefile
> +                      (lambda* (#:key outputs #:allow-other-keys)
> +                        (let ((out (assoc-ref outputs "out")))
> +                          (substitute* "Makefile"
> +                            (("PREFIX =.*")
> +                             (string-append "PREFIX = " out "\n")))
> +                          #true))))))

The trailing #true is not required anywore. You can drop it.

> +      (native-inputs
> +       `(("ncurses" ,ncurses)
> +         ("gcc-toolchain" ,gcc-10)

Could you explain why gcc-10 must be used?

> +         ("pkg-config" ,pkg-config)))
> +      (inputs
> +       `(("zlib" ,zlib)
> +         ("ffmpeg" ,ffmpeg)
> +         ("libunistring" ,libunistring)))

Pleas order inputs alphabetically.

> +      (synopsis "Not-ncurses: A library facilitating complex TUIs on modern terminals")

I suggest:

  "Library for building textual user interfaces on modern terminals"

> +      (description "Supporting vivid colors, multimedia, threads, & Unicode to the max.")

The description is not terribly useful, and sounds like an ad. Maybe:

  Notcurses is a library for building complex, textual user interfaces
  (TUIs) on modern terminal emulators. It does not use Ncurses, though
  it does make use of libtinfo from that package.

The second sentence above may even be dropped. Up to you.

Could you send an updated patch?

Regards,
-- 
Nicolas Goaziou




Information forwarded to guix-patches@HIDDEN:
bug#52189; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 30 Nov 2021 00:26:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 29 19:26:42 2021
Received: from localhost ([127.0.0.1]:39818 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mrqyo-0006ej-FV
	for submit <at> debbugs.gnu.org; Mon, 29 Nov 2021 19:26:42 -0500
Received: from lists.gnu.org ([209.51.188.17]:54212)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <blake@HIDDEN>) id 1mrqxs-0006d1-UV
 for submit <at> debbugs.gnu.org; Mon, 29 Nov 2021 19:25:45 -0500
Received: from eggs.gnu.org ([209.51.188.92]:49508)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <blake@HIDDEN>)
 id 1mrqxs-0000Dg-PI
 for guix-patches@HIDDEN; Mon, 29 Nov 2021 19:25:44 -0500
Received: from out2.migadu.com ([188.165.223.204]:43239)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <blake@HIDDEN>)
 id 1mrqxo-0002kd-MG
 for guix-patches@HIDDEN; Mon, 29 Nov 2021 19:25:44 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nonconstructivism.com; 
 s=key1; t=1638231935;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding;
 bh=UOTPXTO3tXEobN9BzQ/NrnrwaLQA23ud0CH0+G1LspM=;
 b=XrXSOPoWGk16q9eKKoqSyguAcpzmuRdkIJ4qEUzcBfrPBUC5ORc5dSno4XisuXYSGrVnY0
 Cegg2lwZFHjL4CIBCfVUy81srNn6Ylds3Xf0w/BUi3qX0tL0hJ2Zad1JrrKFNoS/EDwrVS
 Z6JClijr92MYlg02rsKXV6twnpyYc0g=
From: Blake Shaw <blake@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: Add notcurses
Date: Tue, 30 Nov 2021 07:24:54 +0700
Message-Id: <6a6031ead6f9f61bc8eed976374638089efdaf3f.1638231894.git.blake@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=188.165.223.204;
 envelope-from=blake@HIDDEN; helo=out2.migadu.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Mon, 29 Nov 2021 19:26:41 -0500
Cc: Blake Shaw <blake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

---
 gnu/packages/notcurses.scm | 71 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)
 create mode 100644 gnu/packages/notcurses.scm

diff --git a/gnu/packages/notcurses.scm b/gnu/packages/notcurses.scm
new file mode 100644
index 0000000000..898903628c
--- /dev/null
+++ b/gnu/packages/notcurses.scm
@@ -0,0 +1,71 @@
+(define-module (gnu packages notcurses)
+  #:use-module (guix utils)
+  #:use-module (gnu packages)
+  #:use-module (guix packages)
+  #:use-module (guix build utils)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system cmake)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages video)
+  #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages libunistring)
+  #:use-module (ice-9 match))
+
+(define-public notcurses
+  (let ((commit "d15eb6003cbd65f11163916261cf6cd5600c77fa"))
+    (package
+      (name "notcurses")
+      (version "2.4.9")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/dankamongmen/notcurses")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "10jf6iai1r0xafrgaz978y9bqlaw1gvd11gc0yynwwp6rcs97g17"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:tests? #f
+                  #:build-type "-DVAR=val"
+                  #:make-flags
+                  (list
+                   (string-append "prefix="
+                                  (assoc-ref %outputs "out"))
+                   "CC=gcc")
+                  #:configure-flags
+                  (map (lambda (s)
+                         (string-append "-D" s))
+                       '("USE_CPP=off"     "USE_COVERAGE=off"
+                         "USE_DOXYGEN=off" "USE_DOCTEST=off"
+                         "USE_GPM=off"     "USE_MULTIMEDIA=ffmpeg"
+                         "USE_PANDOC=off"  "FSG_BUILD=ON"))
+                  #:phases
+                  (modify-phases %standard-phases
+                    (add-before 'build 'patch-makefile-shell
+                      (lambda _
+                        (setenv "HOME" "/tmp")))
+                    (add-before 'build 'set-prefix-in-makefile
+                      (lambda* (#:key outputs #:allow-other-keys)
+                        (let ((out (assoc-ref outputs "out")))
+                          (substitute* "Makefile"
+                            (("PREFIX =.*")
+                             (string-append "PREFIX = " out "\n")))
+                          #true))))))
+      (native-inputs
+       `(("ncurses" ,ncurses)
+         ("gcc-toolchain" ,gcc-10)
+         ("pkg-config" ,pkg-config)))
+      (inputs
+       `(("zlib" ,zlib)
+         ("ffmpeg" ,ffmpeg)
+         ("libunistring" ,libunistring)))
+      (synopsis "Not-ncurses: A library facilitating complex TUIs on modern terminals")
+      (description "Supporting vivid colors, multimedia, threads, & Unicode to the max.")
+      (home-page "https://notcurses.com/html/")
+      (license license:asl2.0))))
-- 
2.33.1





Acknowledgement sent to Blake Shaw <blake@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#52189; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 1 Dec 2021 16:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.