tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rust/cargo.mk: add CARGO_GITHUB_CRATES
Hi!
I've just added better support for using crates in rust packages that
are pulled in with git from github.
Previously this need a couple lines in the Makefile and a patch to
Cargo.toml, like this:
Makefile:
LSP_TYPES_REV= e15db0593f0ecbbd80599c3f5880e4bf5da1ca0c
DISTFILES+= lsp-types-${LSP_TYPES_REV}.tar.gz
SITES.lsp-types-${LSP_TYPES_REV}.tar.gz+= -${MASTER_SITE_GITHUB:=astral-sh/}lsp-types/archive/${LSP_TYPES_REV}.tar.gz
Cargo.toml:
-lsp-types = { git = "https://github.com/astral-sh/lsp-types.git", rev = "e15db0593f0ecbbd80599c3f5880e4bf5da1ca0c", features = [
+lsp-types = { path = "../lsp-types-e15db0593f0ecbbd80599c3f5880e4bf5da1ca0c", features = [
This is now just:
CARGO_GITHUB_CRATES+= astral-sh lsp-types e15db0593f0ecbbd80599c3f5880e4bf5da1ca0c
in the Makefile.
Cheers,
Thomas
Home |
Main Index |
Thread Index |
Old Index