Unverified Commit 079d64ef authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

apostrophe: fix latex rendering by providing local mathjax (#343902)

parents 9b9ca770 7cc2a137
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
  libspelling,
  fetchFromGitHub,
  python3Packages,
  nodePackages,
  meson,
  ninja,
  pkg-config,
@@ -50,7 +51,7 @@ let
    hash = "sha256-a+J+GasFmRvu5cJ1GLXscoJ+owzFXsLhCbeDbYChkyQ=";
  };
in
python3Packages.buildPythonApplication rec {
python3Packages.buildPythonApplication {
  inherit version src;
  pname = "apostrophe";
  pyproject = false;
@@ -62,6 +63,11 @@ python3Packages.buildPythonApplication rec {

      patchShebangs --build build-aux/meson_post_install.py
    ''
    # Use mathjax from nixpkgs to avoid loading from CDN
    + ''
      substituteInPlace apostrophe/preview_converter.py \
        --replace-fail "--mathjax" "--mathjax=file://${nodePackages.mathjax}/lib/node_modules/mathjax/es5/tex-chtml-full.js"
    ''
    # Should be done in postInstall, but meson checks this eagerly before build
    + ''
      install -d $out/share/apostrophe/libs