* [bug#69558] [PATCH 1/2] gnu: Add rust-clap-verbosity-flag-2.
2024-03-04 21:12 [bug#69558] [PATCH 0/2] gnu: Add emacs-lsp-booster rust app Suhail Singh
@ 2024-03-04 23:57 ` Suhail Singh
2024-03-05 5:45 ` [bug#69558] [PATCH 2/2] gnu: Add emacs-lsp-booster Suhail Singh
2024-03-05 8:22 ` [bug#69557] [bug#69558] [PATCH 0/2] gnu: Add emacs-lsp-booster rust app Efraim Flashner
2 siblings, 0 replies; 7+ messages in thread
From: Suhail Singh @ 2024-03-04 23:57 UTC (permalink / raw)
To: 69558; +Cc: Efraim Flashner
* gnu/packages/crates-io.scm (rust-clap-verbosity-flag-2): New variable.
Change-Id: I9fa802d964e71a1618d8d42571ca954c34dbf59e
---
gnu/packages/crates-io.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index aaf2157661..91fd8b8e92 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -41,6 +41,7 @@
;;; Copyright © 2023, 2024 Troy Figiel <troy@troyfigiel.com>
;;; Copyright © 2024 Herman Rimm <herman@rimm.ee>
;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
+;;; Copyright © 2024 Suhail Singh <suhail@bayesians.ca>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -11700,6 +11701,33 @@ (define-public rust-clap-mangen-0.1
(("rust-clap" ,rust-clap-3)
("rust-snapbox" ,rust-snapbox-0.2))))))
+(define-public rust-clap-verbosity-flag-2
+ (package
+ (name "rust-clap-verbosity-flag")
+ (version "2.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "clap-verbosity-flag" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0y54kb14nr2vddl5j5h1s4217hbnxfxh7ln8j7lw5r2qvp0216xv"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs (("rust-clap" ,rust-clap-4)
+ ("rust-log" ,rust-log-0.4))
+ #:cargo-development-inputs (("rust-clap" ,rust-clap-4)
+ ("rust-env-logger" ,rust-env-logger-0.11)
+ ("rust-tracing" ,rust-tracing-0.1)
+ ("rust-tracing-log" ,rust-tracing-log-0.2)
+ ("rust-tracing-subscriber" ,rust-tracing-subscriber-0.3))))
+ (home-page "https://github.com/clap-rs/clap-verbosity-flag")
+ (synopsis "Easily add a `--verbose` flag to CLIs using Clap")
+ (description
+ "This package provides a way to add a `--verbose` flag to CLIs using
+Clap.")
+ (license (list license:expat license:asl2.0))))
+
(define-public rust-clearscreen-1
(package
(name "rust-clearscreen")
--
2.44.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#69558] [PATCH 2/2] gnu: Add emacs-lsp-booster.
2024-03-04 21:12 [bug#69558] [PATCH 0/2] gnu: Add emacs-lsp-booster rust app Suhail Singh
2024-03-04 23:57 ` [bug#69558] [PATCH 1/2] gnu: Add rust-clap-verbosity-flag-2 Suhail Singh
@ 2024-03-05 5:45 ` Suhail Singh
2024-03-05 8:22 ` [bug#69557] [bug#69558] [PATCH 0/2] gnu: Add emacs-lsp-booster rust app Efraim Flashner
2 siblings, 0 replies; 7+ messages in thread
From: Suhail Singh @ 2024-03-05 5:45 UTC (permalink / raw)
To: 69558; +Cc: Efraim Flashner
* gnu/packages/rust-apps.scm (emacs-lsp-booster): New variable.
Change-Id: If89f9941662ed01ddec578b220f69e6370775103
---
gnu/packages/rust-apps.scm | 39 ++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 01e01ecba3..aa28d25248 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -30,6 +30,7 @@
;;; Copyright © 2024 Troy Figiel <troy@troyfigiel.com>
;;; Copyright © 2024 Herman Rimm <herman@rimm.ee>
;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
+;;; Copyright © 2024 Suhail Singh <suhail@bayesians.ca>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -71,6 +72,7 @@ (define-module (gnu packages rust-apps)
#:use-module (gnu packages crates-windows)
#:use-module (gnu packages curl)
#:use-module (gnu packages documentation)
+ #:use-module (gnu packages emacs)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages haskell-xyz)
@@ -468,6 +470,43 @@ (define-public dutree
@end enumerate\n")
(license license:gpl3)))
+(define-public emacs-lsp-booster
+ (package
+ (name "emacs-lsp-booster")
+ (version "0.2.0")
+ (home-page "https://github.com/blahgeek/emacs-lsp-booster")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1xx32ms3mpi1clxf74mx7nanj0iw9qkmhi0a53fx8fkz0jw2fq8f"))))
+ (build-system cargo-build-system)
+ (arguments
+ (list
+ #:cargo-inputs `(("rust-anyhow" ,rust-anyhow-1)
+ ("rust-clap" ,rust-clap-4)
+ ("rust-clap-verbosity-flag" ,rust-clap-verbosity-flag-2)
+ ("rust-lazy-static" ,rust-lazy-static-1)
+ ("rust-log" ,rust-log-0.4)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-json" ,rust-serde-json-1)
+ ("rust-smallvec" ,rust-smallvec-1)
+ ("rust-env-logger" ,rust-env-logger-0.10))
+ #:cargo-development-inputs `(("rust-emacs" ,rust-emacs-0.18)
+ ("rust-tempfile" ,rust-tempfile-3))
+ #:install-source? #f))
+ (native-inputs (list emacs))
+ (synopsis "Emacs LSP performance booster")
+ (description
+ "@code{emacs-lsp-booster} improves the performance of @code{lsp-mode} and
+@code{eglot} Emacs packages using a wrapper executable. See the home-page for
+configuration instructions.")
+ (license license:expat)))
+
(define-public eza
(package
(name "eza")
--
2.44.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#69557] [bug#69558] [PATCH 0/2] gnu: Add emacs-lsp-booster rust app.
2024-03-04 21:12 [bug#69558] [PATCH 0/2] gnu: Add emacs-lsp-booster rust app Suhail Singh
2024-03-04 23:57 ` [bug#69558] [PATCH 1/2] gnu: Add rust-clap-verbosity-flag-2 Suhail Singh
2024-03-05 5:45 ` [bug#69558] [PATCH 2/2] gnu: Add emacs-lsp-booster Suhail Singh
@ 2024-03-05 8:22 ` Efraim Flashner
2024-03-05 15:01 ` Suhail Singh
2 siblings, 1 reply; 7+ messages in thread
From: Efraim Flashner @ 2024-03-05 8:22 UTC (permalink / raw)
To: Suhail Singh; +Cc: 69558-done, 69557-done
[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]
Everything looked great, just some small things.
I had to downgrade rust-clap-verbose-flag-2 from 2.2.0 to 2.1.2 since
2.2.0 wanted a newer version of clap than we had (and this way I could
add it straight to master, not to rust-team).
I added a comment on emacs-lsp-booster that it was specifically emacs
and not emacs-minimal. Emacs-minimal wasn't able to run the bytecode
tests so it made more sense to use the full emacs.
Patches pushed!
On Mon, Mar 04, 2024 at 04:12:36PM -0500, Suhail Singh wrote:
>
> Hi Guix,
>
> Apologies for the noise of #69551.
>
> This series adds the emacs-lsp-booster Rust application as well as one
> of its missing dependencies (rust-clap-verbosity-flag-2). I have not
> packaged a Rust application in Guix previously, so would appreciate any
> comments and feedback.
>
> Cheers
>
> Suhail (2):
> gnu: Add rust-clap-verbosity-flag-2.
> gnu: Add emacs-lsp-booster.
>
> gnu/packages/crates-io.scm | 28 +++++++++++++++++++++++++++
> gnu/packages/rust-apps.scm | 39 ++++++++++++++++++++++++++++++++++++++
> 2 files changed, 67 insertions(+)
>
>
> base-commit: f00f56514d90ebba5d9e08ec786c8118e437097c
> --
> 2.44.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] 7+ messages in thread
* [bug#69557] [bug#69558] [PATCH 0/2] gnu: Add emacs-lsp-booster rust app.
2024-03-05 8:22 ` [bug#69557] [bug#69558] [PATCH 0/2] gnu: Add emacs-lsp-booster rust app Efraim Flashner
@ 2024-03-05 15:01 ` Suhail Singh
2024-03-06 7:54 ` Efraim Flashner
0 siblings, 1 reply; 7+ messages in thread
From: Suhail Singh @ 2024-03-05 15:01 UTC (permalink / raw)
To: Efraim Flashner; +Cc: 69558-done, 69557-done
Efraim Flashner <efraim@flashner.co.il> writes:
> I had to downgrade rust-clap-verbose-flag-2 from 2.2.0 to 2.1.2
I believe you mean rust-clap-verbosity-flag-2 .
> since 2.2.0 wanted a newer version of clap than we had (and this way I
> could add it straight to master, not to rust-team).
Thank you for doing that and taking the time to respond. Though it does
make me wonder how I was able to build my patch series if it needed a
newer version of clap. Wouldn't the guix build invocation have failed
if that were the case? Perhaps it did fail for you?
Additionally, based on [crates-io] it seems that version 2.2.0 of
clap-verbosity-flag depends on clap version ^4.0.0 and has a
dev-dependency on clap version ^4.4.18. Based on my understanding of
the [caret-syntax] and cargo's treatment of it, it seems that both would
be compatible with the current version of rust-clap-4 in Guix, i.e.,
version 4.4.16. Did I misunderstand something?
[crates-io]:
<https://crates.io/crates/clap-verbosity-flag/2.2.0/dependencies>
[caret-syntax]:
<https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#caret-requirements>
> I added a comment on emacs-lsp-booster that it was specifically emacs
> and not emacs-minimal.
Yes, that's helpful to make explicit. Good catch.
> Patches pushed!
Thank you!
--
Suhail
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#69558] [PATCH 0/2] gnu: Add emacs-lsp-booster rust app.
2024-03-05 15:01 ` Suhail Singh
@ 2024-03-06 7:54 ` Efraim Flashner
2024-03-06 14:59 ` [bug#69557] " Suhail Singh
0 siblings, 1 reply; 7+ messages in thread
From: Efraim Flashner @ 2024-03-06 7:54 UTC (permalink / raw)
To: Suhail Singh; +Cc: 69558-done, 69557-done
[-- Attachment #1: Type: text/plain, Size: 2277 bytes --]
On Tue, Mar 05, 2024 at 10:01:38AM -0500, Suhail Singh wrote:
> Efraim Flashner <efraim@flashner.co.il> writes:
>
> > I had to downgrade rust-clap-verbose-flag-2 from 2.2.0 to 2.1.2
>
> I believe you mean rust-clap-verbosity-flag-2 .
yep
> > since 2.2.0 wanted a newer version of clap than we had (and this way I
> > could add it straight to master, not to rust-team).
>
> Thank you for doing that and taking the time to respond. Though it does
> make me wonder how I was able to build my patch series if it needed a
> newer version of clap. Wouldn't the guix build invocation have failed
> if that were the case? Perhaps it did fail for you?
The way the cargo packages work #:cargo-inputs and
#:cargo-development-inputs are some fancy magic around pulling the
sources and some dependant sources into the build, so unless you also
explicitly built rust-clap-verbosity-flag@2 then it wasn't built while
you were testing it.
> Additionally, based on [crates-io] it seems that version 2.2.0 of
> clap-verbosity-flag depends on clap version ^4.0.0 and has a
> dev-dependency on clap version ^4.4.18. Based on my understanding of
> the [caret-syntax] and cargo's treatment of it, it seems that both would
> be compatible with the current version of rust-clap-4 in Guix, i.e.,
> version 4.4.16. Did I misunderstand something?
4.4.16 satisfies ^4.0.0 but doesn't satisfy ^4.4.18. Something about
running the cargo builds inside the guix container means it needs to
satisfy all the constraints, even if they don't actually apply, like
when we need to pull in windows or apple dependencies.
> [crates-io]:
> <https://crates.io/crates/clap-verbosity-flag/2.2.0/dependencies>
>
> [caret-syntax]:
> <https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#caret-requirements>
>
> > I added a comment on emacs-lsp-booster that it was specifically emacs
> > and not emacs-minimal.
>
> Yes, that's helpful to make explicit. Good catch.
>
> > Patches pushed!
>
> Thank you!
>
> --
> Suhail
--
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] 7+ messages in thread