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

From: Reily Siegel <[email-masked]>
Date: Sat, 15 Jan 2022 20:51:22 -0500

---
 gnu/packages/clojure.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

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")
-- 
2.35.1