summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2021-01-31 01:43:40 +0000
committerGuillaume Le Vaillant <glv@posteo.net>2021-01-31 10:27:37 +0100
commitb41d8a702d1f0df22c04f58bd7174e4906c2857f (patch)
tree590d254b16cfec5a8a7a20a3a2cfb10a6da64099 /gnu
parent67793f33ecd87d717fccd07b63ed6a221a056d6e (diff)
downloadguix-b41d8a702d1f0df22c04f58bd7174e4906c2857f.tar.gz
gnu: Add cl-mpg123.
* gnu/packages/lisp-xyz.scm (cl-mpg123, ecl-cl-mpg123, sbcl-cl-mpg123): New
  variables.

Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/lisp-xyz.scm55
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index b16d8d9191..3fa11ee7ba 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -10525,6 +10525,61 @@ online linear classification written in Common Lisp.")
 (define-public ecl-cl-online-learning
   (sbcl-package->ecl-package sbcl-cl-online-learning))
 
+(define-public sbcl-cl-mpg123
+  (let ((commit "5f042c839d2ea4a2ff2a7b60c839d8633d64161d")
+        (revision "1"))
+    (package
+      (name "sbcl-cl-mpg123")
+      (version (git-version "1.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/Shirakumo/cl-mpg123")
+               (commit commit)))
+         (file-name (git-file-name "cl-mpg123" version))
+         (sha256
+          (base32 "1hl721xaczxck008ax2y3jpkm509ry1sg3lklh2k76764m3ndrjf"))
+         (modules '((guix build utils)))
+         (snippet
+          '(begin
+             ;; Remove bundled pre-compiled libraries.
+             (delete-file-recursively "static")
+             #t))))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       `(#:asd-files '("cl-mpg123.asd" "cl-mpg123-example.asd")
+         #:asd-systems '("cl-mpg123" "cl-mpg123-example")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'fix-paths
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "low-level.lisp"
+                 (("libmpg123.so" all)
+                  (string-append (assoc-ref inputs "libmpg123")
+                                 "/lib/" all))))))))
+      (inputs
+       `(("cffi" ,sbcl-cffi)
+         ("cl-out123" ,sbcl-cl-out123)
+         ("documentation-utils" ,sbcl-documentation-utils)
+         ("libmpg123" ,mpg123)
+         ("trivial-features" ,sbcl-trivial-features)
+         ("trivial-garbage" ,sbcl-trivial-garbage)
+         ("verbose" ,sbcl-verbose)))
+      (home-page "https://shirakumo.github.io/cl-mpg123/")
+      (synopsis "Common Lisp bindings to libmpg123")
+      (description
+       "This is a bindings and wrapper library to @code{libmpg123} allowing for
+convenient, extensive, and fast decoding of MPEG1/2/3 (most prominently mp3)
+files.")
+      (license license:zlib))))
+
+(define-public ecl-cl-mpg123
+  (sbcl-package->ecl-package sbcl-cl-mpg123))
+
+(define-public cl-mpg123
+  (sbcl-package->cl-source-package sbcl-cl-mpg123))
+
 (define-public sbcl-cl-out123
   (let ((commit "6b58d3f8c2a28ad09059ac4c60fb3c781b9b421b")
         (revision "1"))