{ lib , python3Packages , gtk3 , cairo , gnome , librsvg , xvfb-run , dbus , libnotify , wrapGAppsHook , fetchFromGitLab , which , gettext , gobject-introspection , gdk-pixbuf , texlive , imagemagick , perlPackages , writeScript }: let documentation_deps = [ (texlive.combine { inherit (texlive) scheme-small wrapfig gensymb; }) xvfb-run imagemagick perlPackages.Po4a ]; inherit (import ./src.nix { inherit fetchFromGitLab; }) version src sample_documents; in python3Packages.buildPythonApplication rec { inherit src version; pname = "paperwork"; sample_docs = sample_documents // { # a trick for the update script name = "sample_documents"; src = sample_documents; }; sourceRoot = "${src.name}/paperwork-gtk"; # Patch out a few paths that assume that we're using the FHS: postPatch = '' substituteInPlace setup.py \ --replace python-Levenshtein Levenshtein chmod a+w -R .. patchShebangs ../tools export HOME=$(mktemp -d) cat - ../AUTHORS.py > src/paperwork_gtk/_version.py <