GNU bug report logs - #55922
[PATCH] gnu: Add guile-termios.

Previous Next

Package: guix-patches;

Reported by: Antero Mejr <antero <at> mailbox.org>

Date: Sun, 12 Jun 2022 10:05:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55922 in the body.
You can then email your comments to 55922 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#55922; Package guix-patches. (Sun, 12 Jun 2022 10:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Antero Mejr <antero <at> mailbox.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 12 Jun 2022 10:05:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Antero Mejr <antero <at> mailbox.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add guile-termios.
Date: Sun, 12 Jun 2022 10:04:04 +0000
* gnu/packages/guile-xyz.scm (guile-termios): New variable.
---
 gnu/packages/guile-xyz.scm | 50 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index c6f73a38e9..373a5b13f1 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -41,6 +41,7 @@
 ;;; Copyright © 2021, 2022 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
 ;;; Copyright © 2022 Maxime Devos <maximedevos <at> telenet.be>
 ;;; Copyright © 2022 Zhu Zihao <all_but_last <at> 163.com>
+;;; Copyright © 2022 Antero Mejr <antero <at> mailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5019,3 +5020,52 @@ (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 #:tests?
+           #f
+           #:make-flags
+           #~(list (string-append "CC="
+                                  #$(cc-for-target))
+                   (string-append "PREFIX="
+                                  #$output))
+           #:phases
+           #~(modify-phases %standard-phases
+               (replace 'build
+                 (lambda _
+                   (invoke "make")
+                   (invoke "make" "compile"))))))
+    (native-inputs (list guile-3.0))
+    (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))))
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55922; Package guix-patches. (Sun, 12 Jun 2022 15:48:02 GMT) Full text and rfc822 format available.

Message #8 received at 55922 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Antero Mejr <antero <at> mailbox.org>, 55922 <at> debbugs.gnu.org
Subject: Re: [bug#55922] [PATCH] gnu: Add guile-termios.
Date: Sun, 12 Jun 2022 17:47:01 +0200
[Message part 1 (text/plain, inline)]
Antero Mejr via Guix-patches via schreef op zo 12-06-2022 om 10:04
[+0000]:
> +     (list #:tests?
> +           #f

When disabling tests, always document the reason.
Also, no need for a separate line.  Likewise for #:make-flags.


Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55922; Package guix-patches. (Sun, 12 Jun 2022 22:22:02 GMT) Full text and rfc822 format available.

Message #11 received at 55922 <at> debbugs.gnu.org (full text, mbox):

From: Antero Mejr <antero <at> mailbox.org>
To: 55922 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add guile-termios.
Date: Sun, 12 Jun 2022 22:21:05 +0000
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 <poptsov.artyom <at> gmail.com>
 ;;; Copyright © 2022 Maxime Devos <maximedevos <at> telenet.be>
 ;;; Copyright © 2022 Zhu Zihao <all_but_last <at> 163.com>
+;;; Copyright © 2022 Antero Mejr <antero <at> mailbox.org>
 ;;;
 ;;; 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))))
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55922; Package guix-patches. (Thu, 16 Jun 2022 21:17:01 GMT) Full text and rfc822 format available.

Message #14 received at 55922 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Antero Mejr <antero <at> mailbox.org>
Cc: 55922 <at> debbugs.gnu.org
Subject: Re: bug#55922: [PATCH] gnu: Add guile-termios.
Date: Thu, 16 Jun 2022 23:15:55 +0200
Hi Antero,

Looks like we’re almost done; some comments inline below.

Antero Mejr <antero <at> mailbox.org> skribis:

> * gnu/packages/guile-xyz.scm (guile-termios): New variable.

Note that all the relevant variables should be listed here.

> +(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

Unless there really is a need for them, you can drop them.  It’s
reasonable to assume 3.0 as the default for new code.

> +(define-public guile-tap
> +  (package
> +    (name "guile-tap")
> +    (version "0.4.6")

Could you make it a separate patch, and also remove the 2.0/2.2
variants?

By convention we usually add one package per patch:

  https://guix.gnu.org/manual/devel/en/html_node/Submitting-Patches.html

Thanks in advance!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#55922; Package guix-patches. (Thu, 16 Jun 2022 21:55:02 GMT) Full text and rfc822 format available.

Message #17 received at 55922 <at> debbugs.gnu.org (full text, mbox):

From: Antero Mejr <antero <at> mailbox.org>
To: 55922 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: Add guile-tap.
Date: Thu, 16 Jun 2022 21:53:56 +0000
* gnu/packages/guile-xyz.scm (guile-tap): New variable.
---
 gnu/packages/guile-xyz.scm | 40 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 10065ff1da..7afc429d00 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -5063,3 +5063,43 @@ (define-public guile-termios
 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 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)))
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55922; Package guix-patches. (Thu, 16 Jun 2022 21:55:02 GMT) Full text and rfc822 format available.

Message #20 received at 55922 <at> debbugs.gnu.org (full text, mbox):

From: Antero Mejr <antero <at> mailbox.org>
To: 55922 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: Add guile-termios.
Date: Thu, 16 Jun 2022 21:53:55 +0000
* gnu/packages/guile-xyz.scm (guile-termios): New variable.
---
 gnu/packages/guile-xyz.scm | 44 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index c6f73a38e9..10065ff1da 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -41,6 +41,7 @@
 ;;; Copyright © 2021, 2022 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
 ;;; Copyright © 2022 Maxime Devos <maximedevos <at> telenet.be>
 ;;; Copyright © 2022 Zhu Zihao <all_but_last <at> 163.com>
+;;; Copyright © 2022 Antero Mejr <antero <at> mailbox.org>
 ;;;
 ;;; 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,45 @@ (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)))
-- 
2.36.1





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 17 Jun 2022 20:54:02 GMT) Full text and rfc822 format available.

Notification sent to Antero Mejr <antero <at> mailbox.org>:
bug acknowledged by developer. (Fri, 17 Jun 2022 20:54:03 GMT) Full text and rfc822 format available.

Message #25 received at 55922-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Antero Mejr <antero <at> mailbox.org>
Cc: 55922-done <at> debbugs.gnu.org
Subject: Re: bug#55922: [PATCH] gnu: Add guile-termios.
Date: Fri, 17 Jun 2022 22:53:06 +0200
Hi,

Antero Mejr <antero <at> mailbox.org> skribis:

> * gnu/packages/guile-xyz.scm (guile-termios): New variable.

[...]

> * gnu/packages/guile-xyz.scm (guile-tap): New variable.

Applied both, but in reverse order (guile-tap first, since guile-termios
depends on it.)

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 16 Jul 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 276 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.