From patchwork Thu Jan 5 05:42:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Artyom V. Poptsov" X-Patchwork-Id: 45858 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 752A627BBED; Thu, 5 Jan 2023 05:43:17 +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=-3.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED,URIBL_CSS_A 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 33CA027BBEB for ; Thu, 5 Jan 2023 05:43:15 +0000 (GMT) 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 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hello, this patch adds FXTUI[1], a simple C++ library for terminal based user interfaces. 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: --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) --8<---------------cut here---------------end--------------->8--- Which worked out flawlessly. Thanks, - avp References: 1. https://github.com/ArthurSonzogni/FTXUI 2. https://github.com/gansm/finalcut 3. https://github.com/tusharpm/tiles From 3453ac53e0d1bfe28e5536a89411584fc2461e29 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". --- 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 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -605,6 +605,7 @@ GNU_SYSTEM_MODULES = \ %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 --- /dev/null +++ b/gnu/packages/tui.scm @@ -0,0 +1,62 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 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++ library 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))) -- 2.34.1