diff --git a/pkgs/by-name/ap/apostrophe/package.nix b/pkgs/by-name/ap/apostrophe/package.nix index a7b9ee513331..3f39ac124453 100644 --- a/pkgs/by-name/ap/apostrophe/package.nix +++ b/pkgs/by-name/ap/apostrophe/package.nix @@ -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