2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, meson, ninja, cmake
|
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-04-12 18:23:04 +00:00
|
|
|
, shared-mime-info, libhandy
|
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-03-23 19:22:30 +00:00
|
|
|
version = "2.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "somas";
|
|
|
|
repo = pname;
|
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
rev = "v${version}";
|
2021-03-23 19:22:30 +00:00
|
|
|
sha256 = "1qzy3zhi18wf42m034s8kcmx9gl05j620x3hf6rnycq2fvy7g4gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ meson ninja cmake pkg-config desktop-file-utils
|
2020-04-24 23:36:52 +00:00
|
|
|
appstream-glib wrapGAppsHook ];
|
|
|
|
|
|
|
|
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 = ''
|
|
|
|
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; {
|
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 ];
|
|
|
|
};
|
|
|
|
}
|