3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/misc/texlab/default.nix

54 lines
1.4 KiB
Nix
Raw Normal View History

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
2021-11-14 19:10:29 +00:00
, nix-update-script
2019-09-03 01:45:26 +01:00
}:
rustPlatform.buildRustPackage rec {
pname = "texlab";
2021-11-14 19:10:29 +00:00
version = "3.3.1";
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-11-14 19:10:29 +00:00
sha256 = "sha256-HX1Mnzq+GsRnUsJERK5gPI5x4op885t+9Vn6vogSK1o=";
2019-09-03 01:45:26 +01:00
};
2021-11-14 19:10:29 +00:00
cargoSha256 = "sha256-AdzaLqwONI7WEcL8U0OGuyX/pg+BpZbJz9aaSClo47Q=";
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
# 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}"
rmdir "$out/lib"
2021-05-18 17:15:41 +01:00
'';
2020-05-28 00:18:18 +01:00
2021-11-14 19:10:29 +00:00
passthru.updateScript = nix-update-script {
attrPath = pname;
};
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;
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
};
}