[PATCH 0/7] Add difft program.

  • Open
  • quality assurance status badge
Details
One participant
  • muradm
Owner
unassigned
Submitted by
muradm
Severity
normal
M
M
muradm wrote on 10 Mar 08:30 +0100
(address . guix-patches@gnu.org)
cover.1710055564.git.mail@muradm.net
Difftastic is a CLI diff tool that compares files based on their syntax, not line-by-line. Difftastic produces accurate diffs that are easier for humans to read.

muradm (7):
gnu: Add rust-line-numbers-0.3.
gnu: Add rust-mimalloc-0.1.
gnu: Add rust-quine-mc-cluskey-0.2.
gnu: Add rust-radix-heap-0.4.
gnu: Add rust-tree-sitter-0.20.
gnu: Add rust-wu-diff-0.1.
gnu: Add difft.

gnu/packages/crates-io.scm | 124 +++++++++++++++++++++++++++++++++++++
gnu/packages/rust-apps.scm | 70 +++++++++++++++++++++
2 files changed, 194 insertions(+)


base-commit: b4e60b836224291ab17c470a845c057e6ecd5970
--
2.41.0
M
M
muradm wrote on 10 Mar 08:59 +0100
[PATCH 1/7] gnu: Add rust-line-numbers-0.3.
(address . guix-patches@gnu.org)
a619ff225c3961a553788c669ea181f61dd343bc.1710055564.git.mail@muradm.net
* gnu/packages/crates-io.scm (rust-line-numbers-0.3): New variable.

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

Toggle diff (32 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 1a08748392..1e828257b6 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -34800,6 +34800,25 @@ (define-public rust-line-col-0.2
(description "Convert string slice indices into line/column numbers")
(license license:expat)))
+(define-public rust-line-numbers-0.3
+ (package
+ (name "rust-line-numbers")
+ (version "0.3.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "line-numbers" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0p531c7w7viilf7q1k277zmy8ihl8064vx0r7jm5z02ki03ga9bv"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t))
+ (home-page "https://github.com/wilfred/line-numbers")
+ (synopsis "Find line numbers in strings by byte offsets, quickly")
+ (description "Find line numbers in strings by byte offsets, quickly")
+ (license license:expat)))
+
(define-public rust-line-wrap-0.1
(package
(name "rust-line-wrap")
--
2.41.0
M
M
muradm wrote on 10 Mar 08:59 +0100
[PATCH 2/7] gnu: Add rust-mimalloc-0.1.
(address . guix-patches@gnu.org)
50a3bdf1e6ab302f9ae0006c37572f9576225a0e.1710055564.git.mail@muradm.net
* gnu/packages/crates-io.scm (rust-mimalloc-0.1): New variable.

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

Toggle diff (32 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 1e828257b6..09625aa52f 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -37806,6 +37806,25 @@ (define-public rust-migrations-macros-1
embedded migrations.")
(license (list license:expat license:asl2.0))))
+(define-public rust-mimalloc-0.1
+ (package
+ (name "rust-mimalloc")
+ (version "0.1.39")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "mimalloc" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "176w9gf5qxs07kd2q39f0k25rzmp4kyx5r13wc8sk052bqmr40gs"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs (("rust-libmimalloc-sys" ,rust-libmimalloc-sys-0.1))))
+ (home-page "https://github.com/purpleprotocol/mimalloc_rust")
+ (synopsis "Performance and security oriented drop-in allocator")
+ (description "Performance and security oriented drop-in allocator")
+ (license license:expat)))
+
(define-public rust-mimalloc-rust-0.1
(package
(name "rust-mimalloc-rust")
--
2.41.0
M
M
muradm wrote on 10 Mar 08:59 +0100
[PATCH 4/7] gnu: Add rust-radix-heap-0.4.
(address . guix-patches@gnu.org)
597ccf3d1df8617a63e7e5c4565c048296b87f3c.1710055565.git.mail@muradm.net
* gnu/packages/crates-io.scm (rust-radix-heap-0.4): New variable.

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

Toggle diff (33 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 5d8fcfa9f1..7933d9910e 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -52748,6 +52748,26 @@ (define-public rust-radix-fmt-1
radix.")
(license license:asl2.0)))
+(define-public rust-radix-heap-0.4
+ (package
+ (name "rust-radix-heap")
+ (version "0.4.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "radix-heap" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "00g6vq9dn5v5h8sj2298h6zk3pm3wq8qhacrnjak40b4yjfyrzsr"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-ordered-float" ,rust-ordered-float-2))))
+ (home-page "https://github.com/mpdn/radix-heap")
+ (synopsis "Fast monotone priority queues")
+ (description "Fast monotone priority queues")
+ (license license:expat)))
+
(define-public rust-radix-trie-0.2
(package
(name "rust-radix-trie")
--
2.41.0
M
M
muradm wrote on 10 Mar 08:59 +0100
[PATCH 6/7] gnu: Add rust-wu-diff-0.1.
(address . guix-patches@gnu.org)
4f17a62e06df6506fcf18aa310cb28c51ec4790a.1710055565.git.mail@muradm.net
* gnu/packages/crates-io.scm (rust-wu-diff-0.1): New variable.

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

Toggle diff (35 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 3493fb8ffc..b8797326f4 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -78275,6 +78275,28 @@ (define-public rust-winnow-0.4
("rust-memchr" ,rust-memchr-2)
("rust-terminal-size" ,rust-terminal-size-0.2))))))
+(define-public rust-wu-diff-0.1
+ (package
+ (name "rust-wu-diff")
+ (version "0.1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "wu-diff" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "14w8yacn4hk9k4rfzshlgir966xbwgbwk3fvf0l461nyzhsnfglf"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-clippy" ,rust-clippy-0.0))))
+ (home-page "https://github.com/bokuweb/wu-diff-rs")
+ (synopsis
+ "Compute differences between two slices using wu(the O(NP)) algorithm.")
+ (description
+ "Compute differences between two slices using wu(the O(NP)) algorithm.")
+ (license license:expat)))
+
(define-public rust-wycheproof-0.5
(package
(name "rust-wycheproof")
--
2.41.0
M
M
muradm wrote on 10 Mar 08:59 +0100
[PATCH 5/7] gnu: Add rust-tree-sitter-0.20.
(address . guix-patches@gnu.org)
40ee89a3428a615142e5ba1500c80975ac9178eb.1710055565.git.mail@muradm.net
* gnu/packages/crates-io.scm (rust-tree-sitter-0.20): New variable.

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

Toggle diff (35 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 7933d9910e..3493fb8ffc 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -73923,6 +73923,28 @@ (define-public rust-tree-magic-0.2
traversing a filetype tree.")
(license license:expat)))
+(define-public rust-tree-sitter-0.20
+ (package
+ (name "rust-tree-sitter")
+ (version "0.20.10")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "tree-sitter" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0g9xd1nadhb2ikhxkj0z7kg9f50h97hzmha8llwyscdrnzwv2iz7"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-cc" ,rust-cc-1)
+ ("rust-lazy-static" ,rust-lazy-static-1)
+ ("rust-regex" ,rust-regex-1))))
+ (home-page "https://tree-sitter.github.io/tree-sitter")
+ (synopsis "Rust bindings to the Tree-sitter parsing library")
+ (description "Rust bindings to the Tree-sitter parsing library")
+ (license license:expat)))
+
(define-public rust-treeline-0.1
(package
(name "rust-treeline")
--
2.41.0
M
M
muradm wrote on 10 Mar 08:59 +0100
[PATCH 7/7] gnu: Add difft.
(address . guix-patches@gnu.org)
a10ff772d1ca730dc6eb20c569f7fa425129e444.1710055565.git.mail@muradm.net
* gnu/packages/rust-apps.scm (difft): New variable.

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

Toggle diff (97 lines)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 7313cdef77..fbd2dd935e 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -31,6 +31,7 @@
;;; Copyright © 2024 Herman Rimm <herman@rimm.ee>
;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
;;; Copyright © 2024 Suhail Singh <suhail@bayesians.ca>
+;;; Copyright © 2024 muradm <mail@muradm.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -61,6 +62,7 @@ (define-module (gnu packages rust-apps)
#:use-module (gnu packages admin)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages c)
#:use-module (gnu packages compression)
#:use-module (gnu packages crates-apple)
#:use-module (gnu packages crates-crypto)
@@ -424,6 +426,74 @@ (define-public diffr
highlighting tool to ease code review from your terminal.")
(license license:expat)))
+(define-public difft
+ (package
+ (name "difft")
+ (version "0.56.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "difftastic" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1zr2zq5a58nni6113vd5nvinrw8y4p9y697mh8hs91mj3w3n4nd2"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (substitute* "Cargo.toml"
+ (("< 1.10") "<= 1.10") ;; regex
+ (("2.0.2") "2.0.1") ;; typed-arena
+ (("2.0.5") "2.0.12") ;; assert_cmd
+ (("0.4.19") "0.5") ;; ignore
+ (("0.1.24") "0.1.35") ;; libmimalloc-sys
+ (("0.1.28") "0.1.39") ;; mimalloc
+ (("2.1.1") "2.1.5")))))) ;; predicates
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs (("rust-bumpalo" ,rust-bumpalo-3)
+ ("rust-cc" ,rust-cc-1)
+ ("rust-clap" ,rust-clap-3)
+ ("rust-const-format" ,rust-const-format-0.2)
+ ("rust-crossterm" ,rust-crossterm-0.27)
+ ("rust-glob" ,rust-glob-0.3)
+ ("rust-hashbrown" ,rust-hashbrown-0.14)
+ ("rust-humansize" ,rust-humansize-2)
+ ("rust-ignore" ,rust-ignore-0.4)
+ ("rust-itertools" ,rust-itertools-0.11)
+ ("rust-lazy-static" ,rust-lazy-static-1)
+ ("rust-libc" ,rust-libc-0.2)
+ ("rust-libmimalloc-sys" ,rust-libmimalloc-sys-0.1)
+ ("rust-line-numbers" ,rust-line-numbers-0.3)
+ ("rust-log" ,rust-log-0.4)
+ ("rust-mimalloc" ,rust-mimalloc-0.1)
+ ("rust-owo-colors" ,rust-owo-colors-3)
+ ("rust-pretty-env-logger" ,rust-pretty-env-logger-0.5)
+ ("rust-radix-heap" ,rust-radix-heap-0.4)
+ ("rust-rayon" ,rust-rayon-1)
+ ("rust-rayon" ,rust-rayon-1)
+ ("rust-regex" ,rust-regex-1)
+ ("rust-rustc-hash" ,rust-rustc-hash-1)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-json" ,rust-serde-json-1)
+ ("rust-strsim" ,rust-strsim-0.10)
+ ("rust-strum" ,rust-strum-0.25)
+ ("rust-tree-sitter" ,rust-tree-sitter-0.20)
+ ("rust-tree-magic-mini" ,rust-tree-magic-mini-3)
+ ("rust-typed-arena" ,rust-typed-arena-2)
+ ("rust-unicode-width" ,rust-unicode-width-0.1)
+ ("rust-version-check" ,rust-version-check-0.9)
+ ("rust-wu-diff" ,rust-wu-diff-0.1))
+ #:cargo-development-inputs (("rust-assert-cmd" ,rust-assert-cmd-2)
+ ("rust-predicates" ,rust-predicates-2)
+ ("rust-pretty-assertions" ,rust-pretty-assertions-1))))
+ (inputs
+ (list mimalloc))
+ (home-page "http://difftastic.wilfred.me.uk/")
+ (synopsis "A structural diff that understands syntax.")
+ (description
+ "This package provides a structural diff that understands syntax.")
+ (license license:expat)))
+
(define-public drill
(package
(name "drill")
--
2.41.0
M
M
muradm wrote on 10 Mar 08:59 +0100
[PATCH 3/7] gnu: Add rust-quine-mc-cluskey-0.2.
(address . guix-patches@gnu.org)
c6140c5ebed3816260c5c80bc2aadee5a77ccf2c.1710055565.git.mail@muradm.net
* gnu/packages/crates-io.scm (rust-quine-mc-cluskey-0.2): New variable.

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

Toggle diff (35 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 09625aa52f..5d8fcfa9f1 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -52324,6 +52324,28 @@ (define-public rust-quickersort-3
numbers.")
(license (list license:expat license:asl2.0))))
+(define-public rust-quine-mc-cluskey-0.2
+ (package
+ (name "rust-quine-mc-cluskey")
+ (version "0.2.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "quine-mc_cluskey" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0iazdlwffhrlksb8yhhs1prgwpa68rwjwqm4v26hr9hrswarcn07"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-quickcheck" ,rust-quickcheck-0.3))))
+ (home-page "https://github.com/oli-obk/quine-mc_cluskey")
+ (synopsis
+ "Rust implementation of the Quine-McCluskey algorithm and Petrick's method")
+ (description
+ "Rust implementation of the Quine-@code{McCluskey} algorithm and Petrick's method")
+ (license license:expat)))
+
(define-public rust-quinn-0.10
(package
(name "rust-quinn")
--
2.41.0
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 69696@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69696
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch