[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#68696] [PATCH] gnu: Add guile-lmdb.
From: |
Sharlatan Hellseher |
Subject: |
[bug#68696] [PATCH] gnu: Add guile-lmdb. |
Date: |
Thu, 25 Jan 2024 22:14:32 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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
Description: PGP signature