M modules/ruther/packages/rust-crates.scm => modules/ruther/packages/rust-crates.scm +1 -11
@@ 702,14 702,6 @@
(crate-source "zerovec-derive" "0.10.3"
"1ik322dys6wnap5d3gcsn09azmssq466xryn5czfm13mn7gsdbvf"))
-(define rust-vhdl-lang-macros-0.83.1
- (crate-source "vhdl_lang_macros" "0.83.1"
- "186l183yqhnf42m8bpzmj189zzsrklrzvh4a0z3hzfdhsg221cb5"))
-
-(define rust-vhdl-lang-0.83.1
- (crate-source "vhdl_lang" "0.83.1"
- "0l4n9pbja1vwpvcmz3b4darlm90vvyhjkpp09qx6zh1bqp8w3za6"))
-
(define ssss-separator 'end-of-crates)
@@ 718,9 710,7 @@
;;;
(define-cargo-inputs lookup-cargo-inputs
(vhdl-ls =>
- (list rust-vhdl-lang-0.83.1
- rust-vhdl-lang-macros-0.83.1
- rust-aho-corasick-1.1.3
+ (list rust-aho-corasick-1.1.3
rust-anstream-0.6.18
rust-anstyle-1.0.10
rust-anstyle-parse-0.2.6
M modules/ruther/packages/vhdl-ls.scm => modules/ruther/packages/vhdl-ls.scm +51 -25
@@ 25,38 25,64 @@
(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\"") ""))))
+ ;; (snippet
+ ;; #~(begin (use-modules (guix build utils))
+ ;; (substitute* "vhdl_ls/Cargo.toml"
+ ;; ((", path = \"../vhdl_lang\"") ""))))
(sha256
(base32 "0fs8qghnxw82by8dmlxlvm2spzqq3rk8aywj1ay7jxzwblkpkvq0"))))
(build-system cargo-build-system)
+ (native-inputs
+ (list
+ ))
(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
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'install-libraries
+ (lambda _
+ (mkdir-p (string-append #$output "/share/vhdl_libraries"))
+ (copy-recursively "vhdl_libraries"
+ (string-append #$output "/share/vhdl_libraries"))))
+ (replace 'package
+ (lambda _
+ (begin
+ ;;error: invalid inclusion of reserved file name Cargo.toml.orig in package source
+ (when (file-exists? "Cargo.toml.orig")
+ (delete-file "Cargo.toml.orig"))
+
+ ;; Use unstable feature ‘--registry’.
+ (setenv "RUSTC_BOOTSTRAP" "1")
+ (for-each
+ (lambda (pkg)
+ (invoke "cargo" "package" "--offline" "--package" pkg
+ "--registry" "crates-io" "-Z" "package-workspace"
+ "--no-metadata" "--no-verify")
+ (for-each
+ (lambda (crate)
+ (invoke "tar" "xzf" crate "-C" "guix-vendor"))
+ (begin
+ (delete-file-recursively "target/package/tmp-registry")
+ (find-files "target/package" "\\.crate$")))
+ ((assoc-ref %standard-phases 'patch-cargo-checksums)))
+ '("vhdl_lang_macros" "vhdl_lang" "vhdl_ls"))
+ (unsetenv "RUSTC_BOOTSTRAP"))))
+ (replace 'install
+ (lambda _
+ (mkdir-p #$output)
+ (invoke "cargo" "install" "--no-track"
+ "--path" "./vhdl_ls" "--root" #$output))))
+ ;; TODO After rust-team gets merged, remove replacement of 'package and use this
+ ;; #:cargo-package-crates ''("vhdl_lang_macros" "vhdl_lang" "vhdl_ls")
+ ;; TODO After rust-team gets merged, remove replacement of 'install and use this
+ ;; #:cargo-install-paths ''("vhdl_ls")
+ #:cargo-test-flags
+ '(list
"--release"
- "--package" "vhdl_ls")))
+ "--package" "vhdl_ls")
+ ))
(home-page "https://github.com/kraigher/rust_hdl")
(synopsis "VHDL Language Server")
(description "This package provides VHDL Language Server.")