2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, meson, ninja, cmake
|
2020-04-24 23:36:52 +00:00
|
|
|
, wrapGAppsHook, pkgconfig, desktop-file-utils
|
|
|
|
, appstream-glib, pythonPackages, glib, gobject-introspection
|
|
|
|
, gtk3, webkitgtk, glib-networking, gnome3, gspell, texlive
|
|
|
|
, shared-mime-info, haskellPackages}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pythonEnv = pythonPackages.python.withPackages(p: with p;
|
|
|
|
[ regex setuptools python-Levenshtein pyenchant pygobject3 pycairo pypandoc ]);
|
|
|
|
texliveDist = texlive.combined.scheme-medium;
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "apostrophe";
|
2020-05-15 21:57:56 +00:00
|
|
|
version = "2.2.0.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "somas";
|
|
|
|
repo = pname;
|
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
rev = "v${version}";
|
2020-05-15 21:57:56 +00:00
|
|
|
sha256 = "06bl1hc69ixk2vcb2ig74mwid14sl5zq6rfna7lx9na6j3l04879";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ meson ninja cmake pkgconfig desktop-file-utils
|
|
|
|
appstream-glib wrapGAppsHook ];
|
|
|
|
|
|
|
|
buildInputs = [ glib pythonEnv gobject-introspection gtk3
|
|
|
|
gnome3.adwaita-icon-theme webkitgtk gspell texliveDist
|
|
|
|
glib-networking ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs --build build-aux/meson_post_install.py
|
|
|
|
|
|
|
|
substituteInPlace ${pname}/config.py --replace "/usr/share/${pname}" "$out/share/${pname}"
|
|
|
|
|
|
|
|
# get rid of unused distributed dependencies
|
|
|
|
rm -r ${pname}/pylocales
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PYTHONPATH : "$out/lib/python${pythonEnv.pythonVersion}/site-packages/"
|
|
|
|
--prefix PATH : "${texliveDist}/bin"
|
|
|
|
--prefix PATH : "${haskellPackages.pandoc-citeproc}/bin"
|
|
|
|
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://gitlab.gnome.org/somas/apostrophe";
|
|
|
|
description = "A distraction free Markdown editor for GNU/Linux";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.sternenseemann ];
|
|
|
|
};
|
|
|
|
}
|