diff mbox series

[bug#46192,21/21] gnu: Add kak-lsp.

Message ID 20210204113912.iisy3tjabgloc2vg@minitower
State Accepted
Headers show
Series None | expand

Commit Message

aecepoglu Feb. 4, 2021, 11:39 a.m. UTC
* gnu/packages/crates-io.scm (kak-lsp): New variable.
---
 gnu/packages/text-editors.scm | 40 +++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

Comments

Nicolas Goaziou Feb. 4, 2021, 3:12 p.m. UTC | #1
Hello,

aecepoglu <aecepoglu@fastmail.fm> writes:

> * gnu/packages/crates-io.scm (kak-lsp): New variable.

Applied, along with all the Rust crates. Thank you!

I add a few notes here, for future contributions:

- Indentation was off in every package. After using the crate importer,
  you need to fix it.

- Some packages had an empty home-page field. The crate importer is not
  always able to extract this information. In that case, you need to get
  it on your own, e.g., by visiting crates.io.

- Non-terminal packages should have #:skip-build? set to #t. In this
  patch set, every package except `kak-lsp' should have this flag on.

- You made `rust-arc-swap-1' inherit from `rust-arc-swap-0.4' but it is
  the other way around. Older packages inherit from recent ones.

- `rust-slog-scope-4' crate was added before its inputs (e.g.,
  `rust-arc-swap').

- `rust-sloggers-1' crate needed to be packaged since it is a Cargo
  input from `kak-lsp'.

- `kak-lsp' would not build because the "text-editors.scm" file was
  missing some #:use-module statements. I suggest to check build using
  "./pre-inst-env" script from the repositiory. See manual for details.

I added a copyright line for you in both "crates-io.scm" and
"text-editors.scm". Let me know if I used a wrong name, I'll change it.

Regards,
diff mbox series

Patch

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 052dfa1236..34206b419c 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -204,6 +204,46 @@  competitive (as in keystroke count) with Vim.")
     (home-page "https://kakoune.org/")
     (license license:unlicense)))
 
+(define-public kak-lsp
+  (package
+   (name "kak-lsp")
+   (version "9.0.0")
+   (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://github.com/kak-lsp/kak-lsp")
+                  (commit (string-append "v" version))))
+            (file-name (git-file-name name version))
+            (sha256 "1wfv2fy5ga6kc51zka3pak0hq97csm2l11bz74w3n1hrf5q9nnf8")))
+   (build-system cargo-build-system)
+   (arguments `(#:cargo-inputs
+                (("rust-crossbeam-channel" ,rust-crossbeam-channel-0.4)
+                 ("rust-clap" ,rust-clap-2)
+                 ("rust-daemonize" ,rust-daemonize-0.4)
+                 ("rust-dirs" ,rust-dirs-2.0)
+                 ("rust-enum_primitive" ,rust-enum-primitive-0.1)
+                 ("rust-glob" ,rust-glob-0.3)
+                 ("rust-itertools" ,rust-itertools-0.9)
+                 ("rust-lsp-types" ,rust-lsp-types-0.80)
+                 ("rust-jsonrpc-core" ,rust-jsonrpc-core-14)
+                 ("rust-libc" ,rust-libc-0.2)
+                 ("rust-rand" ,rust-rand-0.7)
+                 ("rust-regex" ,rust-regex-1)
+                 ("rust-ropey" ,rust-ropey-1)
+                 ("rust-serde" ,rust-serde-1)
+                 ("rust-serde_derive" ,rust-serde-derive-1)
+                 ("rust-serde_json" ,rust-serde-json-1)
+                 ("rust-slog" ,rust-slog-2)
+                 ("rust-slog-scope" ,rust-slog-scope-4)
+                 ("rust-sloggers" ,rust-sloggers-1)
+                 ("rust-toml" ,rust-toml-0.5)
+                 ("rust-url" ,rust-url-2)
+                 ("rust-whoami" ,rust-whoami-0.8))))
+   (home-page "https://github.com/kak-lsp/kak-lsp")
+   (synopsis "Language Server Protocol (LSP) client for Kakoune")
+   (description "kak-lsp is a Language Server Protocol client for Kakoune implemented in Rust.")
+   (license license:unlicense)))
+
 (define-public joe
   (package
     (name "joe")