summary refs log tree commit diff
diff options
context:
space:
mode:
authorPierre Neidhardt <ambrevar@gmail.com>2018-08-24 12:09:51 +0200
committerPierre Neidhardt <mail@ambrevar.xyz>2018-10-19 17:54:11 +0200
commitfbdd9b2c8bbcb70a6a9c05ece2d7a473c2075534 (patch)
tree5c99f7beaac1ab6a3734dfade61dc9beac9a932f
parent5800c538a1d46d7eae5e9f55ca0bddc7f8644545 (diff)
downloadguix-fbdd9b2c8bbcb70a6a9c05ece2d7a473c2075534.tar.gz
gnu: Add nibbles.
* gnu/packages/lisp.scm (cl-nibbles, ecl-nibbles, sbcl-nibbles): New variables.
-rw-r--r--gnu/packages/lisp.scm43
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 1953cf8f9c..3282c31c71 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -2067,3 +2067,46 @@ Common Lisp.")
 
 (define-public ecl-rt
   (sbcl-package->ecl-package sbcl-rt))
+
+(define-public sbcl-nibbles
+  (package
+    (name "sbcl-nibbles")
+    (version "0.14")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/sharplispers/nibbles/")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32
+         "1v7qfgpvdr6nz7v63dj69d26dis0kff3rd8xamr1llfdvza2pm8f"))
+       (file-name (git-file-name "nibbles" version))))
+    (build-system asdf-build-system/sbcl)
+    (native-inputs
+     ;; Tests only.
+     `(("rt" ,sbcl-rt)))
+    (synopsis "Common Lisp library for accessing octet-addressed blocks of data")
+    (description
+     "When dealing with network protocols and file formats, it's common to
+have to read or write 16-, 32-, or 64-bit datatypes in signed or unsigned
+flavors.  Common Lisp sort of supports this by specifying :element-type for
+streams, but that facility is underspecified and there's nothing similar for
+read/write from octet vectors.  What most people wind up doing is rolling their
+own small facility for their particular needs and calling it a day.
+
+This library attempts to be comprehensive and centralize such
+facilities.  Functions to read 16-, 32-, and 64-bit quantities from octet
+vectors in signed or unsigned flavors are provided; these functions are also
+SETFable.  Since it's sometimes desirable to read/write directly from streams,
+functions for doing so are also provided.  On some implementations,
+reading/writing IEEE singles/doubles (i.e. single-float and double-float) will
+also be supported.")
+    (home-page "https://github.com/sharplispers/nibbles")
+    (license license:bsd-3)))
+
+(define-public cl-nibbles
+  (sbcl-package->cl-source-package sbcl-nibbles))
+
+(define-public ecl-nibbles
+  (sbcl-package->ecl-package sbcl-nibbles))