From 95bd3559be9fb86077692ab58fad8fa052d542f7 Mon Sep 17 00:00:00 2001 From: Bryan Lai Date: Thu, 8 Aug 2024 12:11:46 +0800 Subject: [PATCH] tectonic-unwrapped, tectonic: fix build Add patch bumping the `time` crate, fix build with rust 1.80. --- pkgs/tools/typesetting/tectonic/default.nix | 24 +++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/typesetting/tectonic/default.nix b/pkgs/tools/typesetting/tectonic/default.nix index 3320e91e51b99..93b186fadf04e 100644 --- a/pkgs/tools/typesetting/tectonic/default.nix +++ b/pkgs/tools/typesetting/tectonic/default.nix @@ -16,20 +16,32 @@ , openssl , pkg-config , icu +, fetchpatch2 +, applyPatches }: rustPlatform.buildRustPackage rec { pname = "tectonic"; version = "0.15.0"; - src = fetchFromGitHub { - owner = "tectonic-typesetting"; - repo = "tectonic"; - rev = "tectonic@${version}"; - sha256 = "sha256-xZHYiaQ8ASUwu0ieHIXcjRaH06SQoB6OR1y7Ok+FjAs="; + # src is patched up front before Cargo vendoring because patchPhase happens after it + src = applyPatches { + src = fetchFromGitHub { + owner = "tectonic-typesetting"; + repo = "tectonic"; + rev = "tectonic@${version}"; + sha256 = "sha256-xZHYiaQ8ASUwu0ieHIXcjRaH06SQoB6OR1y7Ok+FjAs="; + }; + patches = [ + # fix build with rust 1.80 + (fetchpatch2 { + url = "https://github.com/tectonic-typesetting/tectonic/commit/6b49ca8db40aaca29cb375ce75add3e575558375.patch"; + hash = "sha256-i1L3XaSuBbsmgOSXIWVqr6EHlHGs8A+6v06kJ3C50sk="; + }) + ]; }; - cargoHash = "sha256-niMgb4zsTWHw5yaa4kJOZzpOzO5gMG4k3cTHwSV+wmY="; + cargoHash = "sha256-Zn+xU6NJOY+jDYrSGsbYGAVqprQ6teEdNvlTNDXuzKs="; nativeBuildInputs = [ pkg-config ];