diff --git a/gnu/local.mk b/gnu/local.mk index 02b59fd29f5..727278846fb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2307,6 +2307,7 @@ dist_patch_DATA = \ %D%/packages/patches/softhsm-fix-openssl3-tests.patch \ %D%/packages/patches/spectre-meltdown-checker-externalize-fwdb.patch \ %D%/packages/patches/sphinxbase-fix-doxygen.patch \ + %D%/packages/patches/guile-srfi-125-fix-r7rs-rename-clause.patch \ %D%/packages/patches/sssd-system-directories.patch \ %D%/packages/patches/steghide-fixes.patch \ %D%/packages/patches/suitesparse-mongoose-cmake.patch \ 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 +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 +