Add guile-rsv package definition.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Yuval Langer
Owner
unassigned
Submitted by
Yuval Langer
Severity
normal
Y
Y
Yuval Langer wrote on 14 Jan 14:03 +0100
(address . guix-patches@gnu.org)
CAK0OjG1J-4bUVxrYvvYAcGUQNde0mwN-RcfDpNoCaUADQbC5kQ@mail.gmail.com
Hi,

this library implements the Rows of String Vectors file format as
specified by Stenway[1], an alternative to Comma Separated Values and
similar file formats.

It also provides two commands, rsv2scm and scm2rsv, for reading and
writing RSV files to and from a list of lists of strings.

The main repository is on Codeberg[2].

Many thanks,
Yuval Langer.

From c5361f0bf17b02a385b4782a2435c52519095c7a Mon Sep 17 00:00:00 2001
Message-Id: <c5361f0bf17b02a385b4782a2435c52519095c7a.1705236958.git.yuval.langer@gmail.com>
From: Yuval Langer <yuval.langer@gmail.com>
Date: Sun, 14 Jan 2024 14:54:10 +0200
Subject: [PATCH] Add guile-rsv package definition.

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

Toggle diff (76 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 77be632cc3..cb7c7f504b 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -5366,6 +5366,69 @@ using a short read-capability.")
(home-page "https://codeberg.org/eris/guile-eris")
(license license:gpl3+)))
+(define-public guile-rsv
+ (let ((commit-string "ecf0cbd486bb5f73e335e9e04212b0985f3efc35")
+ (base32-string "0cgnilix4050717xx3b2n45nfvr2hag1asbw92zs6mz6srq7xclq")
+ (git-repository-url "https://codeberg.org/kakafarm/guile-rsv/"))
+ (package
+ (name "guile-rsv")
+ (version "0.1.0")
+ (source
+ (origin
+ (uri (git-reference
+ (url git-repository-url)
+ (commit commit-string)))
+ (method git-fetch)
+ (file-name (git-file-name name version))
+ (sha256 (base32 base32-string))))
+ (inputs
+ (list guile-3.0
+ bash))
+ (build-system guile-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases
+ %standard-phases
+ (add-after 'install 'link-and-wrap-executable
+ (lambda _
+ (let* ([bin (string-append #$output
+ "/bin")] ;; bin directory for PATH.
+ [site-version (target-guile-effective-version)]
+ [scm (string-append "/share/guile/site/"
+ site-version)]
+ [go (string-append "/lib/guile/"
+ site-version
+ "/site-ccache")])
+ (mkdir-p bin)
+ (for-each (lambda (command-name)
+ (let ((source-script (string-append
+ #$output
+ scm
+ "/"
+ command-name
+ ".scm"))
+ (target-command (string-append
+ bin
+ "/"
+ command-name)))
+ (symlink source-script target-command)
+ (wrap-program target-command
+ #:sh (which "bash")
+ `("GUILE_LOAD_PATH" prefix
+ (,(string-append #$output scm)))
+ `("GUILE_LOAD_COMPILED_PATH" prefix
+ (,(string-append #$output go))))))
+ (list "scm2rsv" "rsv2scm"))))))))
+ (home-page git-repository-url)
+ (synopsis "R7RS Scheme library for reading and writing RSV data format")
+ (description "R7RS Scheme library for reading and writing RSV (Rows of String
+Values) data format. Specified in
+https://github.com/Stenway/RSV-Specification and demonstrated in
+https://www.youtube.com/watch?v=tb_70o6ohMA.")
+ (license (list license:gpl3+
+ license:expat-0)))))
+
(define-public guile-r6rs-protobuf
(package
(name "guile-r6rs-protobuf")
--
2.30.2
L
L
Ludovic Courtès wrote on 28 Jan 22:34 +0100
(name . Yuval Langer)(address . yuval.langer@gmail.com)(address . 68448@debbugs.gnu.org)
87sf2hdtvt.fsf@gnu.org
Hi Yulav,

Yuval Langer <yuval.langer@gmail.com> skribis:

Toggle quote (6 lines)
> From c5361f0bf17b02a385b4782a2435c52519095c7a Mon Sep 17 00:00:00 2001
> Message-Id: <c5361f0bf17b02a385b4782a2435c52519095c7a.1705236958.git.yuval.langer@gmail.com>
> From: Yuval Langer <yuval.langer@gmail.com>
> Date: Sun, 14 Jan 2024 14:54:10 +0200
> Subject: [PATCH] Add guile-rsv package definition.

Nice!

Toggle quote (16 lines)
> +(define-public guile-rsv
> + (let ((commit-string "ecf0cbd486bb5f73e335e9e04212b0985f3efc35")
> + (base32-string "0cgnilix4050717xx3b2n45nfvr2hag1asbw92zs6mz6srq7xclq")
> + (git-repository-url "https://codeberg.org/kakafarm/guile-rsv/"))
> + (package
> + (name "guile-rsv")
> + (version "0.1.0")
> + (source
> + (origin
> + (uri (git-reference
> + (url git-repository-url)
> + (commit commit-string)))
> + (method git-fetch)
> + (file-name (git-file-name name version))
> + (sha256 (base32 base32-string))))

[...]

Toggle quote (5 lines)
> + (add-after 'install 'link-and-wrap-executable
> + (lambda _
> + (let* ([bin (string-append #$output
> + "/bin")] ;; bin directory for PATH.

[...]

Toggle quote (7 lines)
> + (home-page git-repository-url)
> + (synopsis "R7RS Scheme library for reading and writing RSV data format")
> + (description "R7RS Scheme library for reading and writing RSV (Rows of String
> +Values) data format. Specified in
> +https://github.com/Stenway/RSV-Specification and demonstrated in
> +https://www.youtube.com/watch?v=tb_70o6ohMA.")

Could you please follow the conventions and style used elsewhere in the
code, in particular regarding how to deal with snapshots, avoiding
square brackets, possibly running ‘guix style guile-rsv’, and writing
synopsis and description following our guidelines:


Could you send an updated version?

Thanks in advance!

Ludo’.
Y
Y
Yuval Langer wrote on 6 Feb 14:15 +0100
Fwd: bug#68448: Add guile-rsv package definition.
(address . 68448@debbugs.gnu.org)
CAK0OjG0T2Y8au6f0boHH4zNZ5VYkZV4jr00OsJFaW-4AUjrj9A@mail.gmail.com
(re-sending to the debbugs thread)

On Sun, Jan 28, 2024 at 11:34?PM Ludovic Courtès <ludo@gnu.org> wrote:
Toggle quote (2 lines)
> Nice!

Thank you!

Toggle quote (10 lines)
> Could you please follow the conventions and style used elsewhere in the
> code, in particular regarding how to deal with snapshots, avoiding
> square brackets, possibly running ‘guix style guile-rsv’, and writing
> synopsis and description following our guidelines:
>
> https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html
> https://guix.gnu.org/manual/devel/en/html_node/Version-Numbers.html
>
> Could you send an updated version?

I have:

- Replaced the square brackets with parentheses in the let
definitions,
- added a revision number and used `git-version`,
- rewrote the synopsis and description,
- checked the style with `guix style -L . guile-rsv` in my own Guix
channel with this guile-rsv package definition, which seems to show
no style errors or recommendations, and

I hope these are sufficient.

Toggle quote (4 lines)
> Thanks in advance!
>
> Ludo’.

Thank you!
Yuval Langer.
L
L
Ludovic Courtès wrote 6 days ago
Re: bug#68448: Add guile-rsv package definition.
(name . Yuval Langer)(address . yuval.langer@gmail.com)(address . 68448-done@debbugs.gnu.org)
875xwgjr2n.fsf_-_@gnu.org
Hi Yulav,

Yuval Langer <yuval.langer@gmail.com> skribis:

Toggle quote (12 lines)
> I have:
>
> - Replaced the square brackets with parentheses in the let
> definitions,
> - added a revision number and used `git-version`,
> - rewrote the synopsis and description,
> - checked the style with `guix style -L . guile-rsv` in my own Guix
> channel with this guile-rsv package definition, which seems to show
> no style errors or recommendations, and
>
> I hope these are sufficient.

Apologies for the long delay. I made the cosmetic changes below, added
a commit log, and committed it.

Thanks!

Ludo’.
Toggle diff (78 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 874dd3d98a..c0b0dfd78c 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -5498,21 +5498,19 @@ (define-public guile-eris
(define-public guile-rsv
(let ((commit "41b04c85eef31d4d51001c6d66e8fd339fcc614c")
- (revision "1")
- (base32-string "1w9jbkpmh13zrxkj915nm3l537smm0jsrdzrzcxylb6w59vqpw6l")
- (git-repository-url "https://codeberg.org/kakafarm/guile-rsv/"))
+ (revision "1"))
(package
(name "guile-rsv")
(version (git-version "0.2.0" revision commit))
+ (home-page "https://codeberg.org/kakafarm/guile-rsv/")
(source
(origin
- (uri (git-reference
- (url git-repository-url)
- (commit commit)))
+ (uri (git-reference (url home-page) (commit commit)))
(method git-fetch)
(file-name (git-file-name name version))
(sha256
- (base32 base32-string))))
+ (base32
+ "1w9jbkpmh13zrxkj915nm3l537smm0jsrdzrzcxylb6w59vqpw6l"))))
(inputs (list guile-3.0 bash))
(build-system guile-build-system)
(arguments
@@ -5530,9 +5528,9 @@ (define-public guile-rsv
(mkdir-p bin)
(for-each (lambda (command-name)
(let ((source-script (string-append #$output
- scm "/"
- command-name
- ".scm"))
+ scm "/"
+ command-name
+ ".scm"))
(target-command (string-append
bin "/"
command-name)))
@@ -5544,22 +5542,19 @@ (define-public guile-rsv
`("GUILE_LOAD_COMPILED_PATH" prefix
(,(string-append #$output go))))))
(list "scm2rsv" "rsv2scm"))))))))
- (home-page git-repository-url)
- (synopsis
- "Library for reading and writing Rows of String Values data format")
+ (synopsis "Reading and writing @acronym{RSV, rows of string values} data format")
(description
- "R7RS-small Scheme library for reading and writing RSV (Rows of String
-Values) data format, a very simple binary format for storing tables of
-strings. It is a competitor for e.g. CSV (Comma Seperated Values),
-and TSV (Tab Separated Values). Its main benefit is that the strings
-are represented as Unicode encoded as UTF-8, and the value and row
-separators are byte values that are never used in UTF-8, so the
-strings do not need any error prone escaping and thus can be written
-and read verbatim.
+ "R7RS-small Scheme library for reading and writing @acronym{RSV, rows
+of string values} data format, a very simple binary format for storing tables
+of strings. It is a competitor for CSV (Comma Seperated Values) and TSV (Tab
+Separated Values). Its main benefit is that the strings are represented as
+Unicode encoded as UTF-8, and the value and row separators are byte values
+that are never used in UTF-8, so the strings do not need any error prone
+escaping and thus can be written and read verbatim.
-Specified in https://github.com/Stenway/RSV-Specification and
-demonstrated in https://www.youtube.com/watch?v=tb_70o6ohMA.")
- (license (list license:gpl3+ license:expat-0)))))
+The RSV format is specified in
+@url{https://github.com/Stenway/RSV-Specification}.")
+ (license license:gpl3+))))
(define-public guile-r6rs-protobuf
(package
Closed
?