{ stdenv, fetchFromGitHub, rustPlatform , darwin, fontconfig, harfbuzz-icu, openssl, pkgconfig }: rustPlatform.buildRustPackage rec { name = "tectonic-${version}"; version = "0.1.8"; src = fetchFromGitHub { owner = "tectonic-typesetting"; repo = "tectonic"; rev = "v${version}"; sha256 = "1bm3s2zkyy44xrc804c65hrbc6ixzcr95na671b0dannjrikrx1x"; }; cargoSha256 = "1pyaw72h85ydq794mpgfjfq7dcq3a1dg4infh770swfaycyll6h6"; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ fontconfig harfbuzz-icu openssl ] ++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Cocoa Foundation ]); # tests fail due to read-only nix store doCheck = false; meta = with stdenv.lib; { description = "Modernized, complete, self-contained TeX/LaTeX engine, powered by XeTeX and TeXLive"; homepage = https://tectonic-typesetting.github.io/; license = with licenses; [ mit ]; maintainers = [ maintainers.lluchs ]; platforms = platforms.all; }; }