diff mbox series

[bug#55922,1/2] gnu: Add guile-termios.

Message ID 20220616215356.2831-1-antero@mailbox.org
State Accepted
Headers show
Series [bug#55922,1/2] gnu: Add guile-termios. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Antero Mejr June 16, 2022, 9:53 p.m. UTC
* gnu/packages/guile-xyz.scm (guile-termios): New variable.
---
 gnu/packages/guile-xyz.scm | 44 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

Comments

Ludovic Courtès June 17, 2022, 8:53 p.m. UTC | #1
Hi,

Antero Mejr <antero@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’.
diff mbox series

Patch

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@gmail.com>
 ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
+;;; Copyright © 2022 Antero Mejr <antero@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)))