2020-03-27 16:12:17 +01:00
|
|
|
{ stdenv, fetchFromGitLab, meson, ninja, cmake
|
2019-12-12 23:11:25 +01:00
|
|
|
, wrapGAppsHook, pkgconfig, desktop-file-utils
|
|
|
|
, appstream-glib, pythonPackages, glib, gobject-introspection
|
|
|
|
, gtk3, webkitgtk, glib-networking, gnome3, gspell, texlive
|
2020-01-24 01:52:37 +01:00
|
|
|
, shared-mime-info, haskellPackages}:
|
2019-12-12 23:11:25 +01:00
|
|
|
|
|
|
|
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 {
|
2020-03-27 16:12:17 +01:00
|
|
|
pname = "apostrophe";
|
2020-05-14 10:15:11 +02:00
|
|
|
version = "2.2.0.3";
|
2019-12-12 23:11:25 +01:00
|
|
|
|
2020-03-27 16:12:17 +01:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "somas";
|
2019-12-12 23:11:25 +01:00
|
|
|
repo = pname;
|
2020-03-27 16:12:17 +01:00
|
|
|
domain = "gitlab.gnome.org";
|
2020-04-21 12:18:59 +02:00
|
|
|
rev = "v${version}";
|
2020-05-14 10:15:11 +02:00
|
|
|
sha256 = "06bl1hc69ixk2vcb2ig74mwid14sl5zq6rfna7lx9na6j3l04879";
|
2019-12-12 23:11:25 +01: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
|
|
|
|
|
2020-03-27 16:12:17 +01:00
|
|
|
substituteInPlace ${pname}/config.py --replace "/usr/share/${pname}" "$out/share/${pname}"
|
2019-12-12 23:11:25 +01:00
|
|
|
|
|
|
|
# get rid of unused distributed dependencies
|
2020-03-27 16:12:17 +01:00
|
|
|
rm -r ${pname}/pylocales
|
2019-12-12 23:11:25 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PYTHONPATH : "$out/lib/python${pythonEnv.pythonVersion}/site-packages/"
|
|
|
|
--prefix PATH : "${texliveDist}/bin"
|
|
|
|
--prefix PATH : "${haskellPackages.pandoc-citeproc}/bin"
|
2020-01-24 01:52:37 +01:00
|
|
|
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
2019-12-12 23:11:25 +01:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-03-27 16:12:17 +01:00
|
|
|
homepage = "https://gitlab.gnome.org/somas/apostrophe";
|
2019-12-12 23:11:25 +01:00
|
|
|
description = "A distraction free Markdown editor for GNU/Linux";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.sternenseemann ];
|
|
|
|
};
|
|
|
|
}
|