From 0f1b94b57eda653176429b183f3f30de9c0d38d3 Mon Sep 17 00:00:00 2001
* gnu/packages/linux.scm (remserial): New variable.
gnu/packages/linux.scm | 61 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
Toggle diff (71 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index dacb29a6ac..006848aabd 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -9263,3 +9263,64 @@ libraries are found or why they cannot be located.")
gestures you make on your touchpad or touchscreen into visible actions in your
(license license:gpl3+)))
+(define-public remserial
+ (uri (list (string-append
+ "http://lpccomp.bc.ca/remserial/remserial-" version
+ ;; XXX: 'guix build' returns 405 "Method Not Allowed"
+ ;; for the official URL although 'guix download'
+ ;; fetches the file without any problems. Let's use
+ ;; the version from the Internet Archive for now.
+ "https://web.archive.org/web/20220406152331/"
+ "http://lpccomp.bc.ca/remserial/remserial-" version
+ "0jhi73pcnmvrg5zvhwc60gynp0c3r5z3fvi50vpv37smyibn55fn"))))
+ (build-system gnu-build-system)
+ (native-inputs (list linux-libre-headers))
+ #~(list (string-append "CC=" #$(cc-for-target))
+ "CFLAGS=-D_XOPEN_SOURCE=500")
+ #~(modify-phases %standard-phases
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin-dir (string-append out "/bin")))
+ (install-file "remserial" bin-dir)) #t)))))
+ (home-page "http://lpccomp.bc.ca/remserial/")
+ (synopsis "Communications bridge between TCP/IP and a serial port")
+ "The remserial program acts as a communications bridge
+between a TCP/IP network port and a Linux device such as a serial port. Any
+character-oriented Linux @file{/dev} device will work.
+The program can also use pseudo-ttys as the device. A pseudo-tty is like a
+serial port in that it has a @file{/dev} entry that can be opened by a program
+that expects a serial port device, except that instead of belonging to a
+physical serial device, the data can be intercepted by another program. The
+remserial program uses this to connect a network port to the
+\"master\" (programming) side of the pseudo-tty allowing the device
+driver (slave) side to be used by some program expecting a serial port.
+The program can operate as a server accepting network connections from other
+machines, or as a client, connecting to remote machine that is running the
+remserial program or some other program that accepts a raw network connection.
+The network connection passes data as-is, there is no control protocol over
+Multiple copies of the program can run on the same computer at the same time
+assuming each is using a different network port and device.")
+ (license license:gpl2+)))