2023-03-24 00:07:29 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "vhdl-ls";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.65.0";
|
2023-03-24 00:07:29 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "VHDL-LS";
|
|
|
|
repo = "rust_hdl";
|
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-B+jzTrV5Kk4VOgr+5l0F5+cXzfb0aErKaiH50vIdLq4=";
|
2023-03-24 00:07:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# No Cargo.lock upstream, see:
|
|
|
|
# https://github.com/VHDL-LS/rust_hdl/issues/166
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
};
|
|
|
|
postPatch = ''
|
|
|
|
ln -s ${./Cargo.lock} Cargo.lock
|
|
|
|
''
|
|
|
|
# Also make it look up vhdl_libraries in an expected location
|
|
|
|
+ ''
|
|
|
|
substituteInPlace vhdl_lang/src/config.rs \
|
|
|
|
--replace /usr/lib $out/lib
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/lib/rust_hdl
|
|
|
|
cp -r vhdl_libraries $out/lib/rust_hdl
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A fast VHDL language server";
|
|
|
|
homepage = "https://github.com/VHDL-LS/rust_hdl";
|
|
|
|
license = lib.licenses.mpl20;
|
|
|
|
mainProgram = "vhdl_ls";
|
|
|
|
maintainers = with lib.maintainers; [ doronbehar ];
|
|
|
|
};
|
|
|
|
}
|