From 39c8fd647f2976d022cf01fac2d64a2136e0ac8e Mon Sep 17 00:00:00 2001 From: aleksana Date: Sun, 3 Nov 2024 17:55:30 +0800 Subject: [PATCH] apostrophe: 3.1 -> 3.2 Changelog: https://gitlab.gnome.org/World/apostrophe/-/releases/v3.2 --- pkgs/by-name/ap/apostrophe/package.nix | 40 ++++++++++---------------- 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/pkgs/by-name/ap/apostrophe/package.nix b/pkgs/by-name/ap/apostrophe/package.nix index 3f39ac124453..bf7e31ded51c 100644 --- a/pkgs/by-name/ap/apostrophe/package.nix +++ b/pkgs/by-name/ap/apostrophe/package.nix @@ -19,36 +19,24 @@ }: let - version = "3.1"; + version = "3.2"; src = fetchFromGitLab { owner = "World"; repo = "apostrophe"; domain = "gitlab.gnome.org"; - rev = "v${version}"; - hash = "sha256-rXaz0EtLuKOBJLF81K/4qoTZtG6B8Wn+KwSiqYvxAVc="; + rev = "refs/tags/v${version}"; + hash = "sha256-NPpBu6Wmd8z99vzVQ394CyHRV2RQBtkbuqcaFqKqlkQ="; }; - # Patches are required by upstream. Without the patches - # typing `- aaa`, newline, `- bbb` the program crashes - gtksourceview5-patched = gtksourceview5.overrideAttrs (prev: { - patches = (prev.patches or [ ]) ++ [ "${src}/build-aux/flatpak/sourceview_text_commits.patch" ]; - }); - - libspelling-patched = - (libspelling.override { gtksourceview5 = gtksourceview5-patched; }).overrideAttrs - (prev: { - patches = (prev.patches or [ ]) ++ [ "${src}/build-aux/flatpak/libspelling_text_commits.patch" ]; - }); - reveal-js = fetchFromGitHub { owner = "hakimel"; repo = "reveal.js"; # keep in sync with upstream shipped version # in build-aux/flatpak/org.gnome.gitlab.somas.Apostrophe.json - rev = "4.6.0"; - hash = "sha256-a+J+GasFmRvu5cJ1GLXscoJ+owzFXsLhCbeDbYChkyQ="; + rev = "refs/tags/5.1.0"; + hash = "sha256-L6KVBw20K67lHT07Ws+ZC2DwdURahqyuyjAaK0kTgN0="; }; in python3Packages.buildPythonApplication { @@ -67,13 +55,14 @@ python3Packages.buildPythonApplication { + '' substituteInPlace apostrophe/preview_converter.py \ --replace-fail "--mathjax" "--mathjax=file://${nodePackages.mathjax}/lib/node_modules/mathjax/es5/tex-chtml-full.js" - '' - # Should be done in postInstall, but meson checks this eagerly before build - + '' - install -d $out/share/apostrophe/libs - cp -r ${reveal-js} $out/share/apostrophe/libs/reveal.js ''; + # Should be done in postInstall, but meson checks this eagerly before build + preConfigure = '' + install -d $out/share/apostrophe/libs + cp -r ${reveal-js} $out/share/apostrophe/libs/reveal.js + ''; + nativeBuildInputs = [ meson ninja @@ -85,8 +74,8 @@ python3Packages.buildPythonApplication { buildInputs = [ libadwaita - gtksourceview5-patched - libspelling-patched + gtksourceview5 + libspelling webkitgtk_6_0 ]; @@ -94,6 +83,7 @@ python3Packages.buildPythonApplication { pygobject3 pypandoc chardet + levenshtein ]; dontWrapGApps = true; @@ -107,7 +97,7 @@ python3Packages.buildPythonApplication { ''; passthru = { - inherit gtksourceview5-patched libspelling-patched reveal-js; + inherit reveal-js; }; meta = {