GNU bug report logs - #76431
[PATCH 0/3] gnu: Add sd.

Previous Next

Package: guix-patches;

Reported by: Andrew Wong <wongandj <at> icloud.com>

Date: Thu, 20 Feb 2025 06:42:02 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

To reply to this bug, email your comments to 76431 AT debbugs.gnu.org.
There is no need to reopen the bug first.

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

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


Report forwarded to divya <at> subvertising.org, efraim <at> flashner.co.il, guix-patches <at> gnu.org:
bug#76431; Package guix-patches. (Thu, 20 Feb 2025 06:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Wong <wongandj <at> icloud.com>:
New bug report received and forwarded. Copy sent to divya <at> subvertising.org, efraim <at> flashner.co.il, guix-patches <at> gnu.org. (Thu, 20 Feb 2025 06:42:02 GMT) Full text and rfc822 format available.

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

From: Andrew Wong <wongandj <at> icloud.com>
To: guix-patches <at> gnu.org
Cc: Andrew Wong <wongandj <at> icloud.com>
Subject: [PATCH 0/3] gnu: Add sd.
Date: Thu, 20 Feb 2025 01:40:42 -0500
This patch series adds the simple find-and-replace CLI, sd.

Andrew Wong (3):
  gnu: Add rust-ansi-to-html-0.1.
  gnu: Add rust-unescape-0.1.
  gnu: Add sd.

 gnu/packages/crates-io.scm | 44 ++++++++++++++++++++++++++++++
 gnu/packages/rust-apps.scm | 56 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 100 insertions(+)


base-commit: 5a897c5c95a81278b044c18d962d3bd83131ba06
-- 
2.48.1





Information forwarded to divya <at> subvertising.org, efraim <at> flashner.co.il, guix-patches <at> gnu.org:
bug#76431; Package guix-patches. (Thu, 20 Feb 2025 06:44:02 GMT) Full text and rfc822 format available.

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

From: Andrew Wong <wongandj <at> icloud.com>
To: 76431 <at> debbugs.gnu.org
Cc: Andrew Wong <wongandj <at> icloud.com>
Subject: [PATCH 1/3] gnu: Add rust-ansi-to-html-0.1.
Date: Thu, 20 Feb 2025 01:43:20 -0500
* gnu/packages/crates-io.scm (rust-ansi-to-html-0.1): New variable.

Change-Id: I7af10219f0c9b0af31a8efbefb12dbc6e62fc5c0
---
 gnu/packages/crates-io.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 50db1a02e8..cf237955fd 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -1805,6 +1805,29 @@ (define-public rust-ansi-str-0.8
 with ANSI strings.")
     (license license:expat)))
 
+(define-public rust-ansi-to-html-0.1
+  (package
+    (name "rust-ansi-to-html")
+    (version "0.1.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "ansi-to-html" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "18kwlgr3vfsij8gvl7vxw11yl628b1s8z2pldh73z4zzq2693gf7"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs (("rust-once-cell" ,rust-once-cell-1)
+                       ("rust-regex" ,rust-regex-1)
+                       ("rust-thiserror" ,rust-thiserror-1))))
+    (home-page
+     "https://github.com/Aloso/to-html/tree/master/crates/ansi-to-html")
+    (synopsis "ANSI escape codes to HTML converter")
+    (description "This package provides ANSI escape codes to HTML converter.")
+    (license license:expat)))
+
 (define-public rust-ansi-width-0.1
   (package
     (name "rust-ansi-width")
-- 
2.48.1





Information forwarded to divya <at> subvertising.org, efraim <at> flashner.co.il, guix-patches <at> gnu.org:
bug#76431; Package guix-patches. (Thu, 20 Feb 2025 06:44:02 GMT) Full text and rfc822 format available.

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

From: Andrew Wong <wongandj <at> icloud.com>
To: 76431 <at> debbugs.gnu.org
Cc: Andrew Wong <wongandj <at> icloud.com>
Subject: [PATCH 2/3] gnu: Add rust-unescape-0.1.
Date: Thu, 20 Feb 2025 01:43:21 -0500
* gnu/packages/crates-io.scm (rust-unescape-0.1): New variable.

Change-Id: I36a4a6433171e8ba2d94faafd7d5abd2607a7d41
---
 gnu/packages/crates-io.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index cf237955fd..a4fad9415f 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -88067,6 +88067,27 @@ (define-public rust-unchecked-index-0.2
      "Unchecked indexing wrapper using regular index syntax.")
     (license (list license:asl2.0 license:expat))))
 
+(define-public rust-unescape-0.1
+  (package
+    (name "rust-unescape")
+    (version "0.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "unescape" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0vlgws15n4kz8xq4igzr1f80nbiyr838k687hn6ly8a36an7vffc"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t))
+    (home-page "https://github.com/saghm/unescape-rs")
+    (synopsis
+     "Unescapes strings with escape sequences written out as literal characters")
+    (description
+     "This package provides Unescapes strings with escape sequences written out as literal characters.")
+    (license license:expat)))
+
 (define-public rust-ungrammar-1
   (package
     (name "rust-ungrammar")
-- 
2.48.1





Information forwarded to divya <at> subvertising.org, efraim <at> flashner.co.il, guix-patches <at> gnu.org:
bug#76431; Package guix-patches. (Thu, 20 Feb 2025 06:44:03 GMT) Full text and rfc822 format available.

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

From: Andrew Wong <wongandj <at> icloud.com>
To: 76431 <at> debbugs.gnu.org
Cc: Andrew Wong <wongandj <at> icloud.com>
Subject: [PATCH 3/3] gnu: Add sd.
Date: Thu, 20 Feb 2025 01:43:22 -0500
* gnu/packages/rust-apps.scm (sd): New variable.

Change-Id: Ie62904c26d29bfe9fc4e09b6abf39cb8b59861c7
---
 gnu/packages/rust-apps.scm | 56 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 69be633c5a..57f039924c 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -3726,6 +3726,62 @@ (define-public rtss
 consecutive lines and since program start.")
     (license license:expat)))
 
+(define-public sd
+  (package
+    (name "sd")
+    (version "1.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "sd" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1a16p1s0j28n3vj006qm7b03k5s9mkr11cbbksvfb88wi10kqqbh"))))
+    (build-system cargo-build-system)
+    (arguments
+     (list
+      #:cargo-inputs
+      `(("rust-ansi-term" ,rust-ansi-term-0.12)
+        ("rust-clap" ,rust-clap-4)
+        ("rust-is-terminal" ,rust-is-terminal-0.4)
+        ("rust-memmap2" ,rust-memmap2-0.9)
+        ("rust-rayon" ,rust-rayon-1)
+        ("rust-regex" ,rust-regex-1)
+        ("rust-tempfile" ,rust-tempfile-3)
+        ("rust-thiserror" ,rust-thiserror-1)
+        ("rust-unescape" ,rust-unescape-0.1))
+      #:cargo-development-inputs
+      `(("rust-ansi-to-html" ,rust-ansi-to-html-0.1)
+        ("rust-anyhow" ,rust-anyhow-1)
+        ("rust-assert-cmd" ,rust-assert-cmd-2)
+        ("rust-clap-mangen" ,rust-clap-mangen-0.2)
+        ("rust-console" ,rust-console-0.15)
+        ("rust-insta" ,rust-insta-1)
+        ("rust-proptest" ,rust-proptest-1)
+        ("rust-regex-automata" ,rust-regex-automata-0.4))
+      #:install-source? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'install-extras
+            (lambda _
+              (install-file "gen/sd.1"
+                            (string-append #$output "/share/man/man1"))
+              (with-directory-excursion "gen/completions"
+                (for-each
+                 (lambda (pair)
+                   (install-file (car pair)
+                                 (string-append #$output (cdr pair))))
+                 '(("_sd" . "/share/zsh/site-functions")
+                   ("sd.bash" . "/etc/bash_completion.d")
+                   ("sd.elv" . "/share/elvish/lib")
+                   ("sd.fish" . "/share/fish/vendor_completions.d")))))))))
+    (home-page "https://github.com/chmln/sd")
+    (synopsis "Intuitive find & replace CLI")
+    (description "@code{sd} is an intuitive find & replace CLI with
+JavaScript/Python-style regular expressions, a string-literal mode,
+and smart, common-sense defaults.")
+    (license license:expat)))
+
 (define-public skim
   (package
     (name "skim")
-- 
2.48.1





Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Thu, 20 Feb 2025 09:19:02 GMT) Full text and rfc822 format available.

Notification sent to Andrew Wong <wongandj <at> icloud.com>:
bug acknowledged by developer. (Thu, 20 Feb 2025 09:19:02 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Andrew Wong <wongandj <at> icloud.com>
Cc: 76431-done <at> debbugs.gnu.org, Divya Ranjan Pattanaik <divya <at> subvertising.org>
Subject: Re: [bug#76431] [PATCH 0/3] gnu: Add sd.
Date: Thu, 20 Feb 2025 11:18:34 +0200
[Message part 1 (text/plain, inline)]
On Thu, Feb 20, 2025 at 01:40:42AM -0500, Andrew Wong wrote:
> This patch series adds the simple find-and-replace CLI, sd.
> 
> Andrew Wong (3):
>   gnu: Add rust-ansi-to-html-0.1.
>   gnu: Add rust-unescape-0.1.
>   gnu: Add sd.
> 
>  gnu/packages/crates-io.scm | 44 ++++++++++++++++++++++++++++++
>  gnu/packages/rust-apps.scm | 56 ++++++++++++++++++++++++++++++++++++++
>  2 files changed, 100 insertions(+)
> 
> 
> base-commit: 5a897c5c95a81278b044c18d962d3bd83131ba06
> -- 
> 2.48.1
> 

Thanks!  I added a copyright line for you in each file and adjusted the
install-extras phase of sd so the completions would match the names of
the other completions (that is, sd.bash -> sd).

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 11 days ago.

Previous Next


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