nixpkgs/pkgs/applications/editors/apostrophe/default.nix
Jan Tojnar eb04659fc2 treewide: wrapGAppsHook → wrapGAppsHook3
This was achieved using the following command:

    sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')

And then manually reverted the following changes:

- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
2024-04-27 02:23:22 +02:00

60 lines
2.0 KiB
Nix

{ lib, stdenv, fetchFromGitLab, meson, ninja
, wrapGAppsHook3, pkg-config, desktop-file-utils
, appstream-glib, pythonPackages, glib, gobject-introspection
, gtk3, webkitgtk, glib-networking, gnome, gspell, texliveMedium
, shared-mime-info, libhandy, fira, sassc
}:
let
pythonEnv = pythonPackages.python.withPackages(p: with p; [
regex setuptools levenshtein pyenchant
pygobject3 pycairo pypandoc chardet
]);
in stdenv.mkDerivation rec {
pname = "apostrophe";
version = "2.6.3";
src = fetchFromGitLab {
owner = "World";
repo = pname;
domain = "gitlab.gnome.org";
rev = "v${version}";
sha256 = "sha256-RBrrG1TO810LidIelYGNaK7PjDq84D0cA8VcMojAW3M=";
};
nativeBuildInputs = [ meson ninja pkg-config desktop-file-utils
appstream-glib wrapGAppsHook3 sassc gobject-introspection ];
buildInputs = [ glib pythonEnv gtk3
gnome.adwaita-icon-theme webkitgtk gspell texliveMedium
glib-networking libhandy ];
postPatch = ''
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")'
patchShebangs --build build-aux/meson_post_install.py
'';
preFixup = ''
gappsWrapperArgs+=(
--prefix PYTHONPATH : "$out/lib/python${pythonEnv.pythonVersion}/site-packages/"
--prefix PATH : "${texliveMedium}/bin"
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
)
'';
meta = with lib; {
homepage = "https://gitlab.gnome.org/World/apostrophe";
description = "A distraction free Markdown editor for GNU/Linux";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = [ maintainers.sternenseemann ];
mainProgram = "apostrophe";
};
}