nixpkgs/pkgs/tools/typesetting/tectonic/default.nix
2020-12-12 04:20:00 +00:00

37 lines
1.3 KiB
Nix

{ stdenv, fetchFromGitHub, rustPlatform
, darwin, fontconfig, harfbuzz, openssl, pkgconfig }:
rustPlatform.buildRustPackage rec {
pname = "tectonic";
version = "0.3.3";
src = fetchFromGitHub {
owner = "tectonic-typesetting";
repo = "tectonic";
rev = "tectonic@${version}";
sha256 = "1ncczcchyphprkrb8spya400gi212a6akx18fm3j4xdhmg9caj3f";
};
cargoSha256 = "11xvq0l9xrppcplkshd5wxv90s97x4iavhzbdk9px992zl0m6ar6";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ fontconfig harfbuzz openssl ]
++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Cocoa Foundation ]);
postInstall = stdenv.lib.optionalString stdenv.isLinux ''
install -D dist/appimage/tectonic.desktop -t $out/share/applications/
install -D dist/appimage/tectonic.svg -t $out/share/icons/hicolor/scalable/apps/
'';
doCheck = true;
meta = with stdenv.lib; {
description = "Modernized, complete, self-contained TeX/LaTeX engine, powered by XeTeX and TeXLive";
homepage = "https://tectonic-typesetting.github.io/";
changelog = "https://github.com/tectonic-typesetting/tectonic/blob/tectonic@${version}/CHANGELOG.md";
license = with licenses; [ mit ];
maintainers = [ maintainers.lluchs maintainers.doronbehar ];
};
}