diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-08-30 00:21:43 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-09-03 15:43:10 +0100 |
commit | 680674ba06ac209d44645cda122bcd50cc614e69 (patch) | |
tree | 7bd760cac52c9f6d0248ac2b0261b462c7996045 /gnu/packages | |
parent | 4dc9cd218dc089eb11ce1390a9db16849e957f8d (diff) | |
download | guix-680674ba06ac209d44645cda122bcd50cc614e69.tar.gz guix-680674ba06ac209d44645cda122bcd50cc614e69.zip |
gnu: Add go-github-com-hashicorp-golang-lru-arc-v2.
* gnu/packages/golang-xyz.scm (go-github-com-hashicorp-golang-lru-arc-v2): New variable.
Change-Id: Ia2ec812004d5864c18771780803c41cefc9870cb
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/golang-xyz.scm | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 82f95314c2..98642b12f0 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -3231,6 +3231,46 @@ Groupcache.") (list #:import-path "github.com/hashicorp/golang-lru/v2")))) +(define-public go-github-com-hashicorp-golang-lru-arc-v2 + (package + (name "go-github-com-hashicorp-golang-lru-arc-v2") + (version "2.0.7") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hashicorp/golang-lru") + (commit (string-append "arc/v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0jin9spx8mv3ynnnyplfmf7plxkym398aaqq04i7zklb716ld4gq")) + (modules '((guix build utils))) + (snippet + ;; It's a helper for go-build-system to compile import-path and + ;; unpack-path when it struggles to find module. + #~(begin + (mkdir "arc/v2") + (for-each (lambda (f) + (rename-file f (string-append "arc/v2/" (basename f)))) + (find-files "./arc")))))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/hashicorp/golang-lru/arc/v2" + #:unpack-path "github.com/hashicorp/golang-lru")) + (propagated-inputs + (list go-github-com-hashicorp-golang-lru-v2)) + (home-page "https://github.com/hashicorp/golang-lru") + (synopsis "Adaptive Replacement Cache") + (description + "@acronym{Adaptive Replacement Cache,ARC} is an enhancement over the +standard LRU cache in that tracks both frequency and recency of use. This +avoids a burst in access to new entries from evicting the frequently used +older entries. It adds some additional tracking overhead to a standard LRU +cache, computationally it is roughly 2x the cost, and the extra memory +overhead is linear with the size of the cache.") + (license license:mpl2.0))) + (define-public go-github-com-hashicorp-hcl (package (name "go-github-com-hashicorp-hcl") |