nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 59 lines 1.6 kB view raw
1{ 2 lib, 3 stdenv, 4 rustPlatform, 5 fetchFromGitHub, 6 help2man, 7 installShellFiles, 8 libiconv, 9 nix-update-script, 10}: 11 12let 13 isCross = stdenv.hostPlatform != stdenv.buildPlatform; 14in 15rustPlatform.buildRustPackage (finalAttrs: { 16 pname = "texlab"; 17 version = "5.25.1"; 18 19 src = fetchFromGitHub { 20 owner = "latex-lsp"; 21 repo = "texlab"; 22 tag = "v${finalAttrs.version}"; 23 hash = "sha256-hd7fDnZqNEz4Ayop3uPqL4IU6xgGsTjMhGvgF+Trgcw="; 24 }; 25 26 cargoHash = "sha256-4HFl6bPCHSUhHD5QB8sOK6irUaCAioZgKBm67REEYR8="; 27 28 outputs = [ "out" ] ++ lib.optional (!isCross) "man"; 29 30 nativeBuildInputs = [ installShellFiles ] ++ lib.optional (!isCross) help2man; 31 32 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ 33 libiconv 34 ]; 35 36 # When we cross compile we cannot run the output executable to 37 # generate the man page 38 postInstall = lib.optionalString (!isCross) '' 39 # TexLab builds man page separately in CI: 40 # https://github.com/latex-lsp/texlab/blob/v5.25.0/.github/workflows/publish.yml#L110-L114 41 help2man --no-info "$out/bin/texlab" > texlab.1 42 installManPage texlab.1 43 ''; 44 45 passthru.updateScript = nix-update-script { }; 46 47 meta = { 48 description = "Implementation of the Language Server Protocol for LaTeX"; 49 homepage = "https://github.com/latex-lsp/texlab"; 50 changelog = "https://github.com/latex-lsp/texlab/blob/v${finalAttrs.version}/CHANGELOG.md"; 51 license = lib.licenses.mit; 52 maintainers = with lib.maintainers; [ 53 doronbehar 54 kira-bruneau 55 ]; 56 platforms = lib.platforms.all; 57 mainProgram = "texlab"; 58 }; 59})