From: John Soo <jsoo1@asu.edu>
To: Tanguy Le Carrour <tanguy@bioneland.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [WIP] gnu: Add fd. (rust)
Date: Thu, 6 Feb 2020 19:45:10 +0000 [thread overview]
Message-ID: <CAKf5CqV2shUwB4SBXKdwgOPgdE4dNYC2fkD+=DhhGaRyv1D4=Q@mail.gmail.com> (raw)
In-Reply-To: <20200206163205.20668-1-tanguy@bioneland.org>
[-- Attachment #1: Type: text/plain, Size: 911 bytes --]
Hi Tanguy,
> I've just submitted 2 patches to add 2 trivial rust dependencies I need.
> But even with those, `fd` does not build! :-(
Nice! I have a working set of patches. I'll attach them so you can compare.
>
> ```
> starting phase `build'
> error: no matching package named `term_size` found
> location searched: registry `https://github.com/rust-lang/crates.io-index`
> perhaps you meant: term_size
> required by package `clap v2.33.0`
> ... which is depended on by `fd-find v7.4.0 (/tmp/guix-build-fd-7.4.0.drv-0/fd-find-7.4.0)`
> command "cargo" "build" "--release" failed with status 101
> ```
>
> I tried adding `term_size` to `cargo-inputs` or to `cargo-development-inputs`,
> but it did not solve my problem. Am I missing something?!
>
> I'm not a rust specialist, so any help would be welcome!
Clap is missing a dependency in our package set currently. My patches fix that.
Good luck!
John
[-- Attachment #2: 0004-gnu-rust-regex-1.1-Update-to-1.1.9.patch --]
[-- Type: text/x-patch, Size: 1562 bytes --]
From aa7847e578bbc40f158377d5265a7d5d49e7badf 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/7] 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 49836e7615..bfe36943bb 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -9659,7 +9659,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)
@@ -9668,7 +9668,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
@@ -9681,7 +9681,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 #3: 0003-gnu-Add-rust-lscolors-0.6.patch --]
[-- Type: text/x-patch, Size: 1644 bytes --]
From 3fa42d650e0d86fd7b0c1b05ada0cb976122a673 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/7] 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 ef1c31315a..49836e7615 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -6856,6 +6856,33 @@ pairs in insertion order.")
(license (list license:asl2.0
license:expat))))
+(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
[-- Attachment #4: 0005-gnu-Add-rust-ansi-term-0.12.patch --]
[-- Type: text/x-patch, Size: 1614 bytes --]
From aad4beb498f8b28cb6dc30f484b16fc394306bfc Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Tue, 21 Jan 2020 09:56:55 -0800
Subject: [PATCH 5/7] gnu: Add rust-ansi-term-0.12.
* gnu/packages/crates-io.scm (rust-ansi-term-0.12): New variable.
* gn/packages/crates-io.scm (rust-ansi-term-0.11): Inherit from rust-ansi-term-0.12.
---
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 bfe36943bb..7b7f77023c 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -232,6 +232,29 @@ text or blue underlined text, on ANSI terminals.")
#:cargo-inputs
(("rust-winapi" ,rust-winapi-0.3))))))
+(define-public rust-ansi-term-0.11
+ (package
+ (inherit rust-ansi-term-0.12)
+ (version "0.11.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "ansi_term" version))
+ (file-name (string-append (package-name rust-ansi-term-0.12)
+ "-" version ".crate"))
+ (sha256
+ (base32
+ "16wpvrghvd0353584i1idnsgm0r3vchg8fyrm0x8ayv1rgvbljgf"))))
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs
+ (("rust-serde" ,rust-serde-1.0)
+ ("rust-winapi" ,rust-winapi-0.3))
+ #:cargo-development-inputs
+ (("rust-doc-comment" ,rust-doc-comment-0.3)
+ ("rust-regex" ,rust-regex-1.1)
+ ("rust-serde-json" ,rust-serde-json-1.0))))))
+
(define-public rust-antidote-1.0
(package
(name "rust-antidote")
--
2.25.0
[-- Attachment #5: 0001-gnu-Add-rust-nix-0.14.patch --]
[-- Type: text/x-patch, Size: 1755 bytes --]
From 38d1a6f83e999e376aeef03f498d5fb970a92102 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/7] 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 727e7c9510..cfb3d04825 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -6914,6 +6914,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: 0002-gnu-Add-rust-ctrlc-3.1.patch --]
[-- Type: text/x-patch, Size: 1624 bytes --]
From fa32d61e7dfd5e062204a2d148772e2cbbc4910a 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/7] 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 cfb3d04825..ef1c31315a 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -2286,6 +2286,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 #7: 0006-gnu-rust-clap-2-Add-dependency.patch --]
[-- Type: text/x-patch, Size: 937 bytes --]
From 871e349e355cd3e36352a50bd60a62591b422e1c Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Tue, 21 Jan 2020 10:05:28 -0800
Subject: [PATCH 6/7] gnu: rust-clap-2: Add dependency.
* gnu/packages/crates-io.scm (rust-clap-2):[arguments] Add cargo input.
---
gnu/packages/crates-io.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 7b7f77023c..d74b5a1d40 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -1516,6 +1516,7 @@ depending on a large number of #[cfg] parameters. Structured like an
("rust-bitflags" ,rust-bitflags-1)
("rust-clippy" ,rust-clippy-0.0)
("rust-strsim" ,rust-strsim-0.8)
+ ("rust-term-size" ,rust-term-size-0.3)
("rust-textwrap" ,rust-textwrap-0.11)
("rust-unicode-width" ,rust-unicode-width-0.1)
("rust-vec-map" ,rust-vec-map-0.8)
--
2.25.0
[-- Attachment #8: 0007-gnu-Add-fd.patch --]
[-- Type: text/x-patch, Size: 4066 bytes --]
From 55333f5ae794f11531e4b1ced546475fea49f8bf Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Tue, 21 Jan 2020 09:33:33 -0800
Subject: [PATCH 7/7] 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
next prev parent reply other threads:[~2020-02-06 19:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 16:32 [WIP] gnu: Add fd. (rust) Tanguy Le Carrour
2020-02-06 19:45 ` John Soo [this message]
2020-02-07 8:24 ` Tanguy Le Carrour
2020-02-06 19:56 ` Efraim Flashner
2020-02-07 7:57 ` Tanguy Le Carrour
2020-02-07 8:26 ` Efraim Flashner
2020-02-07 8:41 ` Tanguy Le Carrour
2020-02-07 16:54 ` John Soo
2020-02-07 17:28 ` John Soo
2020-02-08 19:15 ` Tanguy LE CARROUR
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKf5CqV2shUwB4SBXKdwgOPgdE4dNYC2fkD+=DhhGaRyv1D4=Q@mail.gmail.com' \
--to=jsoo1@asu.edu \
--cc=guix-devel@gnu.org \
--cc=tanguy@bioneland.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.