all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#52336] [PATCH 1/2] gnu: register notcurses.scm in local.mk
@ 2021-12-06 19:00 Blake Shaw via Guix-patches via
  2021-12-06 19:00 ` [bug#52335] [PATCH 2/2] gnu: add package notcurses.scm Blake Shaw via Guix-patches via
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Blake Shaw via Guix-patches via @ 2021-12-06 19:00 UTC (permalink / raw)
  To: 52336; +Cc: Blake Shaw

---
 gnu/local.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index b91d6eaa62..54e6dd422d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -422,6 +422,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/ninja.scm			\
   %D%/packages/node.scm				\
   %D%/packages/node-xyz.scm			\
+  %D%/packages/notcurses.scm			\
   %D%/packages/noweb.scm			\
   %D%/packages/nss.scm				\
   %D%/packages/ntp.scm				\
-- 
2.33.1





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

* [bug#52335] [PATCH 2/2] gnu: add package notcurses.scm
  2021-12-06 19:00 [bug#52336] [PATCH 1/2] gnu: register notcurses.scm in local.mk Blake Shaw via Guix-patches via
@ 2021-12-06 19:00 ` Blake Shaw via Guix-patches via
  2021-12-22  3:57   ` Leo Famulari
  2021-12-06 19:24 ` [bug#52336] [PATCH 1/2] gnu: register notcurses.scm in local.mk Leo Famulari
  2021-12-21 20:37 ` Blake Shaw via Guix-patches via
  2 siblings, 1 reply; 7+ messages in thread
From: Blake Shaw via Guix-patches via @ 2021-12-06 19:00 UTC (permalink / raw)
  To: 52335; +Cc: Blake Shaw

Signed-off-by: Blake Shaw <blake@nonconstructivism.com>
---
 gnu/packages/notcurses.scm | 73 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 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..00e2fd92db
--- /dev/null
+++ b/gnu/packages/notcurses.scm
@@ -0,0 +1,73 @@
+;;; Copyright © 2021 Blake Shaw <blake@nonconstructivism.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 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
+  (package
+   (name "notcurses")
+   (version "3.0.0")
+   (source
+    (origin
+     (method git-fetch)
+     (uri (git-reference
+           (url "https://github.com/dankamongmen/notcurses")
+           (commit (string-append "v" version))))
+     (file-name (git-file-name name version))
+         (sha256
+          (base32 "1y9s77m1pp6syfml559d8dvif61y6zjldrdx1zri18q9sr0zqm9m"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:tests? #f
+                  #:make-flags
+                  (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" ;;here we set the default cmake
+                         "USE_DOXYGEN=off" "USE_DOCTEST=off"  ;;configuration. FSG=FSF approved only
+                         "USE_GPM=off"     "USE_MULTIMEDIA=ffmpeg" ;;other choices based on 
+                         "USE_PANDOC=off"  "FSG_BUILD=ON"))))      ;;reducing package footprint
+      (native-inputs
+       `(("gcc-toolchain" ,gcc)
+         ("ncurses" ,ncurses)
+         ("pkg-config" ,pkg-config)))
+      (inputs
+       `(("ffmpeg" ,ffmpeg)
+         ("libdeflate" ,libdeflate)
+         ("libunistring" ,libunistring)
+         ("zlib" ,zlib)))
+      (synopsis "Library facilitating complex textual user interfaces on modern terminals")
+      (description "Notcurses is a library for building complex 
+textual user interfaces on modern terminals. It does not use ncurses, while it does make use of libtinfo from that package.")
+      (home-page "https://notcurses.com/html/")
+      (license license:asl2.0)))
-- 
2.33.1





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

* [bug#52336] [PATCH 1/2] gnu: register notcurses.scm in local.mk
  2021-12-06 19:00 [bug#52336] [PATCH 1/2] gnu: register notcurses.scm in local.mk Blake Shaw via Guix-patches via
  2021-12-06 19:00 ` [bug#52335] [PATCH 2/2] gnu: add package notcurses.scm Blake Shaw via Guix-patches via
@ 2021-12-06 19:24 ` Leo Famulari
  2021-12-21 20:37 ` Blake Shaw via Guix-patches via
  2 siblings, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2021-12-06 19:24 UTC (permalink / raw)
  To: 52336; +Cc: blake

On Tue, Dec 07, 2021 at 02:00:01AM +0700, Blake Shaw via Guix-patches via wrote:
> ---
>  gnu/local.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/gnu/local.mk b/gnu/local.mk
> index b91d6eaa62..54e6dd422d 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -422,6 +422,7 @@ GNU_SYSTEM_MODULES =				\
>    %D%/packages/ninja.scm			\
>    %D%/packages/node.scm				\
>    %D%/packages/node-xyz.scm			\
> +  %D%/packages/notcurses.scm			\

Thanks! Remember, this should be done in the same commit as adding the
new file itself. Otherwise, the build of Guix would be broken in between
the two commits.




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

* [bug#52336] [PATCH 1/2] gnu: register notcurses.scm in local.mk
  2021-12-06 19:00 [bug#52336] [PATCH 1/2] gnu: register notcurses.scm in local.mk Blake Shaw via Guix-patches via
  2021-12-06 19:00 ` [bug#52335] [PATCH 2/2] gnu: add package notcurses.scm Blake Shaw via Guix-patches via
  2021-12-06 19:24 ` [bug#52336] [PATCH 1/2] gnu: register notcurses.scm in local.mk Leo Famulari
@ 2021-12-21 20:37 ` Blake Shaw via Guix-patches via
  2021-12-21 20:51   ` Leo Famulari
  2 siblings, 1 reply; 7+ messages in thread
From: Blake Shaw via Guix-patches via @ 2021-12-21 20:37 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 52336

Leo Famulari <leo@famulari.name> writes:

> Thanks! Remember, this should be done in the same commit as adding the
> new file itself. Otherwise, the build of Guix would be broken in between
> the two commits.

sorry Leo did you need me to rebase these commits before the package can
be merged?

-- 
“In girum imus nocte et consumimur igni”




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

* [bug#52336] [PATCH 1/2] gnu: register notcurses.scm in local.mk
  2021-12-21 20:37 ` Blake Shaw via Guix-patches via
@ 2021-12-21 20:51   ` Leo Famulari
  2021-12-21 23:23     ` Leo Famulari
  0 siblings, 1 reply; 7+ messages in thread
From: Leo Famulari @ 2021-12-21 20:51 UTC (permalink / raw)
  To: Blake Shaw; +Cc: 52336

On Wed, Dec 22, 2021 at 03:37:10AM +0700, Blake Shaw wrote:
> sorry Leo did you need me to rebase these commits before the package can
> be merged?

Can you clarify what this patch is for?

It looks like ticket #52336 only registers a package module in
'gnu/local.mk', but the actual patch adding the module is missing:

https://issues.guix.gnu.org/52336

I sent my earlier message assuming that there would also be a commit
adding notcurses.scm itself.




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

* [bug#52336] [PATCH 1/2] gnu: register notcurses.scm in local.mk
  2021-12-21 20:51   ` Leo Famulari
@ 2021-12-21 23:23     ` Leo Famulari
  0 siblings, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2021-12-21 23:23 UTC (permalink / raw)
  To: Blake Shaw; +Cc: 52336

On Tue, Dec 21, 2021 at 03:51:34PM -0500, Leo Famulari wrote:
> It looks like ticket #52336 only registers a package module in
> 'gnu/local.mk', but the actual patch adding the module is missing:
> 
> https://issues.guix.gnu.org/52336

Oh, I see. The other patch is #52335. I've merged the two tickets now.




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

* [bug#52335] [PATCH 2/2] gnu: add package notcurses.scm
  2021-12-06 19:00 ` [bug#52335] [PATCH 2/2] gnu: add package notcurses.scm Blake Shaw via Guix-patches via
@ 2021-12-22  3:57   ` Leo Famulari
  0 siblings, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2021-12-22  3:57 UTC (permalink / raw)
  To: 52335; +Cc: blake

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

On Tue, Dec 07, 2021 at 02:00:02AM +0700, Blake Shaw via Guix-patches via wrote:
> +(define-module (gnu packages notcurses)

Thank you for this patch!

As part of the review process, I made some changes locally, as shown in
the diff below. I've also attached the complete revised patch, which
includes indentation changes that are not shown in the diff. I did not
include the indentation changes in the diff, so that it would be easier
to show what has changed. I think the attached patch is more or less
ready to push. Let me know what you think.

------
diff --git a/gnu/packages/notcurses.scm b/gnu/packages/notcurses.scm
index 00e2fd92db..1fc176c27c 100644
--- a/gnu/packages/notcurses.scm
+++ b/gnu/packages/notcurses.scm
@@ -23,13 +23,13 @@ (define-module (gnu packages notcurses)
   #: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 check)
+  #:use-module (gnu packages haskell-xyz)
   #: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))
+  #:use-module (gnu packages libunistring))
 
 (define-public notcurses
   (package
@@ -46,28 +46,33 @@ (define-public notcurses
           (base32 "1y9s77m1pp6syfml559d8dvif61y6zjldrdx1zri18q9sr0zqm9m"))))
       (build-system cmake-build-system)
       (arguments
-       `(#:tests? #f
-                  #:make-flags
-                  (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" ;;here we set the default cmake
-                         "USE_DOXYGEN=off" "USE_DOCTEST=off"  ;;configuration. FSG=FSF approved only
-                         "USE_GPM=off"     "USE_MULTIMEDIA=ffmpeg" ;;other choices based on 
-                         "USE_PANDOC=off"  "FSG_BUILD=ON"))))      ;;reducing package footprint
+       `(#:make-flags
+         (list (string-append "CC=" ,(cc-for-target)))
+         ;; These flags are documented in 'INSTALL.md' in the source distribution.
+         #:configure-flags
+         '(;; Do not build "coverage"
+           "-DUSE_COVERAGE=off"
+           ;; Do not build HTML documentation
+           "-DUSE_DOXYGEN=off"
+           ;; Don't include mouse support
+           "-DUSE_GPM=off"
+           ;; Use FFmpeg for multimedia support
+           "-DUSE_MULTIMEDIA=ffmpeg"
+           ;; Follow the Debian Free Software Guidelines
+           ;; Yes, 'INSTALL.md' says that "OFF" means to omit non-free code.
+           "-DFSG_BUILD=OFF")))
       (native-inputs
-       `(("gcc-toolchain" ,gcc)
-         ("ncurses" ,ncurses)
-         ("pkg-config" ,pkg-config)))
+       `(("pkg-config" ,pkg-config)
+         ("pandoc" ,pandoc)
+         ("doctest" ,doctest)))
       (inputs
        `(("ffmpeg" ,ffmpeg)
          ("libdeflate" ,libdeflate)
          ("libunistring" ,libunistring)
+         ("ncurses" ,ncurses)
          ("zlib" ,zlib)))
-      (synopsis "Library facilitating complex textual user interfaces on modern terminals")
-      (description "Notcurses is a library for building complex 
-textual user interfaces on modern terminals. It does not use ncurses, while it does make use of libtinfo from that package.")
-      (home-page "https://notcurses.com/html/")
+      (synopsis "Textual user interfaces")
+      (description "Notcurses is a library for building complex textual user
+interfaces on modern terminals.")
+      (home-page "https://notcurses.com")
       (license license:asl2.0)))
------

Concretely, here are the changes that I made:

I enabled the tests. We always run upstream test suites in Guix
packages, unless there is a reason not to. This helps us validate that
the package works properly, which helps us and upstream. This also means
that I added a dependency on doctest.

I removed the "prefix=" make flag. The package was installed correctly
without it, so this change seems okay.

I enabled building with C++. According to README.md, this implementation
is more fully-featured, and in Guix we aim to provide fully-featured
packages.

I build the man pages with Pandoc. Guix packages should include
documentation when it is available. This makes the package depend on
Pandoc.

Regarding DFSG_BUILD, I set it to "OFF". The notcurses INSTALL.md says
this: "DFSG_BUILD=off: leave out all content considered non-free under
the Debian Free Software Guidelines". That means that we want this to be
OFF in order to follow the Debian guidelines. [0] Or is that incorrect?

I also removed GCC from native-inputs. GCC is available "by default"
with cmake-build-system.

I moved the ncurses dependency to "inputs", because the built
package does keep a run-time reference to it. You can consider
native-inputs as things that only need to be used while building [1].

Based on feedback from `guix lint notcurses`, I edited the synopsis and
description. Maybe the description could be longer.

Please let me know what you think about the revised patch, and thanks
again for contributing!

[0] By the way, the DFSG is not equivalent to the FSDG, which is from
the FSF and which we follow. They are certainly similar, but they are
not related.

[1] https://guix.gnu.org/manual/en/html_node/package-Reference.html

[-- Attachment #2: 0001-gnu-Add-notcurses.patch --]
[-- Type: text/plain, Size: 4125 bytes --]

From c080b1a8a18f9091a0aa90cfaf05d239cde77cde Mon Sep 17 00:00:00 2001
From: Blake Shaw <blake@nonconstructivism.com>
Date: Tue, 7 Dec 2021 02:00:01 +0700
Subject: [PATCH] gnu: Add notcurses.

* gnu/packages/notcurses.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

Signed-off-by: Leo Famulari <leo@famulari.name>
---
 gnu/local.mk               |  1 +
 gnu/packages/notcurses.scm | 78 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+)
 create mode 100644 gnu/packages/notcurses.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 72fa405e17..675775d620 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -425,6 +425,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/ninja.scm			\
   %D%/packages/node.scm				\
   %D%/packages/node-xyz.scm			\
+  %D%/packages/notcurses.scm			\
   %D%/packages/noweb.scm			\
   %D%/packages/nss.scm				\
   %D%/packages/ntp.scm				\
diff --git a/gnu/packages/notcurses.scm b/gnu/packages/notcurses.scm
new file mode 100644
index 0000000000..1fc176c27c
--- /dev/null
+++ b/gnu/packages/notcurses.scm
@@ -0,0 +1,78 @@
+;;; Copyright © 2021 Blake Shaw <blake@nonconstructivism.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 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 check)
+  #:use-module (gnu packages haskell-xyz)
+  #: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))
+
+(define-public notcurses
+  (package
+   (name "notcurses")
+   (version "3.0.0")
+   (source
+    (origin
+     (method git-fetch)
+     (uri (git-reference
+           (url "https://github.com/dankamongmen/notcurses")
+           (commit (string-append "v" version))))
+     (file-name (git-file-name name version))
+         (sha256
+          (base32 "1y9s77m1pp6syfml559d8dvif61y6zjldrdx1zri18q9sr0zqm9m"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:make-flags
+         (list (string-append "CC=" ,(cc-for-target)))
+         ;; These flags are documented in 'INSTALL.md' in the source distribution.
+         #:configure-flags
+         '(;; Do not build "coverage"
+           "-DUSE_COVERAGE=off"
+           ;; Do not build HTML documentation
+           "-DUSE_DOXYGEN=off"
+           ;; Don't include mouse support
+           "-DUSE_GPM=off"
+           ;; Use FFmpeg for multimedia support
+           "-DUSE_MULTIMEDIA=ffmpeg"
+           ;; Follow the Debian Free Software Guidelines
+           ;; Yes, 'INSTALL.md' says that "OFF" means to omit non-free code.
+           "-DFSG_BUILD=OFF")))
+      (native-inputs
+       `(("pkg-config" ,pkg-config)
+         ("pandoc" ,pandoc)
+         ("doctest" ,doctest)))
+      (inputs
+       `(("ffmpeg" ,ffmpeg)
+         ("libdeflate" ,libdeflate)
+         ("libunistring" ,libunistring)
+         ("ncurses" ,ncurses)
+         ("zlib" ,zlib)))
+      (synopsis "Textual user interfaces")
+      (description "Notcurses is a library for building complex textual user
+interfaces on modern terminals.")
+      (home-page "https://notcurses.com")
+      (license license:asl2.0)))
-- 
2.34.0


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

end of thread, other threads:[~2021-12-22  3:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 19:00 [bug#52336] [PATCH 1/2] gnu: register notcurses.scm in local.mk Blake Shaw via Guix-patches via
2021-12-06 19:00 ` [bug#52335] [PATCH 2/2] gnu: add package notcurses.scm Blake Shaw via Guix-patches via
2021-12-22  3:57   ` Leo Famulari
2021-12-06 19:24 ` [bug#52336] [PATCH 1/2] gnu: register notcurses.scm in local.mk Leo Famulari
2021-12-21 20:37 ` Blake Shaw via Guix-patches via
2021-12-21 20:51   ` Leo Famulari
2021-12-21 23:23     ` Leo Famulari

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.