From: Artyom Bologov <mail@aartaka.me>
To: Sharlatan Hellseher <sharlatanus@gmail.com>
Cc: 68696@debbugs.gnu.org, Artyom Bologov <mail@aartaka.me>
Subject: [bug#68696] [PATCH] gnu: Add guile-lmdb.
Date: Fri, 26 Jan 2024 19:50:07 +0400 [thread overview]
Message-ID: <87jznwxf9q.fsf@aartaka.me> (raw)
In-Reply-To: <87sf2ljc1j.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 224 bytes --]
Hi Oleg,
Thanks for your patience in this review! I addressed most of comments
and ran guix lint on the installed package (not sure how exactly that
should work, but it didn't error at least). Find the new patch attached.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnu: Add guile-lmdb. --]
[-- Type: text/x-patch, Size: 2477 bytes --]
From 3f708d6977e238616e73f0aa11f7de66487754b3 Mon Sep 17 00:00:00 2001
From: Artyom Bologov <mail@aartaka.me>
Date: Wed, 24 Jan 2024 23:20:52 +0400
Subject: [PATCH] gnu: Add guile-lmdb.
* gnu/packages/guile-xyz.scm (guile-lmdb): New variable.
---
gnu/packages/guile-xyz.scm | 42 ++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 9c4c308d05..b175a16c41 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -2012,6 +2012,48 @@ (define-public guile-dbd-mysql
for MySQL.")
(license license:gpl2+)))
+(define-public guile-lmdb
+ (let ((commit "438143ca9ba157faec6f4c2740092c31c733fbfe")
+ (revision "0"))
+ (package
+ (name "guile-lmdb")
+ (version (git-version "0.0.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/aartaka/guile-lmdb")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0p43c8ppbhzpi944in0z2jqr7acl8pm7s1x0p5f0idqda6n6f828"))))
+ (build-system guile-build-system)
+ (arguments
+ (list
+ #:source-directory "modules"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'substitute-lmdb-so
+ (lambda _
+ (let ((lmdb (string-append
+ #$(this-package-input "lmdb") "/lib/liblmdb.so")))
+ (substitute* "modules/lmdb/lmdb.scm"
+ (("liblmdb.so") lmdb))))))))
+ (native-inputs (list guile-3.0))
+ (inputs (list guile-3.0 lmdb))
+ (home-page "https://github.com/aartaka/guile-lmdb")
+ (synopsis "Bindings for Lightning Memory-Mapped Database in Guile")
+ (description "This package provides a Scheme wrapper around liblmdb.so.
+Most names are the same as LMDB ones, except for prefix absence.
+Several conveniences are added on top:
+@itemize
+@item @code{call-with-env-and-txn} and @code{call-with-cursor} wrappers.
+@item @code{for-cursor} procedure for cursor iteration.
+@item @code{val} and @code{stat} types.
+@item Error signaling instead of integer return values.
+@end itemize")
+ (license license:gpl3+))))
+
(define-public guile-config
(package
(name "guile-config")
--
2.41.0
[-- Attachment #3: Type: text/plain, Size: 275 bytes --]
> You may simplify this part a little by using G-Expressions:
That's on my learning TODO list, haven't got to them yet!
> You may drop \n here.
Did it out of pure mimicking for other packages. Nice that I don't need
to cargo-cult it 😃
Thanks,
--
Artyom.
next prev parent reply other threads:[~2024-01-26 15:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 19:21 [bug#68696] [PATCH] gnu: Add guile-lmdb Artyom Bologov
2024-01-25 22:14 ` Sharlatan Hellseher
2024-01-26 15:50 ` Artyom Bologov [this message]
2024-01-26 22:17 ` bug#68696: " Sharlatan Hellseher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jznwxf9q.fsf@aartaka.me \
--to=mail@aartaka.me \
--cc=68696@debbugs.gnu.org \
--cc=sharlatanus@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.