From 5feb0962574e90eb12d9f9939a22fdc01f68afc7 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Fri, 9 Aug 2024 23:07:15 +0200 Subject: [PATCH] feat: add vhdl_ls --- ruther/packages/vhdl-ls.scm | 596 ++++++++++++++++++++++++++++++++++++ 1 file changed, 596 insertions(+) create mode 100644 ruther/packages/vhdl-ls.scm diff --git a/ruther/packages/vhdl-ls.scm b/ruther/packages/vhdl-ls.scm new file mode 100644 index 0000000..7d133e5 --- /dev/null +++ b/ruther/packages/vhdl-ls.scm @@ -0,0 +1,596 @@ +(define-module (ruther packages vhdl-ls) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix utils) + + #:use-module (guix gexp) + #:use-module (guix packages) + + #:use-module (guix git-download) + #:use-module (guix download) + + #:use-module (guix build-system cargo) + + #:use-module (gnu packages crates-io) + #:use-module (gnu packages crates-windows)) + +(define-public rust-skiplist-0.4 + (package + (name "rust-skiplist") + (version "0.4.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "skiplist" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0ny9qjxd22090clhvbf1mlnx9k1ncvqmbzis25fpc2a65dx38dzs")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-rand" ,rust-rand-0.8)))) + (home-page "https://www.jpellis.me/projects/rust-skiplist/") + (synopsis + "Skiplist implementation in rust, providing fast insertion and removal. A normal skiplist is implemented, as well as an ordered skiplist and a skipmap") + (description + "This package provides Skiplist implementation in rust, providing fast insertion and removal. A normal +skiplist is implemented, as well as an ordered skiplist and a skipmap.") + (license license:expat))) + +(define-public rust-float-extras-0.1 + (package + (name "rust-float-extras") + (version "0.1.6") + (source + (origin + (method url-fetch) + (uri (crate-uri "float_extras" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0ymb731vf7qdvw20spxavy1a8k8f9fb6v8ziamck38lyckw70axj")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-libc" ,rust-libc-0.2)))) + (home-page "https://github.com/yjh0502/float_extras") + (synopsis "Extra floating-point math functions from C math library") + (description + "This package provides Extra floating-point math functions from C math library.") + (license license:asl2.0))) + +(define-public rust-quantogram-0.4 + (package + (name "rust-quantogram") + (version "0.4.4") + (source + (origin + (method url-fetch) + (uri (crate-uri "quantogram" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0hxk6ns7fhxbg0mcblkxkq7f534w5n5rmrnapl5887b6i5pizmkp")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-float-extras" ,rust-float-extras-0.1) + ("rust-skiplist" ,rust-skiplist-0.4)))) + (home-page "https://github.com/paulchernoch/quantogram/") + (synopsis + "Approximate quantiles using histograms with logarithmically sized bins to guarantee worst case absolute relative error") + (description + "This package provides Approximate quantiles using histograms with logarithmically sized bins to +guarantee worst case absolute relative error.") + (license license:expat))) + +(define-public rust-dactyl-0.7 + (package + (name "rust-dactyl") + (version "0.7.2") + (source + (origin + (method url-fetch) + (uri (crate-uri "dactyl" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0nrkpcflk37jwkgnch252rlqmbacgm3wpplv9h5krbxx1g0n8d2z")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t)) + (home-page "https://github.com/Blobfolio/dactyl") + (synopsis + "small library to quickly stringify integers with basic formatting.") + (description + "This package provides a small library to quickly stringify integers with basic +formatting.") + (license license:wtfpl2))) + +(define-public rust-brunch-0.5 + (package + (name "rust-brunch") + (version "0.5.3") + (source + (origin + (method url-fetch) + (uri (crate-uri "brunch" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1ranrp9qqmq8z2qkwdwxc67sl1w6mjk3kr7711xmrlw5v48dfcir")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs (("rust-dactyl" ,rust-dactyl-0.7) + ("rust-unicode-width" ,rust-unicode-width-0.1)) + #:cargo-development-inputs (("rust-quantogram" ,rust-quantogram-0.4)))) + (home-page "https://github.com/Blobfolio/brunch") + (synopsis "simple micro-benchmark runner.") + (description "This package provides a simple micro-benchmark runner.") + (license license:wtfpl2))) + +(define-public rust-regex-1 + (package + (name "rust-regex") + (version "1.10.6") + (source + (origin + (method url-fetch) + (uri (crate-uri "regex" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "06cnlxwzyqfbw1za1i7ks89ns4i2kr0lpg5ykx56b8v7dd6df6a2")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-aho-corasick" ,rust-aho-corasick-1) + ("rust-memchr" ,rust-memchr-2) + ("rust-regex-automata" ,rust-regex-automata-0.4) + ("rust-regex-syntax" ,rust-regex-syntax-0.8)))) + (home-page "https://github.com/rust-lang/regex") + (synopsis + "An implementation of regular expressions for Rust. This implementation uses +finite automata and guarantees linear time matching on all inputs.") + (description + "This package provides An implementation of regular expressions for Rust. This implementation uses +finite automata and guarantees linear time matching on all inputs.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-vhdl-lang-macros-0.82 + (package + (name "rust-vhdl-lang-macros") + (version "0.82.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "vhdl_lang_macros" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1gx06h294s98j1figzb1rvspl46wsbxzy9pczdd0apmikidj1dmx")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-quote" ,rust-quote-1) + ("rust-syn" ,rust-syn-2)))) + (home-page "https://github.com/kraigher/rust_hdl") + (synopsis "VHDL Language Frontend - Macros") + (description "This package provides VHDL Language Frontend - Macros.") + (license license:mpl2.0))) + +(define-public rust-winnow-0.6 + (package + (name "rust-winnow") + (version "0.6.18") + (source + (origin + (method url-fetch) + (uri (crate-uri "winnow" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0vrsrnf2nm9jsk1161x1vacmi3ns4h3h10fib91rs28zd6jbvab8")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-anstream" ,rust-anstream-0.3) + ("rust-anstyle" ,rust-anstyle-1) + ("rust-is-terminal" ,rust-is-terminal-0.4) + ("rust-memchr" ,rust-memchr-2) + ("rust-terminal-size" ,rust-terminal-size-0.2)))) + (home-page "https://github.com/winnow-rs/winnow") + (synopsis "byte-oriented, zero-copy, parser combinators library") + (description + "This package provides a byte-oriented, zero-copy, parser combinators library.") + (license license:expat))) + +(define-public rust-toml-edit-0.22 + (package + (name "rust-toml-edit") + (version "0.22.20") + (source + (origin + (method url-fetch) + (uri (crate-uri "toml_edit" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "07ffw4626k6abicjxb2idh12f1p5fn965zk660zhqsyj5b048g2q")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-indexmap" ,rust-indexmap-2) + ("rust-kstring" ,rust-kstring-2) + ("rust-serde" ,rust-serde-1) + ("rust-serde-spanned" ,rust-serde-spanned-0.6) + ("rust-toml-datetime" ,rust-toml-datetime-0.6) + ("rust-winnow" ,rust-winnow-0.6)))) + (home-page "https://github.com/toml-rs/toml") + (synopsis "Yet another format-preserving TOML parser") + (description + "This package provides Yet another format-preserving TOML parser.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-toml-datetime-0.6 + (package + (name "rust-toml-datetime") + (version "0.6.8") + (source + (origin + (method url-fetch) + (uri (crate-uri "toml_datetime" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0hgv7v9g35d7y9r2afic58jvlwnf73vgd1mz2k8gihlgrf73bmqd")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-serde" ,rust-serde-1)))) + (home-page "https://github.com/toml-rs/toml") + (synopsis "TOML-compatible datetime type") + (description "This package provides a TOML-compatible datetime type.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-serde-spanned-0.6 + (package + (name "rust-serde-spanned") + (version "0.6.7") + (source + (origin + (method url-fetch) + (uri (crate-uri "serde_spanned" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0v9h2nlg8r7n7dkbgj1aw59g35kl869l652wc6zi2f4zawqinnzb")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-serde" ,rust-serde-1)))) + (home-page "https://github.com/toml-rs/toml") + (synopsis "Serde-compatible spanned Value") + (description "This package provides Serde-compatible spanned Value.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-toml-0.8 + (package + (name "rust-toml") + (version "0.8.19") + (source + (origin + (method url-fetch) + (uri (crate-uri "toml" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0knjd3mkxyb87qcs2dark3qkpadidap3frqfj5nqvhpxwfc1zvd1")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-indexmap" ,rust-indexmap-2) + ("rust-serde" ,rust-serde-1) + ("rust-serde-spanned" ,rust-serde-spanned-0.6) + ("rust-toml-datetime" ,rust-toml-datetime-0.6) + ("rust-toml-edit" ,rust-toml-edit-0.22)))) + (home-page "https://github.com/toml-rs/toml") + (synopsis + "native Rust encoder and decoder of TOML-formatted files and streams. Provides +implementations of the standard Serialize/Deserialize traits for TOML data to +facilitate deserializing and serializing Rust structures.") + (description + "This package provides a native Rust encoder and decoder of TOML-formatted files +and streams. Provides implementations of the standard Serialize/Deserialize +traits for TOML data to facilitate deserializing and serializing Rust +structures.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-unsafe-libyaml-0.2 + (package + (name "rust-unsafe-libyaml") + (version "0.2.11") + (source + (origin + (method url-fetch) + (uri (crate-uri "unsafe-libyaml" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0qdq69ffl3v5pzx9kzxbghzn0fzn266i1xn70y88maybz9csqfk7")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t)) + (home-page "https://github.com/dtolnay/unsafe-libyaml") + (synopsis "libyaml transpiled to rust by c2rust") + (description "This package provides libyaml transpiled to rust by c2rust.") + (license license:expat))) + +(define-public rust-serde-yaml-0.9 + (package + (name "rust-serde-yaml") + (version "0.9.34+deprecated") + (source + (origin + (method url-fetch) + (uri (crate-uri "serde_yaml" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0isba1fjyg3l6rxk156k600ilzr8fp7crv82rhal0rxz5qd1m2va")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-indexmap" ,rust-indexmap-2) + ("rust-itoa" ,rust-itoa-1) + ("rust-ryu" ,rust-ryu-1) + ("rust-serde" ,rust-serde-1) + ("rust-unsafe-libyaml" ,rust-unsafe-libyaml-0.2)))) + (home-page "https://github.com/dtolnay/serde-yaml") + (synopsis "YAML data format for Serde") + (description "This package provides YAML data format for Serde.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-serde-json-1 + (package + (name "rust-serde-json") + (version "1.0.122") + (source + (origin + (method url-fetch) + (uri (crate-uri "serde_json" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1nk8phyvwmhrmcbwdr8rbjd9bqp8np62dcbnhisgymqwjl1n4jvq")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-indexmap" ,rust-indexmap-2) + ("rust-itoa" ,rust-itoa-1) + ("rust-memchr" ,rust-memchr-2) + ("rust-ryu" ,rust-ryu-1) + ("rust-serde" ,rust-serde-1)))) + (home-page "https://github.com/serde-rs/json") + (synopsis "JSON serialization file format") + (description "This package provides a JSON serialization file format.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-subst-0.3 + (package + (name "rust-subst") + (version "0.3.3") + (source + (origin + (method url-fetch) + (uri (crate-uri "subst" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "182bsg8pn7ch7j0kyz1ysp1a2danip4csdpyqfhb70n5zzkkyv96")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-memchr" ,rust-memchr-2) + ("rust-serde" ,rust-serde-1) + ("rust-serde-json" ,rust-serde-json-1) + ("rust-serde-yaml" ,rust-serde-yaml-0.9) + ("rust-toml" ,rust-toml-0.8) + ("rust-unicode-width" ,rust-unicode-width-0.1)))) + (home-page "https://github.com/fizyr/subst") + (synopsis "shell-like variable substitution") + (description "This package provides shell-like variable substitution.") + (license (list license:bsd-2 license:asl2.0)))) + +(define-public rust-strum-macros-0.26 + (package + (name "rust-strum-macros") + (version "0.26.4") + (source + (origin + (method url-fetch) + (uri (crate-uri "strum_macros" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1gl1wmq24b8md527cpyd5bw9rkbqldd7k1h38kf5ajd2ln2ywssc")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-heck" ,rust-heck-0.5) + ("rust-proc-macro2" ,rust-proc-macro2-1) + ("rust-quote" ,rust-quote-1) + ("rust-rustversion" ,rust-rustversion-1) + ("rust-syn" ,rust-syn-2)))) + (home-page "https://github.com/Peternator7/strum") + (synopsis "Helpful macros for working with enums and strings") + (description + "This package provides Helpful macros for working with enums and strings.") + (license license:expat))) + +(define-public rust-strum-0.26 + (package + (name "rust-strum") + (version "0.26.3") + (source + (origin + (method url-fetch) + (uri (crate-uri "strum" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "01lgl6jvrf4j28v5kmx9bp480ygf1nhvac8b4p7rcj9hxw50zv4g")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-phf" ,rust-phf-0.10) + ("rust-strum-macros" ,rust-strum-macros-0.26)))) + (home-page "https://github.com/Peternator7/strum") + (synopsis "Helpful macros for working with enums and strings") + (description + "This package provides Helpful macros for working with enums and strings.") + (license license:expat))) + +(define-public rust-pinned-vec-0.1 + (package + (name "rust-pinned-vec") + (version "0.1.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "pinned_vec" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "12il2y234k9r4i3v9yh7qpavrwdhi48b057z96hb0bv2j8nxi2i6")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t)) + (home-page "https://github.com/wishawa/decurse") + (synopsis "Vec-like data structure whose elements never move") + (description + "This package provides Vec-like data structure whose elements never move.") + (license license:mpl2.0))) + +(define-public rust-enum-map-derive-0.17 + (package + (name "rust-enum-map-derive") + (version "0.17.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "enum-map-derive" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1sv4mb343rsz4lc3rh7cyn0pdhf7fk18k1dgq8kfn5i5x7gwz0pj")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-proc-macro2" ,rust-proc-macro2-1) + ("rust-quote" ,rust-quote-1) + ("rust-syn" ,rust-syn-2)))) + (home-page "https://codeberg.org/xfix/enum-map") + (synopsis "Macros 1.1 implementation of #[derive(Enum)]") + (description + "This package provides Macros 1.1 implementation of #[derive(Enum)].") + (license (list license:expat license:asl2.0)))) + +(define-public rust-enum-map-2 + (package + (name "rust-enum-map") + (version "2.7.3") + (source + (origin + (method url-fetch) + (uri (crate-uri "enum-map" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1sgjgl4mmz93jdkfdsmapc3dmaq8gddagw9s0fd501w2vyzz6rk8")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-arbitrary" ,rust-arbitrary-1) + ("rust-enum-map-derive" ,rust-enum-map-derive-0.17) + ("rust-serde" ,rust-serde-1)))) + (home-page "https://codeberg.org/xfix/enum-map") + (synopsis "map with C-like enum keys represented internally as an array") + (description + "This package provides a map with C-like enum keys represented internally as an +array.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-vhdl-lang-0.82 + (package + (name "rust-vhdl-lang") + (version "0.82.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "vhdl_lang" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "038f4qxnx4lpalx07nw987m8gkizz16ifbfpr14qjxfgsz6kmhrj")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-clap" ,rust-clap-4) + ("rust-dirs" ,rust-dirs-5) + ("rust-dunce" ,rust-dunce-1) + ("rust-enum-map" ,rust-enum-map-2) + ("rust-fnv" ,rust-fnv-1) + ("rust-glob" ,rust-glob-0.2) + ("rust-itertools" ,rust-itertools-0.5) + ("rust-pad" ,rust-pad-0.1) + ("rust-parking-lot" ,rust-parking-lot-0.4) + ("rust-pinned-vec" ,rust-pinned-vec-0.1) + ("rust-rayon" ,rust-rayon-1) + ("rust-strum" ,rust-strum-0.26) + ("rust-subst" ,rust-subst-0.3) + ("rust-toml" ,rust-toml-0.2) + ("rust-vhdl-lang-macros" ,rust-vhdl-lang-macros-0.82)))) + (home-page "https://github.com/kraigher/rust_hdl") + (synopsis "VHDL Language Frontend") + (description "This package provides VHDL Language Frontend.") + (license license:mpl2.0))) + +(define-public vhdl-ls + (package + (name "vhdl-ls") + (version "0.82.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/VHDL-LS/rust_hdl") + (commit (string-append "v" version)))) + (snippet + #~(begin (use-modules (guix build utils)) + (substitute* "vhdl_ls/Cargo.toml" + ((", path = \"../vhdl_lang\"") "")))) + (sha256 + (base32 "0wmxbp3m8y27cdcn84vynx5h8nqsys1swqymh4xi4ysd078442ww")))) + (build-system cargo-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (mkdir-p out) + (invoke "cargo" "install" "--no-track" + "--path" "./vhdl_ls" "--root" out))))) + #:cargo-inputs + (("rust-clap" ,rust-clap-4) + ("rust-env-logger" ,rust-env-logger-0.3) + ("rust-fnv" ,rust-fnv-1) + ("rust-fuzzy-matcher" ,rust-fuzzy-matcher-0.3) + ("rust-log" ,rust-log-0.3) + ("rust-lsp-server" ,rust-lsp-server-0.7) + ("rust-lsp-types" ,rust-lsp-types-0.95) + ("rust-serde" ,rust-serde-1) + ("rust-serde-json" ,rust-serde-json-1) + ("rust-vhdl-lang" ,rust-vhdl-lang-0.82)) + #:cargo-build-flags + (list + "--release" "--package" "vhdl_ls") + #:cargo-package-flags + (list + "--no-metadata" "--no-verify" + "--package" "vhdl_ls") + #:cargo-test-flags + (list + "--release" + "--package" "vhdl_ls") + #:cargo-development-inputs + (("rust-pretty-assertions" ,rust-pretty-assertions-1) + ("rust-brunch" ,rust-brunch-0.5) + ("rust-assert-cmd" ,rust-assert-cmd-2) + ("rust-assert-matches" ,rust-assert-matches-1) + ("rust-predicates" ,rust-predicates-3) + ("rust-regex" ,rust-regex-1) + ("rust-tempfile" ,rust-tempfile-3)))) + (home-page "https://github.com/kraigher/rust_hdl") + (synopsis "VHDL Language Server") + (description "This package provides VHDL Language Server.") + (license license:mpl2.0))) -- 2.48.1