@@ -341,6 +341,57 @@ (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")
+ (home-page "https://github.com/clojure/core.memoize")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (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))
+ (synopsis "Manipulable, pluggable, memoization framework for Clojure")
+ (description "@code{core.memoize} is a Clojure contrib library providing
+the following features:
+
+An underlying PluggableMemoization protocol that allows the use of
+customizable and swappable memoization caches that adhere to the synchronous
+CacheProtocol found in core.cache
+
+Memoization builders for implementations of common caching strategies,
+including:
+
+First-in-first-out (clojure.core.memoize/fifo)
+
+Least-recently-used (clojure.core.memoize/lru)
+
+Least-used (clojure.core.memoize/lu)
+
+Time-to-live (clojure.core.memoize/ttl)
+
+Naive cache (memo) that duplicates the functionality of Clojure's memoize
+function but, unlike the built-in memoize function, ensures that in the case
+of concurrent calls with the same arguments, the memoized function is only
+invoked once; in addition memo can use metadata from the memoized function to
+ignore certain arguments for the purpose of creating the cache key, e.g.,
+allowing you to memoize clojure.java.jdbc functions where the first argument
+includes a (mutable) JDBC Connection object by specifying
+:clojure.core.memoize/args-fn rest in the metadata")
+ (license license:epl1.0)))
+
(define-public clojure-data-codec
(package
(name "clojure-data-codec")