From patchwork Wed Dec 22 03:57:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leo Famulari X-Patchwork-Id: 35574 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7D7A527BBEA; Wed, 22 Dec 2021 03:58:13 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 386C727BBEA for ; Wed, 22 Dec 2021 03:58:12 +0000 (GMT) Received: from localhost ([::1]:56636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzslX-0004rw-A8 for patchwork@mira.cbaines.net; Tue, 21 Dec 2021 22:58:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzslO-0004rl-Hk for guix-patches@gnu.org; Tue, 21 Dec 2021 22:58:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:44843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzslO-0001hg-8Z for guix-patches@gnu.org; Tue, 21 Dec 2021 22:58:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mzslO-0003Pw-5X for guix-patches@gnu.org; Tue, 21 Dec 2021 22:58:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52335] [PATCH 2/2] gnu: add package notcurses.scm Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 22 Dec 2021 03:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52335 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52335@debbugs.gnu.org Cc: blake@nonconstructivism.com X-Debbugs-Original-To: Blake Shaw via Guix-patches via X-Debbugs-Original-Cc: Blake Shaw , 52335@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164014547913127 (code B ref -1); Wed, 22 Dec 2021 03:58:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Dec 2021 03:57:59 +0000 Received: from localhost ([127.0.0.1]:56387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzslE-0003PR-6E for submit@debbugs.gnu.org; Tue, 21 Dec 2021 22:57:58 -0500 Received: from lists.gnu.org ([209.51.188.17]:58288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzslB-0003PJ-V7 for submit@debbugs.gnu.org; Tue, 21 Dec 2021 22:57:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzslB-0004rR-GX for guix-patches@gnu.org; Tue, 21 Dec 2021 22:57:49 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:51921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzsl8-0001gi-TH for guix-patches@gnu.org; Tue, 21 Dec 2021 22:57:49 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id B2A103200E31; Tue, 21 Dec 2021 22:57:44 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 21 Dec 2021 22:57:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=mesmtp; bh=rXBWUxm45K1qvkQHdqgfBgLW6EnoeIYoqBEmAFoY1gA=; b=j1ydLNPCMSj4 MVaEkxPaBUwdgdHtox89M11c5Kh3Z9Uvsy1cGJ+/zrRLpKDwmia96jYPWtXVEO08 uF9NFydlOJEbVpfdWQrWWMB+kUw06AVoJU1dtOhziBnGqLIAty4bA/WRLm7zMsH6 q13TqoOhhSNr3/qv3oLc+odxtDnpklo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=rXBWUxm45K1qvkQHdqgfBgLW6EnoeIYoqBEmAFoY1 gA=; b=enblke+lXD4hIVw0/j69RtbvXgQzY+pVL+r7oPrlY9EPOCZIgSQqCzw/K zMMxwY57BqxDgu7NuQc8s5x/DhtzgDrsySRZUFqHDZZp5gzH3HLmz55eg4oU/NOK fIPHgrQ296ZO+RLK0781uYMdrccIohDDfwypsMjVg9U/edw8JbSJFVsJew/7QGal DZ8iaYm5TsggU1sF7G/+gVf/5aEfmSVX8FGUdlhwBTfJRppfqLYHg3Z2mKVcfjt9 NvGALHyalj5loHFLR+4Njwth2QzicjozFd25ADXdn5j1XRX91bIRnchjyVZQyonH XW3rbCeCY3lIs/3OOE/juvURihBVQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddthedgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtugfgjgesmhekreertddtvdenucfhrhhomhepnfgvohcu hfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhirdhnrghmvgeqnecuggftrfgrth htvghrnhepueehveekkedtffelhfduiefgtdeiudfhvdeitdeffeegteegveekhfevheeg gfdvnecuffhomhgrihhnpehnohhttghurhhsvghsrdgtohhmpdhgnhhurdhorhhgnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgvohesfhgr mhhulhgrrhhirdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 Dec 2021 22:57:43 -0500 (EST) Date: Tue, 21 Dec 2021 22:57:41 -0500 From: Leo Famulari Message-ID: References: <5ccbd4e534f4f6fcfb3f8c8814ad59e51377cb7a.1638817174.git.blake@nonconstructivism.com> <1aa737a8cdcbe9c0e95052fd3187b059355f86f9.1638817174.git.blake@nonconstructivism.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1aa737a8cdcbe9c0e95052fd3187b059355f86f9.1638817174.git.blake@nonconstructivism.com> Received-SPF: pass client-ip=64.147.123.25; envelope-from=leo@famulari.name; helo=wout2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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. ------ ------ 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 From c080b1a8a18f9091a0aa90cfaf05d239cde77cde Mon Sep 17 00:00:00 2001 From: Blake Shaw 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 --- 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 +;;; +;;; 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 . + +(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))) 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)))