summary refs log tree commit diff
diff options
context:
space:
mode:
authorFoo Chuan Wei <chuanwei.foo@hotmail.com>2021-12-10 06:16:37 +0000
committerGuillaume Le Vaillant <glv@posteo.net>2021-12-11 11:11:23 +0100
commit17bbd5ae070ff99335fbb45ad08a0add0223ce78 (patch)
tree152fb47f5fc1dfcbcf91f1c2e58ebf333f308cc1
parente8fa25f6a4fd2748666bfdba197cddc28b9c2ddc (diff)
downloadguix-17bbd5ae070ff99335fbb45ad08a0add0223ce78.tar.gz
gnu: Add cl-rmath.
* gnu/packages/lisp-xyz.scm (cl-rmath, ecl-cl-rmath, sbcl-cl-rmath):
  New variables.

Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
-rw-r--r--gnu/packages/lisp-xyz.scm46
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 54b33d742b..ebc528f84e 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -93,6 +93,7 @@
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages statistics)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages video)
@@ -19462,6 +19463,51 @@ from low-level concerns and reducing the number of bugs in numerical code.")
 (define-public ecl-lla
   (sbcl-package->ecl-package sbcl-lla))
 
+(define-public sbcl-cl-rmath
+  (let ((commit "f6add1edda31547691d08e36ccf6c17305161aca")
+        (revision "1"))
+    (package
+      (name "sbcl-cl-rmath")
+      (version (git-version "0.0.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/tpapp/cl-rmath")
+               (commit commit)))
+         (file-name (git-file-name "cl-rmath" version))
+         (sha256
+          (base32 "1ld8vbpy10paymx2hn0mcgd21i7cjhdrayln1jx0kayqxm12mmk4"))))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'fix-paths
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "cl-rmath.lisp"
+                 (("\\(cffi:define-foreign-library librmath" all)
+                  (string-append all "\n"
+                                 "  (:unix \""
+                                 (assoc-ref inputs "librmath")
+                                 "/lib/libRmath.so\")"))))))))
+      (inputs
+       `(("cffi" ,sbcl-cffi)
+         ("librmath" ,rmath-standalone)))
+      (home-page "https://github.com/tpapp/cl-rmath")
+      (synopsis "Common Lisp wrapper for libRmath")
+      (description
+       "@code{cl-rmath} is a simple, autogenerated foreign interface for the
+standalone R API @code{libRmath}.  There has been no effort to provide a
+high-level interface for the original library, instead, this library is meant
+to serve as a building block for such an interface.")
+      (license license:boost1.0))))
+
+(define-public cl-rmath
+  (sbcl-package->cl-source-package sbcl-cl-rmath))
+
+(define-public ecl-cl-rmath
+  (sbcl-package->ecl-package sbcl-cl-rmath))
+
 (define-public sbcl-cl-tld
   ;; No release.
   (let ((commit "f5014da8d831fa9481d4181d4450f10a52850c75"))