2021-09-23 22:15:04 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, meson, ninja
|
2021-01-19 06:50:56 +00:00
|
|
|
, wrapGAppsHook, pkg-config, desktop-file-utils
|
2019-12-12 22:11:25 +00:00
|
|
|
, appstream-glib, pythonPackages, glib, gobject-introspection
|
2023-11-04 20:02:27 +00:00
|
|
|
, gtk3, webkitgtk, glib-networking, gnome, gspell, texliveMedium
|
2021-09-23 22:15:04 +00:00
|
|
|
, shared-mime-info, libhandy, fira, sassc
|
2021-03-02 12:03:35 +00:00
|
|
|
}:
|
2019-12-12 22:11:25 +00:00
|
|
|
|
|
|
|
let
|
2021-03-02 12:03:35 +00:00
|
|
|
pythonEnv = pythonPackages.python.withPackages(p: with p; [
|
2023-01-09 14:07:03 +00:00
|
|
|
regex setuptools levenshtein pyenchant
|
2021-03-02 12:03:35 +00:00
|
|
|
pygobject3 pycairo pypandoc chardet
|
|
|
|
]);
|
2019-12-12 22:11:25 +00:00
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2020-03-27 15:12:17 +00:00
|
|
|
pname = "apostrophe";
|
2022-05-25 02:40:15 +00:00
|
|
|
version = "2.6.3";
|
2019-12-12 22:11:25 +00:00
|
|
|
|
2020-03-27 15:12:17 +00:00
|
|
|
src = fetchFromGitLab {
|
2021-09-23 22:15:04 +00:00
|
|
|
owner = "World";
|
2019-12-12 22:11:25 +00:00
|
|
|
repo = pname;
|
2020-03-27 15:12:17 +00:00
|
|
|
domain = "gitlab.gnome.org";
|
2020-04-21 10:18:59 +00:00
|
|
|
rev = "v${version}";
|
2022-05-25 02:40:15 +00:00
|
|
|
sha256 = "sha256-RBrrG1TO810LidIelYGNaK7PjDq84D0cA8VcMojAW3M=";
|
2019-12-12 22:11:25 +00:00
|
|
|
};
|
|
|
|
|
2021-09-23 22:15:04 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config desktop-file-utils
|
2023-06-22 11:49:31 +00:00
|
|
|
appstream-glib wrapGAppsHook sassc gobject-introspection ];
|
2019-12-12 22:11:25 +00:00
|
|
|
|
2023-06-22 11:49:31 +00:00
|
|
|
buildInputs = [ glib pythonEnv gtk3
|
2023-11-04 20:02:27 +00:00
|
|
|
gnome.adwaita-icon-theme webkitgtk gspell texliveMedium
|
2021-03-02 12:03:35 +00:00
|
|
|
glib-networking libhandy ];
|
2019-12-12 22:11:25 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2021-07-08 13:59:09 +00:00
|
|
|
substituteInPlace data/media/css/web/base.css \
|
|
|
|
--replace 'url("/app/share/fonts/FiraSans-Regular.ttf") format("ttf")' \
|
|
|
|
'url("${fira}/share/fonts/opentype/FiraSans-Regular.otf") format("otf")' \
|
|
|
|
--replace 'url("/app/share/fonts/FiraMono-Regular.ttf") format("ttf")' \
|
|
|
|
'url("${fira}/share/fonts/opentype/FiraMono-Regular.otf") format("otf")'
|
|
|
|
|
2019-12-12 22:11:25 +00:00
|
|
|
patchShebangs --build build-aux/meson_post_install.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PYTHONPATH : "$out/lib/python${pythonEnv.pythonVersion}/site-packages/"
|
2023-11-04 20:02:27 +00:00
|
|
|
--prefix PATH : "${texliveMedium}/bin"
|
2020-01-24 00:52:37 +00:00
|
|
|
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
2019-12-12 22:11:25 +00:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-09-23 22:15:04 +00:00
|
|
|
homepage = "https://gitlab.gnome.org/World/apostrophe";
|
2019-12-12 22:11:25 +00:00
|
|
|
description = "A distraction free Markdown editor for GNU/Linux";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.sternenseemann ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "apostrophe";
|
2019-12-12 22:11:25 +00:00
|
|
|
};
|
|
|
|
}
|