texpresso: init at 0-unstable-2024-03-24 (#299168)

* texpresso: init at 0-unstable-2024-03-24

* Update pkgs/tools/typesetting/tex/texpresso/default.nix

Co-authored-by: Alex Rice <alexrice999@hotmail.co.uk>

---------

Co-authored-by: Alex Rice <alexrice999@hotmail.co.uk>

authored by Nick Hu Alex Rice and committed by GitHub bf8d06ac a1703beb

+97
+74
pkgs/tools/typesetting/tex/texpresso/default.nix
··· 1 + { stdenv 2 + , lib 3 + , fetchFromGitHub 4 + , makeWrapper 5 + , writeScript 6 + , mupdf 7 + , SDL2 8 + , re2c 9 + , freetype 10 + , jbig2dec 11 + , harfbuzz 12 + , openjpeg 13 + , gumbo 14 + , libjpeg 15 + , texpresso-tectonic 16 + }: 17 + 18 + stdenv.mkDerivation rec { 19 + pname = "texpresso"; 20 + version = "0-unstable-2024-03-24"; 21 + 22 + nativeBuildInputs = [ 23 + makeWrapper 24 + mupdf 25 + SDL2 26 + re2c 27 + freetype 28 + jbig2dec 29 + harfbuzz 30 + openjpeg 31 + gumbo 32 + libjpeg 33 + ]; 34 + 35 + src = fetchFromGitHub { 36 + owner = "let-def"; 37 + repo = "texpresso"; 38 + rev = "08d4ae8632ef0da349595310d87ac01e70f2c6ae"; 39 + hash = "sha256-a0yBVtLfmE0oTl599FXp7A10JoiKusofLSeXigx4GvA="; 40 + }; 41 + 42 + buildFlags = [ "texpresso" ]; 43 + 44 + installPhase = '' 45 + runHook preInstall 46 + install -Dm0755 -t "$out/bin/" "build/${pname}" 47 + runHook postInstall 48 + ''; 49 + 50 + # needs to have texpresso-tonic on its path 51 + postInstall = '' 52 + wrapProgram $out/bin/texpresso \ 53 + --prefix PATH : ${lib.makeBinPath [ texpresso-tectonic ]} 54 + ''; 55 + 56 + passthru = { 57 + tectonic = texpresso-tectonic; 58 + updateScript = writeScript "update-texpresso" '' 59 + #!/usr/bin/env nix-shell 60 + #!nix-shell -i bash -p curl jq nix-update 61 + 62 + tectonic_version="$(curl -s "https://api.github.com/repos/let-def/texpresso/contents/tectonic" | jq -r '.sha')" 63 + nix-update --version=branch texpresso 64 + nix-update --version=branch=$tectonic_version texpresso.tectonic 65 + ''; 66 + }; 67 + 68 + meta = { 69 + inherit (src.meta) homepage; 70 + description = "Live rendering and error reporting for LaTeX."; 71 + maintainers = with lib.maintainers; [ nickhu ]; 72 + license = lib.licenses.mit; 73 + }; 74 + }
+19
pkgs/tools/typesetting/tex/texpresso/tectonic.nix
··· 1 + { tectonic-unwrapped, fetchFromGitHub }: 2 + tectonic-unwrapped.override (old: { 3 + rustPlatform = old.rustPlatform // { 4 + buildRustPackage = args: old.rustPlatform.buildRustPackage (args // { 5 + pname = "texpresso-tonic"; 6 + src = fetchFromGitHub { 7 + owner = "let-def"; 8 + repo = "tectonic"; 9 + rev = "a6d47e45cd610b271a1428898c76722e26653667"; 10 + hash = "sha256-CDky1NdSQoXpTVDQ7sJWjcx3fdsBclO9Eun/70iClcI="; 11 + fetchSubmodules = true; 12 + }; 13 + cargoHash = "sha256-M4XYjBK2MN4bOrk2zTSyuixmAjZ0t6IYI/MlYWrmkIk="; 14 + # binary has a different name, bundled tests won't work 15 + doCheck = false; 16 + meta.mainProgram = "texpresso-tonic"; 17 + }); 18 + }; 19 + })
+4
pkgs/top-level/all-packages.nix
··· 24867 24867 24868 24868 tet = callPackage ../development/tools/misc/tet { }; 24869 24869 24870 + texpresso = callPackage ../tools/typesetting/tex/texpresso { 24871 + texpresso-tectonic = callPackage ../tools/typesetting/tex/texpresso/tectonic.nix { }; 24872 + }; 24873 + 24870 24874 text-engine = callPackage ../development/libraries/text-engine { }; 24871 24875 24872 24876 the-foundation = callPackage ../development/libraries/the-foundation { };