From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tanguy Le Carrour Subject: [WIP] gnu: Add fd. (rust) Date: Thu, 6 Feb 2020 17:32:06 +0100 Message-ID: <20200206163205.20668-1-tanguy@bioneland.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:51771) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izkAa-0006ng-MA for guix-devel@gnu.org; Thu, 06 Feb 2020 11:38:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izkAZ-0004B8-DI for guix-devel@gnu.org; Thu, 06 Feb 2020 11:38:24 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:40921) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izkAZ-00044W-6A for guix-devel@gnu.org; Thu, 06 Feb 2020 11:38:23 -0500 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org 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