(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 #f)))
(define-public rust-dactyl-0.7
(package
(name "rust-dactyl")
(version "0.7.4")
(source
(origin
(method url-fetch)
(uri (crate-uri "dactyl" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0jdhmcxjr70q690xb19asnpv1vffv5m462glrzk6ncxijjmx3jky"))))
(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-vhdl-lang-macros-0.83
(package
(name "rust-vhdl-lang-macros")
(version "0.83.1")
(source
(origin
(method url-fetch)
(uri (crate-uri "vhdl_lang_macros" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "186l183yqhnf42m8bpzmj189zzsrklrzvh4a0z3hzfdhsg221cb5"))))
(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-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-subst-0.3
(package
(name "rust-subst")
(version "0.3.7")
(source
(origin
(method url-fetch)
(uri (crate-uri "subst" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "038n81ns4b8ncjynhif7wq474023chg5mwccxw0xn6gaflk99rrk"))))
(build-system cargo-build-system)
(arguments
`(#:skip-build? #t
#:cargo-inputs (("rust-indexmap" ,rust-indexmap-2)
("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-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.83
(package
(name "rust-vhdl-lang")
(version "0.83.1")
(source
(origin
(method url-fetch)
(uri (crate-uri "vhdl_lang" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0l4n9pbja1vwpvcmz3b4darlm90vvyhjkpp09qx6zh1bqp8w3za6"))))
(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.4)
("rust-vhdl-lang-macros" ,rust-vhdl-lang-macros-0.83))))
(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.83.1")
(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 "0fs8qghnxw82by8dmlxlvm2spzqq3rk8aywj1ay7jxzwblkpkvq0"))))
(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)
(mkdir-p (string-append out "/share/vhdl_libraries"))
(copy-recursively "vhdl_libraries"
(string-append out "/share/vhdl_libraries"))))))
#: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.83))
#: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)))