nixpkgs/pkgs/tools/typesetting/tectonic/default.nix

37 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, rustPlatform
, 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
nativeBuildInputs = [ pkg-config ];
2017-08-21 20:49:10 +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/
'';
doCheck = true;
2017-08-21 20:49:10 +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";
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 ];
maintainers = [ maintainers.lluchs maintainers.doronbehar ];
2017-08-21 20:49:10 +00:00
};
}