First attempt creating a local nix expression for xreader

This is my first attempt to navigate the build process on NixOS. I get the following error

   ERROR: Problem encountered: "mathjax-directory" is undefined and could not be autodetected
after running

nix-build xreader.nix with the following contents:

with import <nixpkgs> {};

stdenv.mkDerivation rec {
  name = "xreader";
  version = "2.6.2";

  src = fetchFromGitHub {
    owner = "linuxmint";
    repo = "xreader";
    rev = version;
    sha256 = "07f44sxjcqxzcw3vv51swfrkjvngh075hfmwyq7lwn7dr4llbiss";
    fetchSubmodules = true;
  };

  #nativeBuildInputs = [ meson pkg-config cairo cmake gtk3 cinnamon.xapps ];
  buildInputs = [ meson pkg-config cairo cmake gtk3 cinnamon.xapps libxml2 libsecret libspectre poppler libgxps webkitgtk intltool nodePackages_latest.mathjax ];

  meta = with stdenv.lib; {
    description = "A generic document reader from the Linux Mint Xapps";
    longDescription = ''
      xreader is a program that can read pdf, txt, epub, etc.
    '';
    homepage = "https://linuxmint.org";
    license = licenses.gpl3Plus;
    maintainers = [ maintainers.boyd9461 ];
    platforms = platforms.linux;
 };

}

Error trace:

these derivations will be built:
  /nix/store/4n2j4v1vn9grrsy6hpggncn1143fv0d2-xreader.drv
building '/nix/store/4n2j4v1vn9grrsy6hpggncn1143fv0d2-xreader.drv'...
unpacking sources
unpacking source archive /nix/store/1di04i9j1p7bzcrzdbyi4ay710xmkhvn-source
source root is source
patching sources
configuring
meson flags: --buildtype=plain         --libdir=/nix/store/5plf4rjdphbnx3hi7qv9qjr7slci78hx-xreader/lib --libexecdir=/nix/store/5plf4rjdphbnx3hi7qv9qjr7slci78hx-xreader/libexec         --bindir=/nix/store/5plf4rjdphbnx3hi7qv9qjr7slci78hx-xreader/bin --sbindir=/nix/store/5plf4rjdphbnx3hi7qv9qjr7slci78hx-xreader/sbin         --includedir=/nix/store/5plf4rjdphbnx3hi7qv9qjr7slci78hx-xreader/include         --mandir=/nix/store/5plf4rjdphbnx3hi7qv9qjr7slci78hx-xreader/share/man --infodir=/nix/store/5plf4rjdphbnx3hi7qv9qjr7slci78hx-xreader/share/info         --localedir=/nix/store/5plf4rjdphbnx3hi7qv9qjr7slci78hx-xreader/share/locale         -Dauto_features=enabled         -Dwrap_mode=nodownload         --prefix=/nix/store/5plf4rjdphbnx3hi7qv9qjr7slci78hx-xreader
The Meson build system
Version: 0.55.1
Source dir: /build/source
Build dir: /build/source/build
Build type: native build
Project name: xreader
Project version: 2.6.2
Using 'CC' from environment with value: 'gcc'
Using 'AR' from environment with value: 'ar'
Using 'CXX' from environment with value: 'g++'
Using 'CC' from environment with value: 'gcc'
C compiler for the host machine: gcc (gcc 9.3.0 "gcc (GCC) 9.3.0")
C linker for the host machine: gcc ld.bfd 2.31.1
Using 'AR' from environment with value: 'ar'
Using 'CXX' from environment with value: 'g++'
C++ compiler for the host machine: g++ (gcc 9.3.0 "g++ (GCC) 9.3.0")
C++ linker for the host machine: g++ ld.bfd 2.31.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /nix/store/131vdr1hvmmk8icrdfppa4ksbg3jdjxr-pkg-config-wrapper-0.29.2/bin/pkg-config (0.29.2)
Run-time dependency cairo found: YES 1.16.0
Run-time dependency gail-3.0 found: YES 3.24.21
Run-time dependency gio-2.0 found: YES 2.64.5
Run-time dependency glib-2.0 found: YES 2.64.5
Run-time dependency gmodule-2.0 found: YES 2.64.5
Run-time dependency gtk+-3.0 found: YES 3.24.21
Run-time dependency ice found: YES 1.0.10
Run-time dependency sm found: YES 1.2.3
Run-time dependency x11 found: YES 1.6.12
Run-time dependency xapp found: YES 1.8.9
Run-time dependency libxml-2.0 found: YES 2.9.10
Run-time dependency zlib found: YES 1.2.11
Run-time dependency libsecret-1 found: YES 0.20.3
Run-time dependency gtk+-unix-print-3.0 found: YES 3.24.21
Run-time dependency poppler-glib found: YES 20.08.0
Run-time dependency libtiff-4 found: YES 4.1.0
Run-time dependency libgxps found: YES 0.3.1
Run-time dependency libspectre found: YES 0.2.7
Run-time dependency webkit2gtk-4.0 found: YES 2.30.3
Library m found: YES
Program intltool-merge found: YES

meson.build:111:4: ERROR: Problem encountered: "mathjax-directory" is undefined and could not be autodetected

A full log can be found at /build/source/build/meson-logs/meson-log.txt
builder for '/nix/store/4n2j4v1vn9grrsy6hpggncn1143fv0d2-xreader.drv' failed with exit code 1
error: build of '/nix/store/4n2j4v1vn9grrsy6hpggncn1143fv0d2-xreader.drv' failed