GNU bug report logs - #68696
[PATCH] gnu: Add guile-lmdb.

Previous Next

Package: guix-patches;

Reported by: Artyom Bologov <mail <at> aartaka.me>

Date: Wed, 24 Jan 2024 19:26:02 UTC

Severity: normal

Tags: patch

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 68696 in the body.
You can then email your comments to 68696 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#68696; Package guix-patches. (Wed, 24 Jan 2024 19:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Artyom Bologov <mail <at> aartaka.me>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 24 Jan 2024 19:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Artyom Bologov <mail <at> aartaka.me>
To: Guix patches <guix-patches <at> gnu.org>
Subject: [PATCH] gnu: Add guile-lmdb.
Date: Wed, 24 Jan 2024 23:21:50 +0400
[Message part 1 (text/plain, inline)]
Hello Guix,

This patch adds guile-lmdb module.

[0001-gnu-Add-guile-lmdb.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
Thanks,
-- 
Artyom Bologov

Information forwarded to guix-patches <at> gnu.org:
bug#68696; Package guix-patches. (Thu, 25 Jan 2024 22:15:02 GMT) Full text and rfc822 format available.

Message #8 received at 68696 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: Artyom Bologov <mail <at> aartaka.me>
Cc: 68696 <at> debbugs.gnu.org
Subject: Re: [bug#68696] [PATCH] gnu: Add guile-lmdb.
Date: Thu, 25 Jan 2024 22:14:32 +0000
[Message part 1 (text/plain, inline)]
Hi,

Thank you for patch!

>+  (package
>+    (name "guile-lmdb")
>+    (version "0.0.1")
>+    (source (origin
>+              (method git-fetch)
>+              (uri (git-reference
>+                    (url "https://github.com/aartaka/guile-lmdb")
>+                    (commit "438143ca9ba157faec6f4c2740092c31c733fbfe")))
>+              (file-name (git-file-name name version))
>+              (sha256
>+               (base32
>+                "0p43c8ppbhzpi944in0z2jqr7acl8pm7s1x0p5f0idqda6n6f828"))))
As this project has no version tags, take a look at how the package
style may be altered in this case. (gnu packages lisp-xyz) contains
quite a lot of examples without releases.

--8<---------------cut here---------------start------------->8---
  (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"))))
--8<---------------cut here---------------end--------------->8---
- revision :: bumps on every package update in guix, starting from 0.

> +    (arguments
> +     '(#:source-directory "modules"
> +       #:phases (modify-phases %standard-phases
> +                  (add-before 'build 'substitute-lmdb-so
> +                    (lambda* (#:key inputs #:allow-other-keys)
> +                      (let ((lmdb (string-append (assoc-ref inputs "lmdb")
> +                                                 "/lib/liblmdb.so")))
> +                        (substitute*
> +                            '("modules/lmdb/lmdb.scm")
> +                          (("liblmdb.so")
> +                           lmdb))
> +                        #t))))))
You may simplify this part a little by using G-Expressions:

--8<---------------cut here---------------start------------->8---
    (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))))))))
--8<---------------cut here---------------end--------------->8---
- this-package-input commonly used replacement for (string-append
    (assoc-ref inputs ...
- lambdas in phases don't need trailing #t.

> + (synopsis "Bindings for LMDB (Lightning Memory-Mapped Database) in Guile.")
You need to drop full stop in the end of synopsis, and may use full
description instead of acronym+description.

> (description "Scheme wrapper around liblmdb.so.
It may be rephrased as "This package provides a scheme wrapper for liblmdb.so."

> +@end itemize\n")
You may drop \n here.

Please take a look at review points, and apply guix lint in the end.
Looking forward for V2!

Thans,
Oleg
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#68696; Package guix-patches. (Fri, 26 Jan 2024 15:55:01 GMT) Full text and rfc822 format available.

Message #11 received at 68696 <at> debbugs.gnu.org (full text, mbox):

From: Artyom Bologov <mail <at> aartaka.me>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 68696 <at> debbugs.gnu.org, Artyom Bologov <mail <at> aartaka.me>
Subject: Re: [bug#68696] [PATCH] gnu: Add guile-lmdb.
Date: Fri, 26 Jan 2024 19:50:07 +0400
[Message part 1 (text/plain, inline)]
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.

[0001-gnu-Add-guile-lmdb.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
> 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.

Reply sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
You have taken responsibility. (Fri, 26 Jan 2024 22:18:02 GMT) Full text and rfc822 format available.

Notification sent to Artyom Bologov <mail <at> aartaka.me>:
bug acknowledged by developer. (Fri, 26 Jan 2024 22:18:02 GMT) Full text and rfc822 format available.

Message #16 received at 68696-done <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 68696-done <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add guile-lmdb.
Date: Fri, 26 Jan 2024 22:17:24 +0000
[Message part 1 (text/plain, inline)]
Pushed as d9d97e26c152d7b5ff13f8aa7a030fee2004bf79 to master. 

Thanks,
Oleg
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 24 Feb 2024 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 176 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.