2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, meson, ninja, cmake
|
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
|
|
|
|
, gtk3, webkitgtk, glib-networking, gnome3, gspell, texlive
|
2021-03-02 12:03:35 +00:00
|
|
|
, shared-mime-info, haskellPackages, libhandy
|
|
|
|
}:
|
2019-12-12 22:11:25 +00:00
|
|
|
|
|
|
|
let
|
2021-03-02 12:03:35 +00:00
|
|
|
pythonEnv = pythonPackages.python.withPackages(p: with p; [
|
|
|
|
regex setuptools python-Levenshtein pyenchant
|
|
|
|
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";
|
2021-03-17 15:00:10 +00:00
|
|
|
version = "2.4";
|
2019-12-12 22:11:25 +00:00
|
|
|
|
2020-03-27 15:12:17 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "somas";
|
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}";
|
2021-03-17 15:00:10 +00:00
|
|
|
sha256 = "1qzy3zhi18wf42m034s8kcmx9gl05j620x3hf6rnycq2fvy7g4gz";
|
2019-12-12 22:11:25 +00:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ meson ninja cmake pkg-config desktop-file-utils
|
2019-12-12 22:11:25 +00:00
|
|
|
appstream-glib wrapGAppsHook ];
|
|
|
|
|
|
|
|
buildInputs = [ glib pythonEnv gobject-introspection gtk3
|
2021-03-02 12:04:52 +00:00
|
|
|
gnome3.adwaita-icon-theme webkitgtk gspell texlive
|
2021-03-02 12:03:35 +00:00
|
|
|
glib-networking libhandy ];
|
2019-12-12 22:11:25 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs --build build-aux/meson_post_install.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PYTHONPATH : "$out/lib/python${pythonEnv.pythonVersion}/site-packages/"
|
2021-03-02 12:04:52 +00:00
|
|
|
--prefix PATH : "${texlive}/bin"
|
2019-12-12 22:11:25 +00:00
|
|
|
--prefix PATH : "${haskellPackages.pandoc-citeproc}/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; {
|
2020-03-27 15:12:17 +00:00
|
|
|
homepage = "https://gitlab.gnome.org/somas/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 ];
|
|
|
|
};
|
|
|
|
}
|