[PATCH 0/2] gnu: Add guile-srfi-146.

DoneSubmitted by pukkamustard.
Details
4 participants
  • Ludovic Courtès
  • Maxime Devos
  • (
  • pukkamustard
Owner
unassigned
Severity
normal
P
P
pukkamustard wrote on 8 Aug 10:32 +0200
(address . guix-patches@gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20220808083254.16059-1-pukkamustard@posteo.net
Hello Guix,

This adds Guile bindings to SRFI 146 (Mappings) and SRFI 128 (Comparators
(reduced) - a dependency of SRFI 146).

SRFI 146 provides some very nice purely functional data structures for
mappings.

This patch set should be tested (and applied) after #57053, which fixes the
build of a dependency (SRFI 158).

Best regards,
pukkamustard

pukkamustard (2):
gnu: Add guile-srfi-128.
gnu: Add guile-srfi-146.

gnu/packages/guile-xyz.scm | 60 ++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)

--
2.37.1
P
P
pukkamustard wrote on 8 Aug 10:36 +0200
[PATCH 1/2] gnu: Add guile-srfi-128.
(address . 57055@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20220808083601.16323-1-pukkamustard@posteo.net
* gnu/packages/guile-xyz.scm (guile-srfi-128): New variable.
---
gnu/packages/guile-xyz.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index cbdc9c5b66..2763fb73d0 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3091,6 +3091,33 @@ (define-public guile-srfi-89
 parameters, which  define* and lambda* special forms")
     (license license:gpl3+)))
 
+(define-public guile-srfi-128
+  (package
+    (name "guile-srfi-128")
+    (version "0.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://inqlab.net/git/guile-srfi-128.git")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32
+         "03d85q5l2gc2c8cmri6zd4pfndvnadlhwh77hsx6ixvvm8vwq4sy"))
+       (file-name (git-file-name name version))))
+    (build-system guile-build-system)
+    (native-inputs
+     (list guile-3.0))
+    (home-page "https://inqlab.net/git/guile-srfi-128.git")
+    (synopsis "SRFI 128 Comparators (reduced) port for Guile")
+    (description
+     "This package provides an implementation of SRFI 128 for Guile.
+SRFI 128 defines comparators, which bundles a test type predicate, an
+equality predicate, an ordering predicate and a hash function into a
+single Scheme object.  This can be used in the implementation of data
+structures.  This package re-uses the SRFI sample implementation.")
+    (license license:lgpl3+)))
+
 (define-public guile-srfi-145
   (package
     (name "guile-srfi-145")
-- 
2.37.1
P
P
pukkamustard wrote on 8 Aug 10:36 +0200
[PATCH 2/2] gnu: Add guile-srfi-146.
(address . 57055@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20220808083601.16323-2-pukkamustard@posteo.net
* gnu/packages/guile-xyz.scm (guile-srfi-146): New variable.
---
gnu/packages/guile-xyz.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 2763fb73d0..3eb1e90213 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3142,6 +3142,39 @@ (define-public guile-srfi-145
 denote the invalidity of certain code paths in a Scheme program.")
     (license license:gpl3+)))
 
+(define-public guile-srfi-146
+  (package
+    (name "guile-srfi-146")
+    (version "0.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://inqlab.net/git/guile-srfi-146.git")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32
+         "13dbzlav4fql8lcfr021z5368lwri6i15x0ykv8llzyghlbbx2w6"))
+       (file-name (git-file-name name version))))
+    (build-system gnu-build-system)
+    (native-inputs
+     (list autoconf automake pkg-config))
+    (inputs (list guile-3.0))
+    (propagated-inputs
+     (list guile-srfi-128 guile-srfi-145 guile-srfi-158))
+    (synopsis "SRFI 146 (Mappings) for Guile")
+    (description
+     "This package provides an implementation of SRFI 146 for Guile.
+SRFI 146 defines datastructures that implement mappings (finite sets
+of associations consiting of a key and a value).  Two types of
+mappings are defined: One using a comparator to define an order on the
+keys and another using a hash function on the keys.  The
+datastructures and procedures are by default purely-functional.  This
+package re-uses the SRFI sample implementation that is based on
+red-black trees and Hash Array Mapped Trie (HAMT).")
+    (home-page "https://inqlab.net/git/guile-srfi-146.git")
+    (license license:lgpl3+)))
+
 (define-public guile-srfi-158
   (let ((commit "13126d1ed37892c864337a600a43d6876625fb99")
         (revision "0"))
-- 
2.37.1
M
M
Maxime Devos wrote on 8 Aug 11:30 +0200
5ac83e05-863f-7d81-6f86-b738a7ae3fa2@telenet.be
On 08-08-2022 10:36, pukkamustard wrote:
Toggle quote (1 lines)
> + (inputs (list guile-3.0))
guile-3.0 is used as a compiler, so it needs to be in native-inputs. 
Does "guix build guile-srfi-146 --target=aarch64-linux-gnu" (or with
another target) work?
Toggle quote (1 lines)
> + (license license:lgpl3+)))
There are also some (ISC?) bits on
Also, Guix does not yet install the 'LICENSES' subdirectory, see
Greetings,
Maxime.
Attachment: OpenPGP_signature
P
P
pukkamustard wrote on 8 Aug 14:43 +0200
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 57055@debbugs.gnu.org)
86y1vy7uvq.fsf@posteo.net
Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (9 lines)
> [[PGP Signed Part:Undecided]]
>
> On 08-08-2022 10:36, pukkamustard wrote:
>> + (inputs (list guile-3.0))
>
> guile-3.0 is used as a compiler, so it needs to be in native-inputs. 
> Does "guix build guile-srfi-146 --target=aarch64-linux-gnu" (or with
> another target) work?

It does not!

Adding guile-3.0 to both native-inputs and inputs seems to solve this
(also for guile-srfi-158).

However, I then get following error:

```
no code for module (srfi srfi-128)
```

guile-srfi-128 is built using the guile-build-system. Maybe something
not working properly with guile-build-system and cross-compilation?

Do you have any ideas or suggestions on how to fix this?

Toggle quote (5 lines)
>> + (license license:lgpl3+)))
>
> There are also some (ISC?) bits on
> <https://inqlab.net/git/guile-srfi-146.git/tree/srfi/srfi-146.scm>.

Yes, the sample SRFI implementation is licensed under ISC. Afaiu,
there's no problem in relicensing this as LGPL-3.0-or-later. I think a
lot of the guile-srfi-* libraries do this.

Toggle quote (3 lines)
> Also, Guix does not yet install the 'LICENSES' subdirectory, see
> <https://issues.guix.gnu.org/54234#1>.

Noted.

Cheers,
pukkamustard
(
(address . 57055@debbugs.gnu.org)
CM0O8XWR12Q2.Q6NKD1C1955W@guix-aspire
On Mon Aug 8, 2022 at 1:43 PM BST, pukkamustard wrote:
Toggle quote (2 lines)
> Adding guile-3.0 to both native-inputs and inputs seems to solve this
> (also for guile-srfi-158).
You should only need to add it in native-inputs.

-- (
P
P
pukkamustard wrote on 8 Aug 15:47 +0200
(name . ()(address . paren@disroot.org)
86tu6m7sh9.fsf@posteo.net
"(" <paren@disroot.org> writes:

Toggle quote (5 lines)
> On Mon Aug 8, 2022 at 1:43 PM BST, pukkamustard wrote:
>> Adding guile-3.0 to both native-inputs and inputs seems to solve this
>> (also for guile-srfi-158).
> You should only need to add it in native-inputs.

If I only add guile-3.0 to native-inputs (and not to inputs), the build
fails like this:

```
configure: checking for guile 3.0
configure: checking for guile 2.2
configure: checking for guile 2.0
configure: error:
No Guile development packages were found.

Please verify that you have Guile installed. If you installed Guile
from a binary distribution, please verify that you have also installed
the development packages. If you installed it yourself, you might need
to adjust your PKG_CONFIG_PATH; see the pkg-config man page for more.

error: in phase 'configure': uncaught exception:
%exception #<&invoke-error program: "/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash" arguments: ("./configure" "CC_FOR_BUILD=gcc" "CONFIG_SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash" "SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash" "--prefix=/gnu/store/qhcnb9giiahhb2p7y7q05gs4ndhln4yk-guile-srfi-146-0.1.0" "--enable-fast-install" "--build=x86_64-unknown-linux-gnu" "--host=arm-linux-gnueabihf") exit-status: 1 term-signal: #f stop-signal: #f>
phase `configure' failed after 0.6 seconds
```

Quite possibly that something is wrong with the configure.ac. Same thing
also happens with guile-srfi-158.

-pukkamustard
M
M
Maxime Devos wrote on 8 Aug 20:22 +0200
(name . pukkamustard)(address . pukkamustard@posteo.net)(address . 57055@debbugs.gnu.org)
8aafcdc2-cb1a-6d38-1832-52fd53fc85ec@telenet.be
On 08-08-2022 14:43, pukkamustard wrote:
Toggle quote (7 lines)
>>> + (license license:lgpl3+)))
>> There are also some (ISC?) bits on
>> <https://inqlab.net/git/guile-srfi-146.git/tree/srfi/srfi-146.scm>.
> Yes, the sample SRFI implementation is licensed under ISC. Afaiu,
> there's no problem in relicensing this as LGPL-3.0-or-later. I think a
> lot of the guile-srfi-* libraries do this.
>
I have looked at license text, and it states that it allows
'sublicensing', but it doesn't say anything about relicensing (except
maybe for the "deal in the Software without restriction"?).
As such, I think it would be safer to just include license:isc in the list.
Greetings,
Maxime.
Attachment: file
Attachment: OpenPGP_signature
M
M
Maxime Devos wrote on 8 Aug 21:04 +0200
(name . pukkamustard)(address . pukkamustard@posteo.net)(address . 57055@debbugs.gnu.org)
4db0fbfe-ac09-e8fa-d16a-140d33bbd871@telenet.be
On 08-08-2022 14:43, pukkamustard wrote:
Toggle quote (6 lines)
> ```
> no code for module (srfi srfi-128)
> ```
>
> guile-srfi-128 is built using the guile-build-system. Maybe something
> not working properly with guile-build-system and cross-compilation?
I don't know about guile-build-system, but for some Guile packages that
use gnu-build-system, the package itself has to be added to
native-inputs when cross-compiling (this-package may be useful). I think
it has something to do with macros and the module system.
Greetings,
Maxime.
Attachment: OpenPGP_signature
P
P
pukkamustard wrote on 9 Aug 11:24 +0200
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 57055@debbugs.gnu.org)
86lerx7on3.fsf@posteo.net
Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (5 lines)
> I don't know about guile-build-system, but for some Guile packages
> that use gnu-build-system, the package itself has to be added to
> native-inputs when cross-compiling (this-package may be useful). I
> think it has something to do with macros and the module system.

That seems to do the trick. Adding the Guile libraries to the
native-inputs makes cross-compilation work.

I will send in a V2 of patches that fixes this.

Thanks,
pukkamustard
P
P
pukkamustard wrote on 9 Aug 11:30 +0200
[PATCH v2 1/2] gnu: Add guile-srfi-128.
(address . 57055@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20220809093009.26566-1-pukkamustard@posteo.net
* gnu/packages/guile-xyz.scm (guile-srfi-128): New variable.
---
gnu/packages/guile-xyz.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index c1aae8791f..f23d77c8d6 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3091,6 +3091,33 @@ (define-public guile-srfi-89
 parameters, which  define* and lambda* special forms")
     (license license:gpl3+)))
 
+(define-public guile-srfi-128
+  (package
+    (name "guile-srfi-128")
+    (version "0.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://inqlab.net/git/guile-srfi-128.git")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32
+         "03d85q5l2gc2c8cmri6zd4pfndvnadlhwh77hsx6ixvvm8vwq4sy"))
+       (file-name (git-file-name name version))))
+    (build-system guile-build-system)
+    (native-inputs
+     (list guile-3.0))
+    (home-page "https://inqlab.net/git/guile-srfi-128.git")
+    (synopsis "SRFI 128 Comparators (reduced) port for Guile")
+    (description
+     "This package provides an implementation of SRFI 128 for Guile.
+SRFI 128 defines comparators, which bundles a test type predicate, an
+equality predicate, an ordering predicate and a hash function into a
+single Scheme object.  This can be used in the implementation of data
+structures.  This package re-uses the SRFI sample implementation.")
+    (license license:lgpl3+)))
+
 (define-public guile-srfi-145
   (package
     (name "guile-srfi-145")
-- 
2.37.1
P
P
pukkamustard wrote on 9 Aug 11:30 +0200
[PATCH v2 2/2] gnu: Add guile-srfi-146.
(address . 57055@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20220809093009.26566-2-pukkamustard@posteo.net
* gnu/packages/guile-xyz.scm (guile-srfi-146): New variable.
---
gnu/packages/guile-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (48 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index f23d77c8d6..2db99dc33e 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3142,6 +3142,41 @@ (define-public guile-srfi-145
 denote the invalidity of certain code paths in a Scheme program.")
     (license license:gpl3+)))
 
+(define-public guile-srfi-146
+  (package
+    (name "guile-srfi-146")
+    (version "0.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://inqlab.net/git/guile-srfi-146.git")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32
+         "13dbzlav4fql8lcfr021z5368lwri6i15x0ykv8llzyghlbbx2w6"))
+       (file-name (git-file-name name version))))
+    (build-system gnu-build-system)
+    (native-inputs
+     (list guile-3.0
+           guile-srfi-128 guile-srfi-145 guile-srfi-158
+           autoconf automake pkg-config))
+    (inputs (list guile-3.0))
+    (propagated-inputs
+     (list guile-srfi-128 guile-srfi-145 guile-srfi-158))
+    (synopsis "SRFI 146 (Mappings) for Guile")
+    (description
+     "This package provides an implementation of SRFI 146 for Guile.
+SRFI 146 defines datastructures that implement mappings (finite sets
+of associations consiting of a key and a value).  Two types of
+mappings are defined: One using a comparator to define an order on the
+keys and another using a hash function on the keys.  The
+datastructures and procedures are by default purely-functional.  This
+package re-uses the SRFI sample implementation that is based on
+red-black trees and Hash Array Mapped Trie (HAMT).")
+    (home-page "https://inqlab.net/git/guile-srfi-146.git")
+    (license license:lgpl3+)))
+
 (define-public guile-srfi-158
   (let ((commit "13126d1ed37892c864337a600a43d6876625fb99")
         (revision "0"))
-- 
2.37.1
P
P
pukkamustard wrote on 19 Aug 15:41 +0200
Re: [bug#57055] [PATCH 2/2] gnu: Add guile-srfi-146.
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 57055@debbugs.gnu.org)
86sflse40m.fsf@posteo.net
Sorry for the delayed response. I seem to have missed this mail.

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (17 lines)
> [[PGP Signed Part:Undecided]]
> On 08-08-2022 14:43, pukkamustard wrote:
>
> + (license license:lgpl3+)))
>
> There are also some (ISC?) bits on
> <https://inqlab.net/git/guile-srfi-146.git/tree/srfi/srfi-146.scm>.
>
> Yes, the sample SRFI implementation is licensed under ISC. Afaiu,
> there's no problem in relicensing this as LGPL-3.0-or-later. I think a
> lot of the guile-srfi-* libraries do this.
>
> I have looked at license text, and it states that it allows 'sublicensing', but it doesn't say anything about relicensing (except maybe for
> the "deal in the Software without restriction"?).
>
> As such, I think it would be safer to just include license:isc in the list.

I'm no legal expert, but I think I am free to distribute it only
under LGPL-3.0-or-later (and not also ISC). And I prefer to do so.

For prior cases see modules/srfi/srfi-71.scm as distributed with
Guile. The file contains a SRFI sample implementation with the same ISC
license header. It seems to be fine to relicense modules distributed
with Guile as LGPL-3.0-or-later. In the Guix package definition for
Guile only license:lgpl3+ is listed (and not license:isc).

Cheers,
pukkamustard
M
M
Maxime Devos wrote on 19 Aug 22:34 +0200
(name . pukkamustard)(address . pukkamustard@posteo.net)(address . 57055@debbugs.gnu.org)
c9dc1aa3-0b61-9d14-a3fb-cf36b0b847f2@telenet.be
On 19-08-2022 15:41, pukkamustard wrote:
Toggle quote (2 lines)
> I'm no legal expert, but I think I am free to distribute it only
> under LGPL-3.0-or-later (and not also ISC). And I prefer to do so.
Sure, go ahead and distribute it as LGPL-3.0-or-later, but I don't see
how it follows that license:isc should be removed from the license list.
However, to me it seems inaccurate that you do not have to follow the
ISC by following the LGPL-3.0-or-later instead. The ISC has a line:
Toggle quote (3 lines)
> ;; [...] The above copyright notice and this permission notice shall
> be included
> ;; in all copies or substantial portions of the Software. [...]
Even if ISC permits relicensing, I would assume you will still have to
follow that. Otherwise, you could circumvent 'preserve this copyright
notice / preserve authorship information / ...’ requirements by
relicensing it as something very permissive, which seems a loophole to me.
Toggle quote (4 lines)
> For prior cases see modules/srfi/srfi-71.scm as distributed with
> Guile. The file contains a SRFI sample implementation with the same ISC
> license header. It seems to be fine to relicense modules distributed
> with Guile as LGPL-3.0-or-later.
I am not following, how is this relicensing?
Toggle quote (1 lines)
> In the Guix package definition for Guile only license:lgpl3+ is listed (and not license:isc).
Right, I would add license:isc with an appropriate comment to the list
in the Guile package definition, looks like the license information for
that package is incomplete.
[...]
More generally, I don't see a need for computing an 'effective license'
(*) of the licenses of the individual files, given the lack of legal
experts here and as 'licenses' accepts a list, not only a single item.
(*) things like 'isc or expat + lgplN-or-later -> lgplN-or-later'.
Greetings,
Maxime.
Attachment: OpenPGP_signature
P
P
pukkamustard wrote on 29 Aug 10:48 +0200
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 57055@debbugs.gnu.org)
861qszzazr.fsf@posteo.net
Hi,

I think I finally understand your reasoning (also thanks to the thread
on guix-devel -
agree.

Will send in V3 shortly with license:isc added to the list of licenses
with a comment.

Thank you for your elaborations and patience.

- pukkamustard

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (47 lines)
> [[PGP Signed Part:Undecided]]
> On 19-08-2022 15:41, pukkamustard wrote:
>
>> I'm no legal expert, but I think I am free to distribute it only
>> under LGPL-3.0-or-later (and not also ISC). And I prefer to do so.
> Sure, go ahead and distribute it as LGPL-3.0-or-later, but I don't see
> how it follows that license:isc should be removed from the license
> list.
>
> However, to me it seems inaccurate that you do not have to follow the
> ISC by following the LGPL-3.0-or-later instead. The ISC has a line:
>> ;; [...] The above copyright notice and this permission notice shall
>> be included
>> ;; in all copies or substantial portions of the Software. [...]
> Even if ISC permits relicensing, I would assume you will still have to
> follow that. Otherwise, you could circumvent 'preserve this copyright
> notice / preserve authorship information / ...’ requirements by
> relicensing it as something very permissive, which seems a loophole to
> me.
>> For prior cases see modules/srfi/srfi-71.scm as distributed with
>> Guile. The file contains a SRFI sample implementation with the same ISC
>> license header. It seems to be fine to relicense modules distributed
>> with Guile as LGPL-3.0-or-later.
>
> I am not following, how is this relicensing?
>
>> In the Guix package definition for Guile only license:lgpl3+ is listed (and not license:isc).
>
> Right, I would add license:isc with an appropriate comment to the list
> in the Guile package definition, looks like the license information
> for that package is incomplete.
>
> [...]
>
> More generally, I don't see a need for computing an 'effective
> license' (*) of the licenses of the individual files, given the lack
> of legal experts here and as 'licenses' accepts a list, not only a
> single item.
>
> (*) things like 'isc or expat + lgplN-or-later -> lgplN-or-later'.
>
> Greetings,
> Maxime.
>
> [2. OpenPGP public key --- application/pgp-keys; OpenPGP_0x49E3EE22191725EE.asc]...
>
> [[End of PGP Signed Part]]
P
P
pukkamustard wrote on 29 Aug 10:56 +0200
[PATCH v3 2/2] gnu: Add guile-srfi-146.
(address . 57055@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20220829085600.3253-2-pukkamustard@posteo.net
* gnu/packages/guile-xyz.scm (guile-srfi-146): New variable.
---
gnu/packages/guile-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (51 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 52aa6d5f6a..483ec15676 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3145,6 +3145,44 @@ (define-public guile-srfi-145
 denote the invalidity of certain code paths in a Scheme program.")
     (license license:gpl3+)))
 
+(define-public guile-srfi-146
+  (package
+    (name "guile-srfi-146")
+    (version "0.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://inqlab.net/git/guile-srfi-146.git")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32
+         "13dbzlav4fql8lcfr021z5368lwri6i15x0ykv8llzyghlbbx2w6"))
+       (file-name (git-file-name name version))))
+    (build-system gnu-build-system)
+    (native-inputs
+     (list guile-3.0
+           guile-srfi-128 guile-srfi-145 guile-srfi-158
+           autoconf automake pkg-config))
+    (inputs (list guile-3.0))
+    (propagated-inputs
+     (list guile-srfi-128 guile-srfi-145 guile-srfi-158))
+    (synopsis "SRFI 146 (Mappings) for Guile")
+    (description
+     "This package provides an implementation of SRFI 146 for Guile.
+SRFI 146 defines datastructures that implement mappings (finite sets
+of associations consiting of a key and a value).  Two types of
+mappings are defined: One using a comparator to define an order on the
+keys and another using a hash function on the keys.  The
+datastructures and procedures are by default purely-functional.  This
+package re-uses the SRFI sample implementation that is based on
+red-black trees and Hash Array Mapped Trie (HAMT).")
+    (home-page "https://inqlab.net/git/guile-srfi-146.git")
+    (license
+     (list license:lgpl3+
+           ;; contains ISC code from the SRFI sample implementation
+           license:isc))))
+
 (define-public guile-srfi-158
   (let ((commit "13126d1ed37892c864337a600a43d6876625fb99")
         (revision "0"))
-- 
2.37.1
P
P
pukkamustard wrote on 29 Aug 10:55 +0200
[PATCH v3 1/2] gnu: Add guile-srfi-128.
(address . 57055@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20220829085600.3253-1-pukkamustard@posteo.net
* gnu/packages/guile-xyz.scm (guile-srfi-128): New variable.
---
gnu/packages/guile-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (43 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index c1aae8791f..52aa6d5f6a 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3091,6 +3091,36 @@ (define-public guile-srfi-89
 parameters, which  define* and lambda* special forms")
     (license license:gpl3+)))
 
+(define-public guile-srfi-128
+  (package
+    (name "guile-srfi-128")
+    (version "0.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://inqlab.net/git/guile-srfi-128.git")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32
+         "03d85q5l2gc2c8cmri6zd4pfndvnadlhwh77hsx6ixvvm8vwq4sy"))
+       (file-name (git-file-name name version))))
+    (build-system guile-build-system)
+    (native-inputs
+     (list guile-3.0))
+    (home-page "https://inqlab.net/git/guile-srfi-128.git")
+    (synopsis "SRFI 128 Comparators (reduced) port for Guile")
+    (description
+     "This package provides an implementation of SRFI 128 for Guile.
+SRFI 128 defines comparators, which bundles a test type predicate, an
+equality predicate, an ordering predicate and a hash function into a
+single Scheme object.  This can be used in the implementation of data
+structures.  This package re-uses the SRFI sample implementation.")
+    (license
+     (list license:lgpl3+
+           ;; contains ISC code from the SRFI sample implementation
+           license:isc))))
+
 (define-public guile-srfi-145
   (package
     (name "guile-srfi-145")
-- 
2.37.1
L
L
Ludovic Courtès wrote on 31 Aug 23:14 +0200
Re: bug#57055: [PATCH 0/2] gnu: Add guile-srfi-146.
(name . pukkamustard)(address . pukkamustard@posteo.net)(address . 57055-done@debbugs.gnu.org)
8735dc9ku4.fsf_-_@gnu.org
Hi pukkamustard,

pukkamustard <pukkamustard@posteo.net> skribis:

Toggle quote (2 lines)
> * gnu/packages/guile-xyz.scm (guile-srfi-128): New variable.

[...]

Toggle quote (2 lines)
> * gnu/packages/guile-xyz.scm (guile-srfi-146): New variable.

Applied. Thank you, and thanks Maxime for reviewing!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 57055@debbugs.gnu.org