mathjax: migrate from nodePackages

This commit is contained in:
dish
2025-11-29 14:37:53 -05:00
parent 92d5e3290c
commit 9cc4f7a7c9
4 changed files with 36 additions and 19 deletions
+35
View File
@@ -0,0 +1,35 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mathjax";
version = "4.0.0";
src = fetchFromGitHub {
owner = "mathjax";
repo = "mathjax";
tag = finalAttrs.version;
hash = "sha256-36lTjx4zuFeT1+QFemiQcCZfAjyh7vFPpYeRhO2mzGI=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/lib/node_modules/mathjax
mv * $out/lib/node_modules/mathjax
# This is a MathJax v3 compat shim, notably still needed for sagemath
ln -s $out/lib/node_modules/mathjax $out/lib/node_modules/mathjax/es5
runHook postInstall
'';
meta = {
changelog = "https://github.com/mathjax/MathJax/releases/tag/${finalAttrs.version}";
description = "Beautiful and accessible math in all browsers";
homepage = "https://www.mathjax.org/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ pyrox0 ];
};
})
@@ -241,6 +241,7 @@ mapAliases {
inherit (pkgs) markdown-link-check; # added 2024-06-28
markdownlint-cli = pkgs.markdownlint-cli; # added 2023-07-29
inherit (pkgs) markdownlint-cli2; # added 2023-08-22
inherit (pkgs) mathjax; # Added 2025-11-28
inherit (pkgs) mathjax-node-cli; # added 2023-11-02
mastodon-bot = throw "'mastodon-bot' has been removed because it was archived by upstream in 2021."; # Added 2025-11-07
mdctl-cli = self."@medable/mdctl-cli"; # added 2023-08-21
@@ -19,7 +19,6 @@
, "js-yaml"
, "jsdoc"
, "lcov-result-merger"
, "mathjax"
, "node2nix"
, "postcss"
, "prebuild-install"
-18
View File
@@ -21942,24 +21942,6 @@ in
bypassCache = true;
reconstructLock = true;
};
mathjax = nodeEnv.buildNodePackage {
name = "mathjax";
packageName = "mathjax";
version = "3.2.2";
src = fetchurl {
url = "https://registry.npmjs.org/mathjax/-/mathjax-3.2.2.tgz";
sha512 = "Bt+SSVU8eBG27zChVewOicYs7Xsdt40qm4+UpHyX7k0/O9NliPc+x77k1/FEsPsjKPZGJvtRZM1vO+geW0OhGw==";
};
buildInputs = globalBuildInputs;
meta = {
description = "Beautiful and accessible math in all browsers. MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all browsers. This package includes the packaged components (install mathjax-full to get the source ";
homepage = "https://github.com/mathjax/MathJax#readme";
license = "Apache-2.0";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
node2nix = nodeEnv.buildNodePackage {
name = "node2nix";
packageName = "node2nix";