summary refs log tree commit diff
path: root/pkgs/tools/typesetting
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2021-06-25 09:30:55 +0300
committerDoron Behar <doron.behar@gmail.com>2021-06-25 09:36:22 +0300
commit5aa8e9f0f90b0c9bbdf7b18ead18704d1622c509 (patch)
tree27a168618a147f463f65dd6d88339b11069c572d /pkgs/tools/typesetting
parentc223fd60072771c8dea3bba2f8f866302aa4c956 (diff)
downloadnixpkgs-5aa8e9f0f90b0c9bbdf7b18ead18704d1622c509.tar
nixpkgs-5aa8e9f0f90b0c9bbdf7b18ead18704d1622c509.tar.gz
nixpkgs-5aa8e9f0f90b0c9bbdf7b18ead18704d1622c509.tar.bz2
nixpkgs-5aa8e9f0f90b0c9bbdf7b18ead18704d1622c509.tar.lz
nixpkgs-5aa8e9f0f90b0c9bbdf7b18ead18704d1622c509.tar.xz
nixpkgs-5aa8e9f0f90b0c9bbdf7b18ead18704d1622c509.tar.zst
nixpkgs-5aa8e9f0f90b0c9bbdf7b18ead18704d1622c509.zip
tectonic: 0.6.4 -> 0.7.0
- Wrap tectonic with biber.
- Substitute Exec= line in desktop file.
- Format input arguments line by line.
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r--pkgs/tools/typesetting/tectonic/default.nix31
1 files changed, 24 insertions, 7 deletions
diff --git a/pkgs/tools/typesetting/tectonic/default.nix b/pkgs/tools/typesetting/tectonic/default.nix
index 3209ccf6029..9cbf9ac7e2f 100644
--- a/pkgs/tools/typesetting/tectonic/default.nix
+++ b/pkgs/tools/typesetting/tectonic/default.nix
@@ -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/
   '';