diff mbox series

[bug#53765,v3,05/17] gnu: Add clojure-core-memoize.

Message ID a596fb33c6103b150ec7c0f25e0ddb38f11bc539.1649248640.git.mail@reilysiegel.com
State New
Headers show
Series Remove limitations on clojure-tools | expand

Commit Message

Reily Siegel Jan. 16, 2022, 1:51 a.m. UTC
---
 gnu/packages/clojure.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/clojure.scm b/gnu/packages/clojure.scm
index 9063776921..0b4c7a623a 100644
--- a/gnu/packages/clojure.scm
+++ b/gnu/packages/clojure.scm
@@ -338,6 +338,40 @@  (define-public clojure-core-match
       (home-page "https://github.com/clojure/core.match")
       (license license:epl1.0))))
 
+(define-public clojure-core-memoize
+  (package
+    (name "clojure-core-memoize")
+    (version "1.0.253")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/clojure/core.memoize")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1qky54v114sh3xn0lffwy7xx3wnnayk07fr2nvhd4lih84sv6rdz"))))
+    (build-system clojure-build-system)
+    (arguments
+     '(#:source-dirs '("src/main/clojure")
+       #:test-dirs '("src/test/clojure")
+       #:doc-dirs '("docs")
+       ;; Tests fail when AOT'd.
+       #:aot-exclude '(#:all)))
+    (propagated-inputs (list clojure-core-cache))
+    (home-page "https://github.com/clojure/core.memoize")
+    (synopsis "Customisable memoization library supporting automatic removal")
+    (description "This memoization library supports various cache replacement
+strategies:
+
+ @itemize
+ @item @acronym{FIFO, first in first out}
+ @item @acronym{LRU, least recently used}
+ @item @acronym{TLL, time to live}
+ @item no replacement, the memoisation cache can grow indefinitely
+ @end itemize")
+    (license license:epl1.0)))
+
 (define-public clojure-data-codec
   (package
     (name "clojure-data-codec")