14 gobject-introspection,
25 src = fetchFromGitLab {
28 domain = "gitlab.gnome.org";
29 rev = "refs/tags/v${version}";
30 hash = "sha256-NPpBu6Wmd8z99vzVQ394CyHRV2RQBtkbuqcaFqKqlkQ=";
33 reveal-js = fetchFromGitHub {
37 # keep in sync with upstream shipped version
38 # in build-aux/flatpak/org.gnome.gitlab.somas.Apostrophe.json
39 rev = "refs/tags/5.1.0";
40 hash = "sha256-L6KVBw20K67lHT07Ws+ZC2DwdURahqyuyjAaK0kTgN0=";
43 python3Packages.buildPythonApplication {
50 substituteInPlace build-aux/meson_post_install.py \
51 --replace-fail 'gtk-update-icon-cache' 'gtk4-update-icon-cache'
53 patchShebangs --build build-aux/meson_post_install.py
55 # Use mathjax from nixpkgs to avoid loading from CDN
57 substituteInPlace apostrophe/preview_converter.py \
58 --replace-fail "--mathjax" "--mathjax=file://${nodePackages.mathjax}/lib/node_modules/mathjax/es5/tex-chtml-full.js"
61 # Should be done in postInstall, but meson checks this eagerly before build
63 install -d $out/share/apostrophe/libs
64 cp -r ${reveal-js} $out/share/apostrophe/libs/reveal.js
83 propagatedBuildInputs = with python3Packages; [
94 ''${gappsWrapperArgs[@]}
95 --prefix PATH : "${texliveMedium}/bin"
96 --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
102 updateScript = nix-update-script { };
106 homepage = "https://gitlab.gnome.org/World/apostrophe";
107 description = "Distraction free Markdown editor for GNU/Linux";
108 license = lib.licenses.gpl3Plus;
109 platforms = lib.platforms.linux;
111 with lib.maintainers;
115 ++ lib.teams.gnome-circle.members;
116 mainProgram = "apostrophe";