all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [WIP] gnu: Add fd. (rust)
@ 2020-02-06 16:32 Tanguy Le Carrour
  2020-02-06 19:45 ` John Soo
  2020-02-06 19:56 ` Efraim Flashner
  0 siblings, 2 replies; 10+ messages in thread
From: Tanguy Le Carrour @ 2020-02-06 16:32 UTC (permalink / raw)
  To: guix-devel

Dear Guix,

I'm back on (trying to) package fd [1][].

[1]: https://github.com/sharkdp/fd

I've just submitted 2 patches to add 2 trivial rust dependencies I need.
But even with those, `fd` does not build! :-(
I have the following error:

```
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!

Regards

-- 
Tanguy


* gnu/packages/rust-apps.scm (fd): New variable.
---
 gnu/packages/rust-apps.scm | 43 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 5b61cdc542..5e7fc557b6 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -254,3 +254,46 @@ gitignore rules.")
 show number of files, total lines within those files and code, comments, and
 blanks grouped by language.")
     (license (list license:expat license:asl2.0))))
+
+(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-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.3)
+        ("rust-lscolors" ,rust-lscolors-0.6)
+        ("rust-num-cpus" ,rust-num-cpus-1.10)
+        ("rust-regex" ,rust-regex-1.1)
+        ("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-term-size" ,rust-term-size-1.0) ;; not listed as a dependency
+        ("rust-version-check" ,rust-version-check-0.9))))
+    (home-page "https://github.com/sharkdp/fd")
+    (synopsis "A simple, fast and user-friendly alternative to find")
+    (description
+     "`fd` is a simple, fast and user-friendly alternative to `find`.
+While it does not seek to mirror all of `find`'s powerful functionality,
+it provides sensible (opinionated) defaults for 80% of the use cases.")
+    (license license:asl2.0)))
-- 
2.25.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [WIP] gnu: Add fd. (rust)
  2020-02-06 16:32 [WIP] gnu: Add fd. (rust) Tanguy Le Carrour
@ 2020-02-06 19:45 ` John Soo
  2020-02-07  8:24   ` Tanguy Le Carrour
  2020-02-06 19:56 ` Efraim Flashner
  1 sibling, 1 reply; 10+ messages in thread
From: John Soo @ 2020-02-06 19:45 UTC (permalink / raw)
  To: Tanguy Le Carrour; +Cc: Guix-devel

[-- 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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [WIP] gnu: Add fd. (rust)
  2020-02-06 16:32 [WIP] gnu: Add fd. (rust) Tanguy Le Carrour
  2020-02-06 19:45 ` John Soo
@ 2020-02-06 19:56 ` Efraim Flashner
  2020-02-07  7:57   ` Tanguy Le Carrour
  1 sibling, 1 reply; 10+ messages in thread
From: Efraim Flashner @ 2020-02-06 19:56 UTC (permalink / raw)
  To: Tanguy Le Carrour; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 3853 bytes --]

On Thu, Feb 06, 2020 at 05:32:06PM +0100, Tanguy Le Carrour wrote:
> Dear Guix,
> 
> I'm back on (trying to) package fd [1][].
> 
> [1]: https://github.com/sharkdp/fd
> 
> I've just submitted 2 patches to add 2 trivial rust dependencies I need.
> But even with those, `fd` does not build! :-(
> I have the following error:
> 
> ```
> 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!
> 
> Regards
> 
> -- 
> Tanguy
> 
> 
> * gnu/packages/rust-apps.scm (fd): New variable.
> ---
>  gnu/packages/rust-apps.scm | 43 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
> 
> diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
> index 5b61cdc542..5e7fc557b6 100644
> --- a/gnu/packages/rust-apps.scm
> +++ b/gnu/packages/rust-apps.scm
> @@ -254,3 +254,46 @@ gitignore rules.")
>  show number of files, total lines within those files and code, comments, and
>  blanks grouped by language.")
>      (license (list license:expat license:asl2.0))))
> +
> +(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-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.3)
> +        ("rust-lscolors" ,rust-lscolors-0.6)
> +        ("rust-num-cpus" ,rust-num-cpus-1.10)
> +        ("rust-regex" ,rust-regex-1.1)
> +        ("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-term-size" ,rust-term-size-1.0) ;; not listed as a dependency
> +        ("rust-version-check" ,rust-version-check-0.9))))
> +    (home-page "https://github.com/sharkdp/fd")
> +    (synopsis "A simple, fast and user-friendly alternative to find")
> +    (description
> +     "`fd` is a simple, fast and user-friendly alternative to `find`.
> +While it does not seek to mirror all of `find`'s powerful functionality,
> +it provides sensible (opinionated) defaults for 80% of the use cases.")
> +    (license license:asl2.0)))
> -- 
> 2.25.0
> 
> 

According to here¹ you need rust-term-size-0.3. Ideally we'll switch to
actually building and testing more of the crates so we can catch missing
or wrong dependencies.

¹ https://crates.io/crates/clap/2.33.0

-- 
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] 10+ messages in thread

* Re: [WIP] gnu: Add fd. (rust)
  2020-02-06 19:56 ` Efraim Flashner
@ 2020-02-07  7:57   ` Tanguy Le Carrour
  2020-02-07  8:26     ` Efraim Flashner
  0 siblings, 1 reply; 10+ messages in thread
From: Tanguy Le Carrour @ 2020-02-07  7:57 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Hi Efraim,

Le 02/06, Efraim Flashner a écrit :
> On Thu, Feb 06, 2020 at 05:32:06PM +0100, Tanguy Le Carrour wrote:
> > I'm back on (trying to) package fd [1][].
> > 
> > [1]: https://github.com/sharkdp/fd
> > 
> > I've just submitted 2 patches to add 2 trivial rust dependencies I need.
> > But even with those, `fd` does not build! :-(
> > I have the following error:
> > 
> > ```
> > 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?!
> > 
> […]
> According to here¹ you need rust-term-size-0.3. Ideally we'll switch to
> actually building and testing more of the crates so we can catch missing
> or wrong dependencies.
> 
> ¹ https://crates.io/crates/clap/2.33.0

I would have expected something like "error: no matching VERSION for package
`term_size` found"!
I'll remember to check crates.io for version next time!

Thanks!


-- 
Tanguy

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [WIP] gnu: Add fd. (rust)
  2020-02-06 19:45 ` John Soo
@ 2020-02-07  8:24   ` Tanguy Le Carrour
  0 siblings, 0 replies; 10+ messages in thread
From: Tanguy Le Carrour @ 2020-02-07  8:24 UTC (permalink / raw)
  To: John Soo; +Cc: Guix-devel

Hi John!

Le 02/06, John Soo a écrit :
> > 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.

I've been living without fd for almost a year now, so you can imagine how I
feel now, so close to having it back! :-)

I've just tried you patches and… unfortunately it did not work! :-(
At least on today's head! … BUT, it was enough to apply lscolors
manually to make it work! \o/

Thank you so much for you patches! fd is now installed in a dedicated
profile until you patches make it to the repo! I've just reactivated
fd/fzf in my fish and nvim config files! You've made my day! :-)

Regards

-- 
Tanguy

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [WIP] gnu: Add fd. (rust)
  2020-02-07  7:57   ` Tanguy Le Carrour
@ 2020-02-07  8:26     ` Efraim Flashner
  2020-02-07  8:41       ` Tanguy Le Carrour
  0 siblings, 1 reply; 10+ messages in thread
From: Efraim Flashner @ 2020-02-07  8:26 UTC (permalink / raw)
  To: Tanguy Le Carrour; +Cc: guix-devel

I pushed a couple of changes to the crates to fix rust-clap-2 so this one at least should be fixed.

On February 7, 2020 7:57:49 AM UTC, Tanguy Le Carrour <tanguy@bioneland.org> wrote:
>Hi Efraim,
>
>Le 02/06, Efraim Flashner a écrit :
>> On Thu, Feb 06, 2020 at 05:32:06PM +0100, Tanguy Le Carrour wrote:
>> > I'm back on (trying to) package fd [1][].
>> > 
>> > [1]: https://github.com/sharkdp/fd
>> > 
>> > I've just submitted 2 patches to add 2 trivial rust dependencies I need.
>> > But even with those, `fd` does not build! :-(
>> > I have the following error:
>> > 
>> > ```
>> > 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?!
>> > 
>> […]
>> According to here¹ you need rust-term-size-0.3. Ideally we'll switch to
>> actually building and testing more of the crates so we can catch missing
>> or wrong dependencies.
>> 
>> ¹ https://crates.io/crates/clap/2.33.0
>
>I would have expected something like "error: no matching VERSION for package
>`term_size` found"!
>I'll remember to check crates.io for version next time!
>
>Thanks!
>
>

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [WIP] gnu: Add fd. (rust)
  2020-02-07  8:26     ` Efraim Flashner
@ 2020-02-07  8:41       ` Tanguy Le Carrour
  2020-02-07 16:54         ` John Soo
  0 siblings, 1 reply; 10+ messages in thread
From: Tanguy Le Carrour @ 2020-02-07  8:41 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Le 02/07, Efraim Flashner a écrit :
> I pushed a couple of changes to the crates to fix rust-clap-2 so this one at least should be fixed.

Thanks!
The set of patches John sent does the job! So I guess one can close my
bug reports [1][] and I let the pro' do their job! :-)

[1]: bug#39453: Acknowledgement ([PATCH] gnu: Add rust-ctrlc.)
     bug#39454: Acknowledgement ([PATCH] gnu: Add rust-lscolors.)

> On February 7, 2020 7:57:49 AM UTC, Tanguy Le Carrour <tanguy@bioneland.org> wrote:
> >Hi Efraim,
> >
> >Le 02/06, Efraim Flashner a écrit :
> >> On Thu, Feb 06, 2020 at 05:32:06PM +0100, Tanguy Le Carrour wrote:
> >> > I'm back on (trying to) package fd [1][].
> >> > 
> >> > [1]: https://github.com/sharkdp/fd
> >> > 
> >> > I've just submitted 2 patches to add 2 trivial rust dependencies I need.
> >> > But even with those, `fd` does not build! :-(
> >> > I have the following error:
> >> > 
> >> > ```
> >> > 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?!
> >> > 
> >> […]
> >> According to here¹ you need rust-term-size-0.3. Ideally we'll switch to
> >> actually building and testing more of the crates so we can catch missing
> >> or wrong dependencies.
> >> 
> >> ¹ https://crates.io/crates/clap/2.33.0
> >
> >I would have expected something like "error: no matching VERSION for package
> >`term_size` found"!
> >I'll remember to check crates.io for version next time!
> >
> >Thanks!
> >
> >
> 
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
Tanguy

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [WIP] gnu: Add fd. (rust)
  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
  0 siblings, 2 replies; 10+ messages in thread
From: John Soo @ 2020-02-07 16:54 UTC (permalink / raw)
  To: Tanguy Le Carrour; +Cc: guix-devel

Hi Tanguy,

I’m glad it helped :). I know how you feel. I felt the same way when ripgrep and alacritty finally worked. 

I can submit the patches. Can you confirm that fd is working, though?

Thanks,

John

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [WIP] gnu: Add fd. (rust)
  2020-02-07 16:54         ` John Soo
@ 2020-02-07 17:28           ` John Soo
  2020-02-08 19:15           ` Tanguy LE CARROUR
  1 sibling, 0 replies; 10+ messages in thread
From: John Soo @ 2020-02-07 17:28 UTC (permalink / raw)
  To: Tanguy Le Carrour; +Cc: guix-devel



> On Feb 7, 2020, at 8:54 AM, John Soo <jsoo1@asu.edu> wrote:
> 

I can submit the patches.

Patches in at #39488

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [WIP] gnu: Add fd. (rust)
  2020-02-07 16:54         ` John Soo
  2020-02-07 17:28           ` John Soo
@ 2020-02-08 19:15           ` Tanguy LE CARROUR
  1 sibling, 0 replies; 10+ messages in thread
From: Tanguy LE CARROUR @ 2020-02-08 19:15 UTC (permalink / raw)
  To: John Soo; +Cc: guix-devel

Hi!

Le 7 février 2020 17:54:41 CET, John Soo <jsoo1@asu.edu> a écrit :
>I’m glad it helped :). I know how you feel. I felt the same way when
>ripgrep and alacritty finally worked. 
>
>I can submit the patches. Can you confirm that fd is working, though?

Yes, indeed, it does work! :-)

-- 
Tanguy

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-02-08 19:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-06 16:32 [WIP] gnu: Add fd. (rust) Tanguy Le Carrour
2020-02-06 19:45 ` John Soo
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

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.