13 gobject-introspection,
23 src = fetchFromGitLab {
26 domain = "gitlab.gnome.org";
28 sha256 = "sha256-rXaz0EtLuKOBJLF81K/4qoTZtG6B8Wn+KwSiqYvxAVc=";
31 # Patches are required by upstream. Without the patches
32 # typing `- aaa`, newline, `- bbb` the program crashes
33 gtksourceview5-patched = gtksourceview5.overrideAttrs (prev: {
34 patches = (prev.patches or [ ]) ++ [ "${src}/build-aux/flatpak/sourceview_text_commits.patch" ];
38 (libspelling.override { gtksourceview5 = gtksourceview5-patched; }).overrideAttrs
40 patches = (prev.patches or [ ]) ++ [ "${src}/build-aux/flatpak/libspelling_text_commits.patch" ];
43 reveal-js = fetchFromGitHub {
47 # keep in sync with upstream shipped version
48 # in build-aux/flatpak/org.gnome.gitlab.somas.Apostrophe.json
50 hash = "sha256-a+J+GasFmRvu5cJ1GLXscoJ+owzFXsLhCbeDbYChkyQ=";
53 python3Packages.buildPythonApplication rec {
60 substituteInPlace build-aux/meson_post_install.py \
61 --replace-fail 'gtk-update-icon-cache' 'gtk4-update-icon-cache'
63 patchShebangs --build build-aux/meson_post_install.py
65 # Should be done in postInstall, but meson checks this eagerly before build
67 install -d $out/share/apostrophe/libs
68 cp -r ${reveal-js} $out/share/apostrophe/libs/reveal.js
82 gtksourceview5-patched
87 propagatedBuildInputs = with python3Packages; [
97 ''${gappsWrapperArgs[@]}
98 --prefix PATH : "${texliveMedium}/bin"
99 --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
104 inherit gtksourceview5-patched libspelling-patched reveal-js;
108 homepage = "https://gitlab.gnome.org/World/apostrophe";
109 description = "Distraction free Markdown editor for GNU/Linux";
110 license = lib.licenses.gpl3Plus;
111 platforms = lib.platforms.linux;
112 maintainers = with lib.maintainers; [
116 mainProgram = "apostrophe";