summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorGrigory Shepelev <shegeley@gmail.com>2025-06-22 19:23:19 +0300
committerZheng Junjie <z572@z572.online>2025-07-10 17:59:34 +0800
commitf7fb7734fad7fbf3d4c3affe58128106a614679a (patch)
tree6393304afb6dfd0d9dd9eed4b4b1c93a6eb73f49 /gnu/packages
parent75069c147b449c9a8abab264b2738dbee128dc8a (diff)
gnu: Add guile-srfi-125.
* gnu/packages/patches/guile-srfi-125-fix-r7rs-rename-clause.patch: New file. * gnu/local.mk (dist_patch_DATA): New entry for patch. * gnu/packages/guile-xyz.scm (guile-srfi-125): New variable. Change-Id: I4cbe67f67278a2be362a6e5a54a79dacae41011e Signed-off-by: Zheng Junjie <z572@z572.online>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/guile-xyz.scm52
-rw-r--r--gnu/packages/patches/guile-srfi-125-fix-r7rs-rename-clause.patch48
2 files changed, 100 insertions, 0 deletions
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 1722c55a6a0..4ae9fce966b 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -4470,6 +4470,58 @@ pre-alpha code.")
parameters, which define* and lambda* special forms")
(license license:gpl3+)))
+(define-public guile-srfi-125
+ (let ((revision "0")
+ (commit "556827a4b88b43acc0b941ac3f7f926ffad27e42"))
+ (package
+ (name "guile-srfi-125")
+ (version (git-version "0.0.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ "https://github.com/scheme-requests-for-implementation/srfi-125")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0dy839sq14h9y6fi4i27pli4xgz92zsswndad4fi0271rs2c26zy"))
+ (patches (search-patches "guile-srfi-125-fix-r7rs-rename-clause.patch"))
+ (snippet #~(begin
+ (rename-file "srfi/125.sld" "srfi/srfi-125.scm")
+ (delete-file "tables-test.sps")))))
+ (build-system guile-build-system)
+ (arguments (list #:not-compiled-file-regexp "body\\.scm$"))
+ (inputs (list guile-3.0))
+ (native-inputs (list guile-3.0 guile-srfi-126 guile-srfi-128))
+ (propagated-inputs (list guile-srfi-126 guile-srfi-128))
+ (home-page
+ "https://github.com/scheme-requests-for-implementation/srfi-125")
+ (synopsis "SRFI 125: Intermediate hash tables")
+ (description
+ "Procedures in this SRFI are drawn primarily from SRFI 69 and R6RS. In
+addition, the following sources are acknowledged:
+@itemize
+@item @code{hash-table-mutable?} procedure and the second argument of
+@code{hash-table-copy} (which allows the creation of immutable hash tables)
+are from R6RS, renamed in the style of this SRFI.
+@item @code{hash-table-intern!} procedure is from Racket, renamed in the style
+of this SRFI.
+@item @code{hash-table-find} procedure is a modified version of
+@code{table-search} in Gambit.
+@item procedures @code{hash-table-unfold} and @code{hash-table-count} were
+suggested by SRFI 1.
+@item procedures @code{hash-table=?} and @code{hash-table-map} were suggested
+by Haskell's @code{Data.Map.Strict} module.
+@item procedure @code{hash-table-map->list} is from Guile.
+@end itemize
+
+ The procedures @code{hash-table-empty?}, @code{hash-table-empty-copy},
+@code{hash-table-pop!}, @code{hash-table-map!},
+@code{hash-table-intersection!}, @code{hash-table-difference!}, and
+@code{hash-table-xor!} were added for convenience and completeness.")
+ (license license:expat))))
+
(define-public guile-srfi-126
(let ((revision "0")
(commit "f480cf2d1a33c1f3d0fab3baf321c0ed5b5eb248"))
diff --git a/gnu/packages/patches/guile-srfi-125-fix-r7rs-rename-clause.patch b/gnu/packages/patches/guile-srfi-125-fix-r7rs-rename-clause.patch
new file mode 100644
index 00000000000..d8670f38ba4
--- /dev/null
+++ b/gnu/packages/patches/guile-srfi-125-fix-r7rs-rename-clause.patch
@@ -0,0 +1,48 @@
+From 8f4942f0612b6cc6af56fc90146afcccfe67d85f Mon Sep 17 00:00:00 2001
+From: Grigory Shepelev <shegeley@gmail.com>
+Date: Sat, 25 May 2024 10:32:28 +0300
+Subject: [PATCH] srfi/125.sld: conform "rename" clause to r6rs
+
+---
+ srfi/125.sld | 25 ++++++++++++-------------
+ 1 file changed, 12 insertions(+), 13 deletions(-)
+
+diff --git a/srfi/125.sld b/srfi/125.sld
+index 08d9ac1..467c6a8 100644
+--- a/srfi/125.sld
++++ b/srfi/125.sld
+@@ -53,19 +53,18 @@
+
+ ;; The following procedures are deprecated by SRFI 125:
+
+- (rename deprecated:hash hash)
+- (rename deprecated:string-hash string-hash)
+- (rename deprecated:string-ci-hash string-ci-hash)
+- (rename deprecated:hash-by-identity hash-by-identity)
+-
+- (rename deprecated:hash-table-equivalence-function
+- hash-table-equivalence-function)
+- (rename deprecated:hash-table-hash-function hash-table-hash-function)
+- (rename deprecated:hash-table-exists? hash-table-exists?)
+- (rename deprecated:hash-table-walk hash-table-walk)
+- (rename deprecated:hash-table-merge! hash-table-merge!)
+-
+- )
++ (rename
++ (deprecated:hash hash)
++ (deprecated:string-hash string-hash)
++ (deprecated:string-ci-hash string-ci-hash)
++ (deprecated:hash-by-identity hash-by-identity)
++ (deprecated:string-ci-hash string-ci-hash)
++ (deprecated:hash-by-identity hash-by-identity)
++ (deprecated:hash-table-equivalence-function hash-table-equivalence-function)
++ (deprecated:hash-table-hash-function hash-table-hash-function)
++ (deprecated:hash-table-exists? hash-table-exists?)
++ (deprecated:hash-table-walk hash-table-walk)
++ (deprecated:hash-table-merge! hash-table-merge!)))
+
+ (import (scheme base)
+ (scheme write) ; for warnings about deprecated features
+--
+2.49.0
+