From patchwork Sun Jun 12 22:21:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Antero Mejr X-Patchwork-Id: 2955 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 40F4027BBEA; Sun, 12 Jun 2022 23:22:24 +0100 (BST) 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,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 87D1C27BBE9 for ; Sun, 12 Jun 2022 23:22:23 +0100 (BST) Received: from localhost ([::1]:43340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0VyQ-0000xd-KF for patchwork@mira.cbaines.net; Sun, 12 Jun 2022 18:22:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0Vy6-0000xT-OK for guix-patches@gnu.org; Sun, 12 Jun 2022 18:22:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34492) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0Vy6-0003zl-Fg for guix-patches@gnu.org; Sun, 12 Jun 2022 18:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o0Vy6-0007XF-CS for guix-patches@gnu.org; Sun, 12 Jun 2022 18:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55922] [PATCH] gnu: Add guile-termios. References: <20220612100404.3388-1-antero@mailbox.org> In-Reply-To: <20220612100404.3388-1-antero@mailbox.org> Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Jun 2022 22:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55922 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55922@debbugs.gnu.org Received: via spool by 55922-submit@debbugs.gnu.org id=B55922.165507248228892 (code B ref 55922); Sun, 12 Jun 2022 22:22:02 +0000 Received: (at 55922) by debbugs.gnu.org; 12 Jun 2022 22:21:22 +0000 Received: from localhost ([127.0.0.1]:56622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0VxS-0007Vv-Ez for submit@debbugs.gnu.org; Sun, 12 Jun 2022 18:21:22 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:35034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0VxQ-0007Vb-7l for 55922@debbugs.gnu.org; Sun, 12 Jun 2022 18:21:21 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4LLq0l5Ms5z9sVt for <55922@debbugs.gnu.org>; Mon, 13 Jun 2022 00:21:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1655072471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zHBju3LjVlcd8+3YDq2HfXoaf/0q0tJUzA0zizJ3Yek=; b=C5O669TMaMCa6wwVDhnkyOfpgfNs4OJj0ZfuhcUWYw6pG3pQh5uqCF7V1TqjdUJGnx5NY0 rQC5nxAawP59n+tJp3EboSBd7W1PDivHAg4NTtlazKcEXHKg4w8G7TbHFvzTzgYKQOTNbs kJg2HdMm9gFZRUMxMZNOfFG5IFiwKkSUR5GYMW3IluNQVDIW+/mHLbX99C6BXfx+52524i 6DR6KTeRMsRSYDQSNrngcJhMNE4TEDAzI7U8SwEh93yJH0Y8hZrQGcYyKJylwwA+bXErRU jttf6AFt9g0b9fObnpAQEtma/NgwcWBIbkOhwtQmR+dIXQP3cepzndJ4eE2tXQ== Date: Sun, 12 Jun 2022 22:21:05 +0000 Message-Id: <20220612222105.7257-1-antero@mailbox.org> MIME-Version: 1.0 X-MBO-RS-META: t58n7g4nki5srctwqwbiykbowf35fjic X-MBO-RS-ID: 65e29c173b044587263 X-Rspamd-Queue-Id: 4LLq0l5Ms5z9sVt 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" Reply-to: Antero Mejr X-ACL-Warn: , Antero Mejr via Guix-patches X-Patchwork-Original-From: Antero Mejr via Guix-patches via From: Antero Mejr X-getmail-retrieved-from-mailbox: Patches Thanks for the review. This improved patch has tests, a new guile test library, and man pages. About the line breaks on the original patch - it was styled with guix style. This patch is written differently but still had guix style applied. * gnu/packages/guile-xyz.scm (guile-termios): New variable. --- gnu/packages/guile-xyz.scm | 108 +++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index c6f73a38e9..e1bb18056e 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -41,6 +41,7 @@ ;;; Copyright © 2021, 2022 Artyom V. Poptsov ;;; Copyright © 2022 Maxime Devos ;;; Copyright © 2022 Zhu Zihao +;;; Copyright © 2022 Antero Mejr ;;; ;;; This file is part of GNU Guix. ;;; @@ -83,6 +84,7 @@ (define-module (gnu packages guile-xyz) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) + #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages hurd) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) @@ -5019,3 +5021,109 @@ (define-public lokke in two different guises.") ;; Dual license: LGPLv2.1+ or EPLv1.0+ at the user's option. (license (list license:lgpl2.1+ license:epl1.0))))) + +(define-public guile-termios + (package + (name "guile-termios") + (version "0.6.4") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ft/guile-termios") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "020p3c84z09wyyb6gfzj2x6q2rfmvas7c92fcm2hhg8z1q60sqkg")))) + (build-system gnu-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda _ + (substitute* "Makefile" + (("CC = cc") (string-append "CC=" + #$(cc-for-target))) + (("PREFIX = /usr/local") (string-append "PREFIX=" + #$output))))) + (replace 'build + (lambda _ + (invoke "make") + (invoke "make" "-C" "doc" "man") + (invoke "make" "install"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "make" "test"))))))) + (native-inputs (list guile-3.0 guile-tap pandoc perl perl-io-tty)) + (home-page "https://github.com/ft/guile-termios") + (synopsis "POSIX termios interface for GNU Guile") + (description + "To query and change settings of serial devices on POSIX systems, the +termios API is used. GNU Guile doesn't have an interface for that built in. +This module implements this interface by use of Guile's dynamic FFI.") + (license license:bsd-2))) + +(define-public guile2.0-termios + (package + (inherit guile-termios) + (name "guile2.0-termios") + (native-inputs (list guile-2.0)))) + +(define-public guile2.2-termios + (package + (inherit guile-termios) + (name "guile2.2-termios") + (native-inputs (list guile-2.2)))) + +(define-public guile-tap + (package + (name "guile-tap") + (version "0.4.6") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ft/guile-tap") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "04ip5cbvsjjcicsri813f4711yh7db6fvc2px4788rl8p1iqvi6x")))) + (build-system gnu-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda _ + (substitute* "Makefile" + (("PREFIX = /usr/local") (string-append "PREFIX=" + #$output))))) + (replace 'build + (lambda _ + (invoke "make") + (invoke "make" "-C" "doc" "man") + (invoke "make" "install"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "make" "test"))))))) + (native-inputs (list guile-3.0 pandoc)) + (home-page "https://github.com/ft/guile-tap") + (synopsis "Guile test framework that emits TAP output") + (description + "guile-tap is a library for GNU Guile that implements a framework for +specifying test cases that emit output that adheres to the Test Anything +Protocol (TAP). It comes with an experimental harness (tap-harness).") + (license license:bsd-2))) + +(define-public guile2.0-tap + (package + (inherit guile-tap) + (name "guile2.0-tap") + (native-inputs (list guile-2.0)))) + +(define-public guile2.2-tap + (package + (inherit guile-tap) + (name "guile2.2-tap") + (native-inputs (list guile-2.2))))