1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
(define-module (ruther packages vhdl-ls)
#:use-module (ruther packages rust-crates)
#: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 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)
(inputs
(my-cargo-inputs 'vhdl-ls))
(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-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")))
(home-page "https://github.com/kraigher/rust_hdl")
(synopsis "VHDL Language Server")
(description "This package provides VHDL Language Server.")
(license license:mpl2.0)))