2021-09-26 12:46:18 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, meson, ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
, wrapGAppsHook, pkg-config, desktop-file-utils
|
2020-04-24 23:36:52 +00:00
|
|
|
, appstream-glib, pythonPackages, glib, gobject-introspection
|
2021-05-20 23:08:51 +00:00
|
|
|
, gtk3, webkitgtk, glib-networking, gnome, gspell, texlive
|
2021-09-26 12:46:18 +00:00
|
|
|
, shared-mime-info, libhandy, fira, sassc
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2021-03-09 03:18:52 +00:00
|
|
|
pythonEnv = pythonPackages.python.withPackages(p: with p; [
|
|
|
|
regex setuptools python-Levenshtein pyenchant
|
|
|
|
pygobject3 pycairo pypandoc chardet
|
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "apostrophe";
|
2021-09-26 12:46:18 +00:00
|
|
|
version = "2.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
2021-09-26 12:46:18 +00:00
|
|
|
owner = "World";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = pname;
|
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
rev = "v${version}";
|
2021-09-26 12:46:18 +00:00
|
|
|
sha256 = "06yfiflmj3ip7ppcz41nb3xpgb5ggw5h74w0v87yaqqkq7qh31lp";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config desktop-file-utils
|
|
|
|
appstream-glib wrapGAppsHook sassc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ glib pythonEnv gobject-introspection gtk3
|
2021-05-20 23:08:51 +00:00
|
|
|
gnome.adwaita-icon-theme webkitgtk gspell texlive
|
2021-03-09 03:18:52 +00:00
|
|
|
glib-networking libhandy ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2021-07-14 22:03:04 +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")'
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
patchShebangs --build build-aux/meson_post_install.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PYTHONPATH : "$out/lib/python${pythonEnv.pythonVersion}/site-packages/"
|
2021-03-09 03:18:52 +00:00
|
|
|
--prefix PATH : "${texlive}/bin"
|
2020-04-24 23:36:52 +00:00
|
|
|
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-09-26 12:46:18 +00:00
|
|
|
homepage = "https://gitlab.gnome.org/World/apostrophe";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A distraction free Markdown editor for GNU/Linux";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.sternenseemann ];
|
|
|
|
};
|
|
|
|
}
|