* [bug#39488] [PATCH] gnu: add fd.
@ 2020-02-07 17:27 John Soo
2020-02-08 19:05 ` bug#39488: " Efraim Flashner
0 siblings, 1 reply; 2+ messages in thread
From: John Soo @ 2020-02-07 17:27 UTC (permalink / raw)
To: 39488
[-- Attachment #1: Type: text/plain, Size: 73 bytes --]
Hi Guix,
fd is a fast program like find written in rust.
Thanks,
John
[-- Attachment #2: 0002-gnu-Add-rust-ctrlc-3.1.patch --]
[-- Type: text/x-patch, Size: 1624 bytes --]
From 3a09cdb6cf78eeda6ed0205d9a7dd69e8bc1249e Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Tue, 21 Jan 2020 09:26:05 -0800
Subject: [PATCH 2/5] gnu: Add rust-ctrlc-3.1.
* gnu/packages/crates-io.scm (rust-ctrlc-3.1): New variable.
---
gnu/packages/crates-io.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 54cda8afc5..cd729f6a2b 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -2292,6 +2292,35 @@ intrinsics.")
"Bare bones CSV parsing with no_std support.")
(license (list license:unlicense license:expat))))
+(define-public rust-ctrlc-3.1
+ (package
+ (name "rust-ctrlc")
+ (version "3.1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "ctrlc" version))
+ (file-name
+ (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0zz8ad4bk28s111af5vy1c5kii4zw0cgh87ivzgj28f8nkcd5py7"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs
+ (("rust-nix" ,rust-nix-0.14)
+ ("rust-winapi" ,rust-winapi-0.3))
+ #:cargo-development-inputs
+ (("rust-winapi" ,rust-winapi-0.3))))
+ (home-page
+ "https://github.com/Detegr/rust-ctrlc")
+ (synopsis
+ "Easy Ctrl-C handler for Rust projects")
+ (description
+ "Easy Ctrl-C handler for Rust projects.")
+ (license (list license:expat license:asl2.0))))
+
(define-public rust-curl-sys-0.4
(package
(name "rust-curl-sys")
--
2.25.0
[-- Attachment #3: 0005-gnu-Add-fd.patch --]
[-- Type: text/x-patch, Size: 4066 bytes --]
From 03e9e2db0f53d94cbfe0507638c5d0688ae992aa Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Tue, 21 Jan 2020 09:33:33 -0800
Subject: [PATCH 5/5] gnu: Add fd.
* gnu/packages/crates-io.scm (fd): New variable.
---
gnu/packages/rust-apps.scm | 73 ++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 5b61cdc542..5556b1a549 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -22,8 +22,10 @@
#:use-module (guix build-system cargo)
#:use-module (guix download)
#:use-module (guix packages)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages crates-io)
+ #:use-module (gnu packages jemalloc)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages tls)
#:use-module (gnu packages version-control))
@@ -125,6 +127,77 @@ program @code{ls}. It uses colours to distinguish file types and metadata. It
also knows about symlinks, extended attributes, and Git.")
(license license:expat)))
+(define-public fd
+ (package
+ (name "fd")
+ (version "7.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "fd-find" version))
+ (file-name
+ (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "147m872zff0srwq9vaxkkbab06g3fkklbk1g2lx90vdhgs37f5xj"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs
+ (("rust-ansi-term" ,rust-ansi-term-0.12)
+ ("rust-atty" ,rust-atty-0.2)
+ ("rust-clap" ,rust-clap-2)
+ ("rust-ctrlc" ,rust-ctrlc-3.1)
+ ("rust-globset" ,rust-globset-0.4)
+ ("rust-humantime" ,rust-humantime-1.3)
+ ("rust-ignore" ,rust-ignore-0.4)
+ ("rust-jemallocator" ,rust-jemallocator-0.3)
+ ("rust-lazy-static" ,rust-lazy-static-1.4)
+ ("rust-libc" ,rust-libc-0.2)
+ ("rust-lscolors" ,rust-lscolors-0.6)
+ ("rust-num-cpus" ,rust-num-cpus-1.10)
+ ("rust-regex" ,rust-regex-1.3)
+ ("rust-regex-syntax" ,rust-regex-syntax-0.6))
+ #:cargo-development-inputs
+ (("rust-clap" ,rust-clap-2)
+ ("rust-diff" ,rust-diff-0.1)
+ ("rust-filetime" ,rust-filetime-0.2)
+ ("rust-tempdir" ,rust-tempdir-0.3)
+ ("rust-version-check" ,rust-version-check-0.9))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'override-jemalloc
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((jemalloc (assoc-ref inputs "jemalloc")))
+ (setenv "JEMALLOC_OVERRIDE"
+ (string-append jemalloc "/lib/libjemalloc_pic.a")))
+ #t))
+ (add-after 'install 'install-extra
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (install-completion
+ (lambda (completion out-dir)
+ (for-each
+ (lambda (f)
+ (install-file f (string-append out out-dir)))
+ (find-files "target/release/build/" completion)))))
+ ;; Manpages
+ (install-file "doc/fd.1" (string-append out "/share/man/man1"))
+ ;; Completions
+ (install-completion
+ "^fd.bash$" "/etc/bash-completion.d")
+ (install-completion
+ "^fd.fish$" "/share/fish/vendor_completions.d")
+ (install-completion
+ "^_fd$" "/share/zsh/site-functions")
+ #t))))))
+ (inputs `(("jemalloc" ,jemalloc)))
+ (home-page "https://github.com/sharkdp/fd")
+ (synopsis
+ "Simple, fast and user-friendly alternative to find")
+ (description
+ "fd is a simple, fast and user-friendly alternative to find.")
+ (license (list license:expat license:asl2.0))))
+
(define-public ripgrep
(package
(name "ripgrep")
--
2.25.0
[-- Attachment #4: 0004-gnu-rust-regex-1.1-Update-to-1.1.9.patch --]
[-- Type: text/x-patch, Size: 1562 bytes --]
From 5319c4e96ca8115e068475fc36ca3b697cdc636d Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Tue, 21 Jan 2020 09:55:21 -0800
Subject: [PATCH 4/5] gnu: rust-regex-1.1: Update to 1.1.9.
* gnu/packages/crates-io.scm (rust-regex-1.1): Update it.
---
gnu/packages/crates-io.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 386bf84b8f..c19ff52059 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -9686,7 +9686,7 @@ uses finite automata and guarantees linear time matching on all inputs.")
(package
(inherit rust-regex-1.3)
(name "rust-regex")
- (version "1.1.7")
+ (version "1.1.9")
(source
(origin
(method url-fetch)
@@ -9695,7 +9695,7 @@ uses finite automata and guarantees linear time matching on all inputs.")
(string-append name "-" version ".tar.gz"))
(sha256
(base32
- "1pabajpp0wzb7dm2x32gy8w7k0mwykr6zsvzn0fgpr6pww40hbqb"))))
+ "1ba47ivq8l1yikiwikjnq5barag6iqfgcpxlz2263fqbq9y2kn6r"))))
(arguments
`(#:skip-build? #t
#:cargo-inputs
@@ -9708,7 +9708,7 @@ uses finite automata and guarantees linear time matching on all inputs.")
(("rust-doc-comment" ,rust-doc-comment-0.3)
("rust-lazy-static" ,rust-lazy-static-1.3)
("rust-quickcheck" ,rust-quickcheck-0.8)
- ("rust-rand" ,rust-rand-0.4))))))
+ ("rust-rand" ,rust-rand-0.6))))))
(define-public rust-regex-0.2
(package
--
2.25.0
[-- Attachment #5: 0001-gnu-Add-rust-nix-0.14.patch --]
[-- Type: text/x-patch, Size: 1755 bytes --]
From f3d5bc404ee67b2e3523aef264d74222cfcf2c8d Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Tue, 21 Jan 2020 10:10:29 -0800
Subject: [PATCH 1/5] gnu: Add rust-nix-0.14.
* gnu/packages/crates-io.scm (rust-nix-0.14): Add it.
---
gnu/packages/crates-io.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index d51b63675a..54cda8afc5 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -6939,6 +6939,37 @@ release (fork of debug_unreachable)")
prove a function can't ever panic.")
(license (list license:expat license:asl2.0))))
+(define-public rust-nix-0.14
+ (package
+ (inherit rust-nix-0.15)
+ (version "0.14.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "nix" version))
+ (file-name
+ (string-append (package-name rust-nix-0.15)
+ "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1kmxdlmvnmq8cfpmr3g6wk37rwi2ybdvp1z6z3831m1p23p2nwkc"))))
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs
+ (("rust-bitflags" ,rust-bitflags-1)
+ ("rust-cc" ,rust-cc-1.0)
+ ("rust-cfg-if" ,rust-cfg-if-0.1)
+ ("rust-libc" ,rust-libc-0.2)
+ ("rust-void" ,rust-void-1.0))
+ #:cargo-development-inputs
+ (("rust-bytes" ,rust-bytes-0.4)
+ ("rust-caps" ,rust-caps-0.3)
+ ("rust-cc" ,rust-cc-1.0)
+ ("rust-lazy-static" ,rust-lazy-static-1.3)
+ ("rust-rand" ,rust-rand-0.6)
+ ("rust-sysctl" ,rust-sysctl-0.4)
+ ("rust-tempfile" ,rust-tempfile-3.0))))))
+
(define-public rust-nodrop-0.1
(package
(name "rust-nodrop")
--
2.25.0
[-- Attachment #6: 0003-gnu-Add-rust-lscolors-0.6.patch --]
[-- Type: text/x-patch, Size: 1666 bytes --]
From 43a155c8703f32c9b3e9c4d61d1400074245446f Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Tue, 21 Jan 2020 09:28:49 -0800
Subject: [PATCH 3/5] gnu: Add rust-lscolors-0.6.
* gnu/packages/crates-io.scm (rust-lscolors-0.6): New variable.
---
gnu/packages/crates-io.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index cd729f6a2b..386bf84b8f 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -6881,6 +6881,33 @@ pairs in insertion order.")
("rust-serde" ,rust-serde-0.8)
("rust-serde-test" ,rust-serde-test-0.8))))))
+(define-public rust-lscolors-0.6
+ (package
+ (name "rust-lscolors")
+ (version "0.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "lscolors" version))
+ (file-name
+ (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0jxsgkn378kxkiqdshdjdclw5wwp2xaz45cqd3yw85fhn8a38fza"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs
+ (("rust-ansi-term" ,rust-ansi-term-0.11))
+ #:cargo-development-inputs
+ (("rust-tempfile" ,rust-tempfile-3.1))))
+ (home-page "https://github.com/sharkdp/lscolors")
+ (synopsis
+ "Colorize paths using the LS_COLORS environment variable")
+ (description
+ "Colorize paths using the LS_COLORS environment variable.")
+ (license (list license:expat license:asl2.0))))
+
(define-public rust-new-debug-unreachable-1.0
(package
(name "rust-new-debug-unreachable")
--
2.25.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#39488: [PATCH] gnu: add fd.
2020-02-07 17:27 [bug#39488] [PATCH] gnu: add fd John Soo
@ 2020-02-08 19:05 ` Efraim Flashner
0 siblings, 0 replies; 2+ messages in thread
From: Efraim Flashner @ 2020-02-08 19:05 UTC (permalink / raw)
To: John Soo; +Cc: 39488-done
[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]
A couple of notes:
rust-nix-0.14: rust-sysctl should be 0.1, not 0.4. I added 0.1 and
switched the dependency.
rust-ctrlc-3.1: It builds with no problems so I removed skip-build
rust-lscolors-0.6: rust-ansi-term should be 0.12, not 0.11. I changed it
and removed skip-build.
fd: rust-clap is a dependency and build dependency and version-check a
build-dependency so I put them in cargo-dependencies. I flushed out the
description a bit. I checked the cargo.toml and I wasn't sure if
jemalloc was used or not (it looked like not windows or not musl) but I
see it building jemalloc-sys so I see it is. fd.bash should be renamed
to just 'fd' so I added a rename-file after the installation. As a last
thing I changed the jemalloc reference to jemalloc.so and now 'guix gc
--references' retains a reference to jemalloc.
--
Efraim Flashner <efraim@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-08 19:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-07 17:27 [bug#39488] [PATCH] gnu: add fd John Soo
2020-02-08 19:05 ` bug#39488: " Efraim Flashner
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).