From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SH57O3RjtmOG1wAAbAwnHQ (envelope-from ) for ; Thu, 05 Jan 2023 06:43:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id wKO2OnRjtmMcEQAAG6o9tA (envelope-from ) for ; Thu, 05 Jan 2023 06:43:16 +0100 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 3DD976F63 for ; Thu, 5 Jan 2023 06:43:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDJ1u-0005qd-9b; Thu, 05 Jan 2023 00:43:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDJ1t-0005pU-G0 for guix-patches@gnu.org; Thu, 05 Jan 2023 00:43:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDJ1q-00026p-M0 for guix-patches@gnu.org; Thu, 05 Jan 2023 00:43:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDJ1q-00049k-79 for guix-patches@gnu.org; Thu, 05 Jan 2023 00:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60567] [PATCH] gnu: Add ftxui Resent-From: "Artyom V. Poptsov" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Jan 2023 05:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60567 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60567@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167289735015930 (code B ref -1); Thu, 05 Jan 2023 05:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Jan 2023 05:42:30 +0000 Received: from localhost ([127.0.0.1]:50019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDJ1J-00048s-C8 for submit@debbugs.gnu.org; Thu, 05 Jan 2023 00:42:29 -0500 Received: from lists.gnu.org ([209.51.188.17]:35362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDJ1G-00048i-Dn for submit@debbugs.gnu.org; Thu, 05 Jan 2023 00:42:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDJ1E-0005Vu-JV for guix-patches@gnu.org; Thu, 05 Jan 2023 00:42:26 -0500 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDJ1B-00023c-0M for guix-patches@gnu.org; Thu, 05 Jan 2023 00:42:23 -0500 Received: by mail-lf1-x129.google.com with SMTP id m6so43282979lfj.11 for ; Wed, 04 Jan 2023 21:42:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=wMrS7y44l0OuF35ud/UaV5olJWZqh0a2kXRHGDkf5AE=; b=nw11pIufVlRav3p7FUQPH19UGFcZaWT69vsze1O41fSfvIxqLIIgxQ41/ApmLnjdYL +3EuoIZEdtYwnXiVTsrbC/w6Q41l4Dh+YWiqRfLZyzC5OHHTJgfe/9ZklyMf/7BQXGHL SRzjBKfB//TajtDjKYskY05DS6y20ymg9mM/ox6KL0bsFAWGWUddnbC1wUxl3TKlU0W8 3++niYygJIFK6VkaS19Njdl0sO0wZOAEQHIUO9Q0RrPzZRpjrV6gQL82zz4vgHFK8/c2 HC5QFtQ0mB0cVW1VlrIV1hozb7DOV/uX6+0BT+H5H2+6tB2coQ2LbO3FmefNdfCLretZ 381Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wMrS7y44l0OuF35ud/UaV5olJWZqh0a2kXRHGDkf5AE=; b=Mp2AbOh5/tJdbROzxHozGI6c3T9JYt/nRsoeih7R93/ZV4RHQ7P7tm4eBoU1AmgBiI RrIO2fC5H5NwDnhODbdcG7Q3RJdBG6ot0G8RKfQFomcl7GeYAY6YAODXVMNF5s90KQ3E x8Wzc2n1INFVAOzWTwCSsXex+eBmJPxep2SalptiNOvVilrA0WGv4pxg5I1X3jBlozRZ LUpR3B2E0AmxdA7ycZqa4kHVDNBJjbIbam2haYRAVR1NBHl/P/zFIuYy5yf6J0SLIvV+ LmIkCqrcC4fUjJo7sn1MK3r2jo34wMQxEe7FFWLNG0UcspB8vIydoPAeOsliblS8lJR+ DIIA== X-Gm-Message-State: AFqh2kqlGIyqDeAOFCbBoE7Uz8D2Xoa47jOZZodIf7sAr1H1WgGakHVg P2X2db2mdWdaEfMX7+homnKpmtr/EwQ= X-Google-Smtp-Source: AMrXdXt+t4yrUe9W2Z/rXoinkBENfiSXLDVoPN2BB/01G0YN3khHEVKUuid6uPO73LzsxowqtfLxSw== X-Received: by 2002:ac2:43a4:0:b0:4cb:3a60:65cb with SMTP id t4-20020ac243a4000000b004cb3a6065cbmr2944816lfl.6.1672897333403; Wed, 04 Jan 2023 21:42:13 -0800 (PST) Received: from elephant ([95.79.5.207]) by smtp.gmail.com with ESMTPSA id q14-20020a056512210e00b004a2c447598fsm5358612lfr.159.2023.01.04.21.42.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 21:42:12 -0800 (PST) From: "Artyom V. Poptsov" Date: Thu, 05 Jan 2023 08:42:06 +0300 Message-ID: <87r0w9fsgh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=poptsov.artyom@gmail.com; helo=mail-lf1-x129.google.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_CSS_A=0.1 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672897396; a=rsa-sha256; cv=none; b=XpDuEZBx/o4rHR8RDZVroVjs3GGa9dSaGfuOq4m+Sgv6km890miM6Ve+ta+0l3INmoiltQ elOV1O2GjZdby1xjWkaKeXabmuhj+OpLrvW4213nF5QSEPL9h83OEPdrtUtAUy/tWSaBMc qW2VhQdjHYQW51feHdLBO3Jcg5xgbMXV4VgvXrcTDxVDp1hwj8WIYfuksQnHgvbT/3j9za P11vmIt4aS7ZuZG8EOIArAdlEjq+4BMIs4vLX2y+Wit8+Lfp5HT819E30XqMT0uCkPt5G0 JwTZ/oFk7AgEuec0I/mXh9bS+0Bq3gVqyrInl9wbCFLZIG3zphlXJtBDdkJ6UA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=nw11pIuf; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672897396; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=wMrS7y44l0OuF35ud/UaV5olJWZqh0a2kXRHGDkf5AE=; b=grt0x9ZrnKBX7Ez1AzPlwh70sRIZyiwaXzMm7KISQhcjf7SrW8Ak+XMK/0ljQ8ug+5jfyd ZFg5uSUWuOGOAlM8Rhbe6vZDXtjqWLYMime1Uc3SuUEJH6zTksy0J5dlxTOu/0N42RiZQ7 3+OfRvyALDIvpbUYWS8pG75cppmIDBliROQe0gL8/QVQuNFwm3Zk30stt7XiFIsCoEr5DY md+JBejcr293nBJDoCKjnUVVxq8nzUWNo1/mgUpz63NKTvCQXuPU55WaEBbX7j1cnZadHo 83zfSZh8YHQE0hYeXqmWT1II7rv7vIhbStZaAlBRz1KlhD6fMRnaQ3RuQmfXsA== X-Spam-Score: -5.16 X-Migadu-Queue-Id: 3DD976F63 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=nw11pIuf; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -5.16 X-TUID: KwYNTliymoqu --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hello, this patch adds FXTUI[1], a simple C++ library for terminal based user interfaces. --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Add-ftxui.patch Content-Transfer-Encoding: quoted-printable From=203453ac53e0d1bfe28e5536a89411584fc2461e29 Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" Date: Thu, 5 Jan 2023 08:03:15 +0300 Subject: [PATCH] gnu: Add ftxui * gnu/packages/tui.scm: New module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add "tui.scm". =2D-- gnu/local.mk | 1 + gnu/packages/tui.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 gnu/packages/tui.scm diff --git a/gnu/local.mk b/gnu/local.mk index bc0309ee87..c110b54bef 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -605,6 +605,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/packages/tmux.scm \ %D%/packages/toolkits.scm \ %D%/packages/tor.scm \ + %D%/packages/tui.scm \ %D%/packages/tv.scm \ %D%/packages/uglifyjs.scm \ %D%/packages/uml.scm \ diff --git a/gnu/packages/tui.scm b/gnu/packages/tui.scm new file mode 100644 index 0000000000..7a3037073b =2D-- /dev/null +++ b/gnu/packages/tui.scm @@ -0,0 +1,62 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2023 Artyom V. Poptsov +;;; +;;; 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 tui) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix utils) + #:use-module (guix gexp) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix build-system cmake) + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages version-control)) + +(define-public ftxui + (package + (name "ftxui") + (version "3.0.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ArthurSonzogni/FTXUI") + (commit (string-append "v" version)))) + (sha256 + (base32 + "10a4yw2h29kixxyhll6cvrwyscsvz9asxry857a9l8nqvbhs946s")) + (file-name (git-file-name name version)))) + (build-system cmake-build-system) + (arguments + (list #:tests? #f)) ;Tests require gtest + (home-page "https://github.com/ArthurSonzogni/FTXUI") + (synopsis "C++ Functional Terminal User Interface") + (description + "Functional Terminal (X) User interface (FTXUI) is a simple C++ libra= ry for +terminal based user interfaces. + +Main features: +@itemize +@item Functional style. +@item Keyboard & mouse navigation. +@item Support for UTF8 and fullwidth chars. +@item Support for animations. +@item Support for drawing. +@item No dependencies. +@end itemize") + (license license:expat))) =2D-=20 2.34.1 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I decided to place this package in a separate module called "tui.scm" as there are other libraries for building text-based user interfaces that can be added in the future (like [2], for example.) Also to check if the library installed right I tried to build "tiles" game[3] that is using FXTUI: =2D-8<---------------cut here---------------start------------->8--- git clone https://github.com/tusharpm/tiles.git cd tiles guix shell binutils gcc mkdir build cd build cmake .. make -j$(nproc) =2D-8<---------------cut here---------------end--------------->8--- Which worked out flawlessly. Thanks, =2D avp References: 1. https://github.com/ArthurSonzogni/FTXUI 2. https://github.com/gansm/finalcut 3. https://github.com/tusharpm/tiles =2D-=20 Artyom "avp" Poptsov Home page: https://memory-heap.org/~avp/ CADR Hackerspace co-founder: https://cadrspace.ru/ GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFNBAEBCgA3FiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmO2Yy4ZHHBvcHRzb3Yu YXJ0eW9tQGdtYWlsLmNvbQAKCRDpxaLZCJigL3p4B/9F0LDO3jhDmelKJVz6Dthl q2mrIvJFwSfqjroze2RBdTSuovd5gxlzBxOp7w8L6GuprUxhfcgptKLod1BoDfeY lab7hj3UQ2S0mySfy55OBB2Ij1jS05E0452Y66DrqVaEI1kgdTS5hUuO9T567It5 PQwqCvgeb2X3V5EoclV0ky7ayLO+N+lDgAPt831lr1pVivZyk+kSgkzkzPZN2tYo 2BRyP/YbOeSFrlv2R04dqtvzxF/1KbWF48Dem6mb7DhWCMaL1DPtnlcSWIox4IaX gpbPAtWQ8LGAvSyh2icvVuI+d/GaCNiLEHDdqmhOZtlthw6kHeoDUrOBMk8AVmnM =PKyY -----END PGP SIGNATURE----- --==-=-=--