[PATCH] gnu: Add tealdeer.

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • John Soo
Owner
unassigned
Submitted by
John Soo
Severity
normal

Debbugs page

John Soo wrote 3 years ago
(address . guix-patches@gnu.org)
871r5mx27l.fsf@asu.edu
Hi Guix,

I wanted to check out tealdeer and I didn't see it upstream. Here are my
patches for it, thanks!

- John
From dbbe5128f579a9204ba44541cf508637a63144de Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Fri, 17 Sep 2021 12:40:16 -0700
Subject: [PATCH 1/3] gnu: Add rust-pager-0.15.

* gnu/packages/crates-io.scm (rust-pager-0.15): New variable.
---
gnu/packages/crates-io.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index d1aaa40c71..ea0e06a3ba 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -31880,6 +31880,31 @@ normally prevent moving a type that has been borrowed from.")
"This package provides a library for padding strings at runtime.")
(license license:expat)))
+(define-public rust-pager-0.15
+ (package
+ (name "rust-pager")
+ (version "0.15.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "pager" version))
+ (file-name
+ (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0a35mg68s0p63ya2k5hsg620c4llkjw2fx1sfi0laz4pz8myv75n"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs
+ (("rust-errno" ,rust-errno-0.2)
+ ("rust-libc" ,rust-libc-0.2))))
+ (home-page "https://gitlab.com/imp/pager-rs.git")
+ (synopsis
+ "Helps pipe your output through an external pager")
+ (description
+ "This package pipes your Rust output through an external pager.")
+ (license (list license:asl2.0 license:expat))))
+
(define-public rust-palette-0.5
(package
(name "rust-palette")
--
2.33.0
From dc325e08dcc09ac8dd2d760fa4dd02f76a13252b Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Fri, 17 Sep 2021 14:40:58 -0700
Subject: [PATCH 2/3] gnu: Add rust-remove-dir-all-0.5.2.

* gnu/packages/crates-io.scm (rust-remove-dir-all-0.5.2): New variable.
---
gnu/packages/crates-io.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index ea0e06a3ba..ddfca76b59 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -38408,6 +38408,23 @@ uses finite automata and guarantees linear time matching on all inputs.")
(license (list license:asl2.0
license:expat))))
+;; rust-remove-dir-all-0.5.2 is only needed for tealdeer at 1.4.1
+;; Remove rust-remove-dir-all-0.5.2 when tealdeer is updated
+(define-public rust-remove-dir-all-0.5.2
+ (package
+ (inherit rust-remove-dir-all-0.5)
+ (name "rust-remove-dir-all")
+ (version "0.5.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "remove_dir_all" version))
+ (file-name
+ (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0bkrlyg26mgizpiy1yb2hhpgscxcag8r5fnckqsvk25608vzm0sa"))))))
+
(define-public rust-reopen-0.3
(package
(name "rust-reopen")
--
2.33.0
From 6d8dd5ebcb448096ce43b68934c39066e38680fa Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Fri, 17 Sep 2021 12:37:56 -0700
Subject: [PATCH 3/3] gnu: Add tealdeer.

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

Toggle diff (87 lines)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index e81c7d8748..800ba49fb9 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -1051,6 +1051,80 @@ library and a dynamic library, and a C header to be used by any C (and
C-compatible) software.")
(license license:expat)))
+(define-public tealdeer
+ (package
+ (name "tealdeer")
+ (version "1.4.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "tealdeer" version))
+ (file-name
+ (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0cwf46k2rszcpydrqajnm4dvhggr3ms7sjma0jx02ch4fjicxch7"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'install-completions
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (install-file
+ "bash_tealdeer"
+ (string-append out "/etc/bash_completion.d"))
+ (install-file
+ "fish_tealdeer"
+ (string-append
+ out "/share/completions/vendor_completions.d"))))))
+ #:cargo-test-flags
+ '("--release" "--"
+ ;; These tests go to the network
+ "--skip=test_quiet_old_cache"
+ "--skip=test_quiet_cache"
+ "--skip=test_quiet_failures"
+ "--skip=test_pager_flag_enable"
+ "--skip=test_markdown_rendering"
+ "--skip=test_spaces_find_command"
+ "--skip=test_autoupdate_cache"
+ "--skip=test_update_cache")
+ #:cargo-inputs
+ (("rust-ansi-term" ,rust-ansi-term-0.12)
+ ("rust-app-dirs2" ,rust-app-dirs2-2)
+ ("rust-atty" ,rust-atty-0.2)
+ ("rust-docopt" ,rust-docopt-1)
+ ("rust-env-logger" ,rust-env-logger-0.7)
+ ("rust-flate2" ,rust-flate2-1)
+ ("rust-log" ,rust-log-0.4)
+ ("rust-pager" ,rust-pager-0.15)
+ ("rust-reqwest" ,rust-reqwest-0.10)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-derive" ,rust-serde-derive-1)
+ ("rust-tar" ,rust-tar-0.4)
+ ("rust-toml" ,rust-toml-0.5)
+ ("rust-walkdir" ,rust-walkdir-2)
+ ("rust-xdg" ,rust-xdg-2))
+ #:cargo-development-inputs
+ (("rust-assert-cmd" ,rust-assert-cmd-1)
+ ("rust-escargot" ,rust-escargot-0.5)
+ ("rust-filetime" ,rust-filetime-0.2)
+ ("rust-predicates" ,rust-predicates-1)
+ ;; This earlier version is required to fix a bug.
+ ;; Remove rust-remove-dir-all-0.5.2 when tealdeer gets upgraded
+ ("rust-remove-dir-all" ,rust-remove-dir-all-0.5.2)
+ ("rust-tempfile" ,rust-tempfile-3))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("openssl" ,openssl)))
+ (home-page "https://github.com/dbrgn/tealdeer/")
+ (synopsis "Fetch and show tldr help pages for many CLI commands")
+ (description
+ "This package fetches and shows tldr help pages for many CLI commands.
+Full featured offline client with caching support.")
+ (license (list license:expat license:asl2.0))))
+
(define-public zoxide
(package
(name "zoxide")
--
2.33.0
Efraim Flashner wrote 3 years ago
(name . John Soo)(address . jsoo1@asu.edu)(address . 50648-done@debbugs.gnu.org)
YUs0dM5LmO/cvLPI@3900XT
On Fri, Sep 17, 2021 at 03:32:46PM -0700, John Soo wrote:
Toggle quote (7 lines)
> Hi Guix,
>
> I wanted to check out tealdeer and I didn't see it upstream. Here are my
> patches for it, thanks!
>
> - John

I fixed the 'install-completions phase so that they would install in the
correct directories (as far as I knew) and with the correct names. I
also had it not install the sources.

Patches pushed! Thanks.

--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmFLNHQACgkQQarn3Mo9
g1Eq+Q/+PFSWlHT91paTj8ChnDcyzVGRl4Zym0e/iFWbFEKX+WPUhQPMVvsUTcB+
+K8bHf2tkbfnSEF4AiiZOJNEtCYu5CkQ40nAWAqQdeKm6VXlXetHOd9W4nWKeCGb
f5Q0mblMo+/sl91ZLWvn9X9uom/A+NKZ9AQFvMNIw6txIA7RDp0KXuYn1OM9S6Du
0Ijb/SV1MkOOpz4JEmY4nXdyb2AhTeN9DA37ul10OggTS7QMs0AWlA++35dVyfTk
YB9mZr2WO5sMtI9zhvzSsd7isUE/2JszVsqHVbV0n09AXNVPT95QikpVzuq3LXvg
YXeYV7J1ONHFO3gUyqui2i57/+KUwtRvKUKYG2yV0VJ7BroAMl05i6nIoZiR8oVD
pnBpq5msfEWQ87FJikCr3WuCYR4b9AL3hS0U9h/vS5wFx2Daerp7pAGOKHCwCx4y
ii1LD80ydu4fHImCHSndgARbG7C49bga4bnJe68pPEdDT4FgUR2e3QBdJY3C2kmH
M4FnH/E40EsRcd3E3AKoxXAGD/dx+CnELq32dDMPwq4ol9vBgMNB4z5CqPgZ51nW
tbT2AjlsQ6D+Qe1f0hX/0sTW6pfGexJTzFSTHol9qH9tJzVcaSXkKZkO/0MItuJ9
WRxik1x2xQgUMRJ23Yq+O6vxLJD6XjRcQwu4PCdxc8Wiul0OpMc=
=fbxv
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 50648
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
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help