From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 02 17:20:52 2021 Received: (at submit) by debbugs.gnu.org; 2 Dec 2021 22:20:52 +0000 Received: from localhost ([127.0.0.1]:49516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msuRc-0007uR-2R for submit@debbugs.gnu.org; Thu, 02 Dec 2021 17:20:52 -0500 Received: from lists.gnu.org ([209.51.188.17]:60238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msuRa-0007uK-Cg for submit@debbugs.gnu.org; Thu, 02 Dec 2021 17:20:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msuRY-0007Nc-Jr for guix-patches@gnu.org; Thu, 02 Dec 2021 17:20:46 -0500 Received: from out0.migadu.com ([94.23.1.103]:23233) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msuRQ-0000lV-NO for guix-patches@gnu.org; Thu, 02 Dec 2021 17:20:40 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nonconstructivism.com; s=key1; t=1638483624; 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: in-reply-to:in-reply-to:references:references; bh=SBV3qd15CT0Dybz6gWQ0aPJ6GBBs7AMl5rUZz2dN7XM=; b=fsM+T4gSv0axlXN7zhOJhT5r3vWh0Gyjn9mpshupe7JgaRVkF/RSGGvRa/fAlVXejIVjqm j6Um+/i3qt1U6dbDPMhN3IUBlNRvVbyzc4C4dz8B5noM4jtU2/ZxO8FDyCEo0XjvwRzKxS hNtsPw4mLHZJj4+OVvj7nZTSQt+2MQo= From: Blake Shaw To: Nicolas Goaziou Subject: Re: [bug#52189] [PATCH] gnu: Add notcurses References: <6a6031ead6f9f61bc8eed976374638089efdaf3f.1638231894.git.blake@nonconstructivism.com> <87r1awxqkc.fsf@nicolasgoaziou.fr> Date: Fri, 03 Dec 2021 05:20:01 +0700 In-Reply-To: <87r1awxqkc.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Wed, 01 Dec 2021 17:01:07 +0100") Message-ID: <87czmemyy6.fsf@nonconstructivism.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: nonconstructivism.com Received-SPF: pass client-ip=94.23.1.103; envelope-from=blake@nonconstructivism.com; helo=out0.migadu.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_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 Cc: 52189@debbugs.gnu.org, Blake Shaw via Guix-patches via X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) 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.=20 [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=3Dval" > > 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.=20 [2] https://github.com/dankamongmen/notcurses/blob/master/INSTALL.md > >> + #:make-flags >> + (list >> + (string-append "prefix=3D" >> + (assoc-ref %outputs "out")) >> + "CC=3Dgcc") > > This is not cross-compilation friendly. The above should be: > > (list ,(string-append "CC=3D" (cc-for-target)) > (string-append "prefix=3D" ...)) 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.=20 > >> + #:configure-flags >> + (map (lambda (s) >> + (string-append "-D" s)) >> + '("USE_CPP=3Doff" "USE_COVERAGE=3Doff" >> + "USE_DOXYGEN=3Doff" "USE_DOCTEST=3Doff" >> + "USE_GPM=3Doff" "USE_MULTIMEDIA=3Dffmpeg" >> + "USE_PANDOC=3Doff" "FSG_BUILD=3DON")) >> + #: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=3DON 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 =3D.*") >> + (string-append "PREFIX =3D " 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 i= ssues 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.=20=20 > >> + ("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.=20 > > 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, --=20 =E2=80=9CIn girum imus nocte et consumimur igni=E2=80=9D