2021-01-09 10:05:03 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2020-05-29 06:06:01 +00:00
|
|
|
, installShellFiles
|
2021-05-20 23:08:51 +00:00
|
|
|
, libiconv
|
2020-04-24 23:36:52 +00:00
|
|
|
, Security
|
2021-05-20 23:08:51 +00:00
|
|
|
, CoreServices
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "texlab";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "3.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "latex-lsp";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
hash = "sha256-iXsV7zt190GH0kTMpdmf8xHk4cqtCVwq6LDICmhe5qU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
cargoHash = "sha256-Yqn6VpAKw93QvkxuwNcYvrQm0C4TfisRDcmFy95/yw8=";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security CoreServices ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage texlab.1
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
# Remove generated dylib of html2md dependency. TexLab statically
|
|
|
|
# links to the generated rlib and doesn't reference the dylib. I
|
|
|
|
# couldn't find any way to prevent building this by passing cargo flags.
|
|
|
|
# See https://gitlab.com/Kanedias/html2md/-/blob/0.2.10/Cargo.toml#L20
|
|
|
|
rm "$out/lib/libhtml2md${stdenv.hostPlatform.extensions.sharedLibrary}"
|
|
|
|
rmdir "$out/lib"
|
2020-05-29 06:06:01 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An implementation of the Language Server Protocol for LaTeX";
|
2021-01-09 10:05:03 +00:00
|
|
|
homepage = "https://texlab.netlify.app";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-05-28 09:39:13 +00:00
|
|
|
maintainers = with maintainers; [ doronbehar kira-bruneau ];
|
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|