Skip to content

Commit

Permalink
tectonic: 0.6.4 -> 0.7.0
Browse files Browse the repository at this point in the history
- Wrap tectonic with biber.
- Substitute Exec= line in desktop file.
- Format input arguments line by line.
  • Loading branch information
doronbehar committed Jun 25, 2021
1 parent c223fd6 commit 5aa8e9f
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions pkgs/tools/typesetting/tectonic/default.nix
Original file line number Diff line number Diff line change
@@ -1,26 +1,43 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform
, darwin, fontconfig, harfbuzz, openssl, pkg-config }:
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, darwin
, fontconfig
, harfbuzz
, openssl
, pkg-config
, makeWrapper
, biber
}:

rustPlatform.buildRustPackage rec {
pname = "tectonic";
version = "0.6.4";
version = "0.7.0";

src = fetchFromGitHub {
owner = "tectonic-typesetting";
repo = "tectonic";
rev = "tectonic@${version}";
fetchSubmodules = true;
sha256 = "11q0vwgjlailkw4l9z7r54wkxi8dwh40pm7bd74dcvm0x4323fpd";
sha256 = "sha256-CMvT9DouwERhDtBsLDesxN/QgEEfXLgtJaQLjq+SzOI=";
};

cargoSha256 = "1drfgrsfz44yqz15bcmb3dyyz7dr9zbs3idl1ssaiir24d4z1m9z";
cargoSha256 = "sha256-zGsb49yt6SRFfvNHZY+RpjihGpV9ziLsg9BII7WTX2Y=";

nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ pkg-config makeWrapper ];

buildInputs = [ fontconfig harfbuzz openssl ]
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Cocoa Foundation ]);

postInstall = lib.optionalString stdenv.isLinux ''
# Tectonic runs biber when it detects it needs to run it, see:
# https://github.com/tectonic-typesetting/tectonic/releases/tag/tectonic%400.7.0
postInstall = ''
wrapProgram $out/bin/tectonic \
--prefix PATH "${lib.getBin biber}/bin"
'' + lib.optionalString stdenv.isLinux ''
substituteInPlace dist/appimage/tectonic.desktop \
--replace Exec=tectonic Exec=$out/bin/tectonic
install -D dist/appimage/tectonic.desktop -t $out/share/applications/
install -D dist/appimage/tectonic.svg -t $out/share/icons/hicolor/scalable/apps/
'';
Expand Down

0 comments on commit 5aa8e9f

Please sign in to comment.