From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SLbxCmlJqWF+ZgEAgWs5BA (envelope-from ) for ; Thu, 02 Dec 2021 23:32:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id eGaYBmlJqWHMLAAAB5/wlQ (envelope-from ) for ; Thu, 02 Dec 2021 22:32:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D1EF12C62B for ; Thu, 2 Dec 2021 23:32:08 +0100 (CET) Received: from localhost ([::1]:32934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msucZ-0001Lr-KH for larch@yhetil.org; Thu, 02 Dec 2021 17:32:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msucU-0001LY-NF for guix-patches@gnu.org; Thu, 02 Dec 2021 17:32:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38015) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msucU-0002NT-FV for guix-patches@gnu.org; Thu, 02 Dec 2021 17:32:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1msucU-0008Es-7b for guix-patches@gnu.org; Thu, 02 Dec 2021 17:32:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52189] [PATCH] gnu: Add notcurses References: <6a6031ead6f9f61bc8eed976374638089efdaf3f.1638231894.git.blake@nonconstructivism.com> In-Reply-To: <6a6031ead6f9f61bc8eed976374638089efdaf3f.1638231894.git.blake@nonconstructivism.com> Resent-From: Blake Shaw Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Dec 2021 22:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52189 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Goaziou Cc: 52189@debbugs.gnu.org X-Debbugs-Original-Cc: 52189@debbugs.gnu.org, Blake Shaw via Guix-patches via Received: via spool by 52189-submit@debbugs.gnu.org id=B52189.163848428831612 (code B ref 52189); Thu, 02 Dec 2021 22:32:02 +0000 Received: (at 52189) by debbugs.gnu.org; 2 Dec 2021 22:31:28 +0000 Received: from localhost ([127.0.0.1]:49558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msubv-0008Di-Cd for submit@debbugs.gnu.org; Thu, 02 Dec 2021 17:31:27 -0500 Received: from out2.migadu.com ([188.165.223.204]:33881) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msubq-0008DU-20 for 52189@debbugs.gnu.org; Thu, 02 Dec 2021 17:31:26 -0500 Date: Fri, 03 Dec 2021 05:30:57 +0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nonconstructivism.com; s=key1; t=1638484279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i37mnM6wOeWvVZFrMhU06C5zpss9qWT7pyYpm4a7urE=; b=aNdDcsjo+XZHcuFDR+cevkBfXa4dNrK3dgLEW/W1Pg36S0jRxN5lo3fwt3wjEE63xWtNK9 qKB35PyuUpVTh7198BXKwvIX+B2CT7LiY5UQHAUoN6DP2/QWJiZ9ItmiHmXUJYrxVtTNML QggjxneOR0MNATc0+CD5ZBuz7S3nbuU= Message-Id: <875ys6myfy.fsf@nonconstructivism.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. Gcc: nnimap+imap.migadu.de:sent.2021 MIME-Version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Blake Shaw X-ACL-Warn: , Blake Shaw via Guix-patches From: Blake Shaw via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638484328; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=i37mnM6wOeWvVZFrMhU06C5zpss9qWT7pyYpm4a7urE=; b=ASrs9qZ4Jca6eahFszLZP5DzaY8R+AIW0MHzeymFdAdD1uxuwNe2icJH2t+lslExNExbYG HyVecYWueBYWPDmO/1wYOJruqHFpYfMddDOZ8l+ikpIN7se3B94d7NmqCLuqyMvydp2h2E NDYYoxwAQ6x4IVUEU1utBTquctgroB6wO+VG85ZKSn47mNudbFGHiKaXWQPSAWK3ci4ObE K3heA5/qM3uqDbcPRSn9iCP2AYagQXKQCkEafHTXQV/pqoaOOc5eDBh3NMjsQIOpC+FoRA eq42/Vg13nTqXU4FZ8MXcl2fBXEY5Z2gwtLm2g07Az2mn0E2ySaJjvUGpNpuAg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638484329; a=rsa-sha256; cv=none; b=FNsnaVLcE1UJ9yn9ukBnX5lYx6oRaBnDJt7tjThuubIIT6+z7/2csLo3EcBkcBT3l+ANM5 yMF3X8xybO8zf5OxozEInacWIpPKwHS1z4G74Yw050U4ww3L8TwmpCRptrnWn+5C66No4T +jEiT/7CS/B5Up6SVAQUgQlWeX5h2Zk5qhrEVfl732i1lnd7Pr6hbGS/pYGmmJLrKEZPa0 w8Z/6el6U2bWd/vYhbRooUnSBhn+8tTa0dt7o3HYjJW+gioQQLycks/YCocdboO+sUBPvG ZEzGC4JKQYDxDSNxB7FHJkGlLty/L5URiKUb7elEM8e+pDJq/cmF9mCwswVpWg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=nonconstructivism.com header.s=key1 header.b=aNdDcsjo; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=nonconstructivism.com header.s=key1 header.b=aNdDcsjo; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D1EF12C62B X-Spam-Score: -3.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9PFuBZ5vkhNZ Hi, thanks for the feedback. Nicolas Goaziou writes: > 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. I was originally packaging it with ncurses, but when I asked on the IRC I was advised by to create a new package [1]. Let me know which is preferred and I will change things accordingly. [1] https://logs.guix.gnu.org/guix/2021-10-24.log#201648 > >> +(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. > noted. >> + (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. The build type is recommend in INSTALL.md[2]. I tried building without it, and it seems to work fine, in case you'd like me to remove it. [2] https://github.com/dankamongmen/notcurses/blob/master/INSTALL.md > >> + #: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=" ...)) Oh great, I did not know about this. I was trying to build for other targets using QEMU and couldn't; this seems to be why. > >> + #: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? The configure flags bring down the package size by about 80mb, and FSG_BUILD=ON is to insure only FSF approved programs are used in the build. I wasn't sure about comment etiquette, but I will add and return. >> + (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. It seems it builds fine without either build phase, so I can remove them in the future. I originally wrote this package back in October and it had updated multiple times since then, so its difficult for me to recall the purpose of these phases, although I do recall them solving some debugging issues early on. > >> + (native-inputs >> + `(("ncurses" ,ncurses) >> + ("gcc-toolchain" ,gcc-10) > > Could you explain why gcc-10 must be used? For some reason I had thought its important to pin a version for the sake of reproducibility. If not, I will remove it. > >> + ("pkg-config" ,pkg-config))) >> + (inputs >> + `(("zlib" ,zlib) >> + ("ffmpeg" ,ffmpeg) >> + ("libunistring" ,libunistring))) > > Pleas order inputs alphabetically. Got it > >> + (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. Got it, I had just copied from their official release. > > Could you send an updated patch? I just found out that the newest version, which is a landmark version, 3.0, was released yesterday (I had thought it wasn't coming until 2022). so I'll write the new package with the above considerations, after I hear back from you about the questions concerning putting it in gnu/ncurses.scm. Thanks! Blake > > Regards, -- “In girum imus nocte et consumimur igni”