15 rustPlatform.buildRustPackage rec {
19 src = fetchFromGitHub {
20 owner = "tectonic-typesetting";
22 rev = "tectonic@${version}";
23 fetchSubmodules = true;
24 sha256 = "tBX737Yv4TvDo64cDYuALX61vzKjhz6PTMXQhWc5S/I=";
27 cargoSha256 = "awDVjJLwgpSMbwptmLhczaxB5HqvsdvEOUsLYb/zTUc=";
29 nativeBuildInputs = [ pkg-config makeBinaryWrapper ];
31 buildInputs = [ icu fontconfig harfbuzz openssl ]
32 ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Cocoa Foundation ]);
34 # Tectonic runs biber when it detects it needs to run it, see:
35 # https://github.com/tectonic-typesetting/tectonic/releases/tag/tectonic%400.7.0
37 wrapProgram $out/bin/tectonic \
38 --prefix PATH : "${lib.getBin biber}/bin"
39 '' + lib.optionalString stdenv.isLinux ''
40 substituteInPlace dist/appimage/tectonic.desktop \
41 --replace Exec=tectonic Exec=$out/bin/tectonic
42 install -D dist/appimage/tectonic.desktop -t $out/share/applications/
43 install -D dist/appimage/tectonic.svg -t $out/share/icons/hicolor/scalable/apps/
45 ln -s $out/bin/tectonic $out/bin/nextonic
51 description = "Modernized, complete, self-contained TeX/LaTeX engine, powered by XeTeX and TeXLive";
52 homepage = "https://tectonic-typesetting.github.io/";
53 changelog = "https://github.com/tectonic-typesetting/tectonic/blob/tectonic@${version}/CHANGELOG.md";
54 license = with licenses; [ mit ];
55 maintainers = with maintainers; [ lluchs doronbehar ];