2021-01-07 16:09:48 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2019-09-03 01:45:26 +01:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2020-05-28 00:18:18 +01:00
|
|
|
, installShellFiles
|
2021-05-18 17:15:41 +01:00
|
|
|
, libiconv
|
2019-09-03 01:45:26 +01:00
|
|
|
, Security
|
2021-05-18 17:15:41 +01:00
|
|
|
, CoreServices
|
2019-09-03 01:45:26 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "texlab";
|
2021-06-19 12:35:14 +01:00
|
|
|
version = "3.2.0";
|
2019-09-03 01:45:26 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "latex-lsp";
|
|
|
|
repo = pname;
|
2020-02-14 03:35:02 +00:00
|
|
|
rev = "v${version}";
|
2021-06-19 12:35:14 +01:00
|
|
|
hash = "sha256-iXsV7zt190GH0kTMpdmf8xHk4cqtCVwq6LDICmhe5qU=";
|
2019-09-03 01:45:26 +01:00
|
|
|
};
|
|
|
|
|
2021-06-19 12:35:14 +01:00
|
|
|
cargoHash = "sha256-Yqn6VpAKw93QvkxuwNcYvrQm0C4TfisRDcmFy95/yw8=";
|
2021-05-17 22:51:55 +01:00
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
2019-09-03 01:45:26 +01:00
|
|
|
|
2020-05-28 00:18:18 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-05-18 17:15:41 +01:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security CoreServices ];
|
2019-09-03 01:45:26 +01:00
|
|
|
|
2020-05-28 00:18:18 +01:00
|
|
|
postInstall = ''
|
|
|
|
installManPage texlab.1
|
2021-05-17 22:51:55 +01: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
|
2021-05-18 17:15:41 +01:00
|
|
|
rm "$out/lib/libhtml2md${stdenv.hostPlatform.extensions.sharedLibrary}"
|
2021-05-17 22:51:55 +01:00
|
|
|
rmdir "$out/lib"
|
2021-05-18 17:15:41 +01:00
|
|
|
'';
|
2020-05-28 00:18:18 +01:00
|
|
|
|
2021-01-07 16:09:48 +00:00
|
|
|
meta = with lib; {
|
2019-09-03 01:45:26 +01:00
|
|
|
description = "An implementation of the Language Server Protocol for LaTeX";
|
2021-01-07 16:09:48 +00:00
|
|
|
homepage = "https://texlab.netlify.app";
|
2019-09-03 01:45:26 +01:00
|
|
|
license = licenses.mit;
|
2021-05-22 15:47:40 +01:00
|
|
|
maintainers = with maintainers; [ doronbehar kira-bruneau ];
|
2021-05-22 20:30:15 +01:00
|
|
|
platforms = platforms.all;
|
2019-09-03 01:45:26 +01:00
|
|
|
};
|
|
|
|
}
|