2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform
|
2021-01-17 09:17:16 +00:00
|
|
|
, darwin, fontconfig, harfbuzz, openssl, pkg-config }:
|
2017-08-21 20:49:10 +00:00
|
|
|
|
2018-02-20 22:13:42 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 11:41:23 +00:00
|
|
|
pname = "tectonic";
|
2021-03-09 22:43:28 +00:00
|
|
|
version = "0.4.1";
|
2017-08-21 20:49:10 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tectonic-typesetting";
|
|
|
|
repo = "tectonic";
|
2020-09-10 13:43:18 +00:00
|
|
|
rev = "tectonic@${version}";
|
2021-03-09 22:43:28 +00:00
|
|
|
sha256 = "sha256-XQ3KRM12X80JPFMnQs//8ZJEv+AV1sr3BH0Nw/PH0HQ=";
|
2017-08-21 20:49:10 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 22:43:28 +00:00
|
|
|
cargoSha256 = "sha256-YOg4W933qUBcvo2y3nmvEWqxTfqWKDi3GCoTJWLnXxk=";
|
2017-08-21 20:49:10 +00:00
|
|
|
|
2021-01-17 09:17:16 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-08-21 20:49:10 +00:00
|
|
|
|
2018-05-27 12:25:55 +00:00
|
|
|
buildInputs = [ fontconfig harfbuzz openssl ]
|
2021-01-15 09:19:50 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Cocoa Foundation ]);
|
2017-08-21 20:49:10 +00:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
postInstall = lib.optionalString stdenv.isLinux ''
|
2020-11-01 20:30:44 +00:00
|
|
|
install -D dist/appimage/tectonic.desktop -t $out/share/applications/
|
|
|
|
install -D dist/appimage/tectonic.svg -t $out/share/icons/hicolor/scalable/apps/
|
|
|
|
'';
|
|
|
|
|
2020-10-03 11:00:59 +00:00
|
|
|
doCheck = true;
|
2017-08-21 20:49:10 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-08-21 20:49:10 +00:00
|
|
|
description = "Modernized, complete, self-contained TeX/LaTeX engine, powered by XeTeX and TeXLive";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://tectonic-typesetting.github.io/";
|
2020-12-12 04:20:00 +00:00
|
|
|
changelog = "https://github.com/tectonic-typesetting/tectonic/blob/tectonic@${version}/CHANGELOG.md";
|
2017-08-21 20:49:10 +00:00
|
|
|
license = with licenses; [ mit ];
|
2020-10-15 16:11:41 +00:00
|
|
|
maintainers = [ maintainers.lluchs maintainers.doronbehar ];
|
2017-08-21 20:49:10 +00:00
|
|
|
};
|
|
|
|
}
|