From 0de3d44a16dcbbb28cc9f69381fe6913a7367835 Mon Sep 17 00:00:00 2001 From: Antero Mejr Date: Thu, 16 Jun 2022 21:53:55 +0000 Subject: gnu: Add guile-termios. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/guile-xyz.scm (guile-termios): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/guile-xyz.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index ff44f6c9de..2ed6617fd2 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -5061,3 +5061,45 @@ in two different guises.") 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 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))) -- cgit v1.2.3