nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5}:
6stdenv.mkDerivation (finalAttrs: {
7 pname = "mathjax";
8 version = "4.1.0";
9
10 src = fetchFromGitHub {
11 owner = "mathjax";
12 repo = "mathjax";
13 tag = finalAttrs.version;
14 hash = "sha256-ri8j/S0mS0I12y3o8NCCMcR3FHeuaNKg/+zEkNB2uXU=";
15 };
16
17 installPhase = ''
18 runHook preInstall
19
20 mkdir -p $out/lib/node_modules/mathjax
21 mv * $out/lib/node_modules/mathjax
22 # This is a MathJax v3 compat shim, notably still needed for sagemath
23 ln -s $out/lib/node_modules/mathjax $out/lib/node_modules/mathjax/es5
24
25 runHook postInstall
26 '';
27
28 meta = {
29 changelog = "https://github.com/mathjax/MathJax/releases/tag/${finalAttrs.version}";
30 description = "Beautiful and accessible math in all browsers";
31 homepage = "https://www.mathjax.org/";
32 license = lib.licenses.asl20;
33 maintainers = with lib.maintainers; [ pyrox0 ];
34 };
35})