nixpkgs/pkgs/by-name/gn/gnome-frog/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

100 lines
2.0 KiB
Nix

{
lib,
fetchFromGitHub,
python3Packages,
wrapGAppsHook4,
meson,
ninja,
pkg-config,
appstream-glib,
desktop-file-utils,
glib,
gobject-introspection,
blueprint-compiler,
libxml2,
libnotify,
libadwaita,
libportal,
gettext,
librsvg,
tesseract5,
zbar,
gst_all_1,
}:
python3Packages.buildPythonApplication rec {
pname = "gnome-frog";
version = "1.5.2";
src = fetchFromGitHub {
owner = "TenderOwl";
repo = "Frog";
rev = "refs/tags/${version}";
sha256 = "sha256-Zu1xUGpjqpFiPQAAgaVYtnXI4jMtyywrJqn+38K5VHo=";
};
format = "other";
patches = [ ./update-compatible-with-non-flatpak-env.patch ];
postPatch = ''
chmod +x ./build-aux/meson/postinstall.py
patchShebangs ./build-aux/meson/postinstall.py
substituteInPlace ./build-aux/meson/postinstall.py \
--replace "gtk-update-icon-cache" "gtk4-update-icon-cache"
substituteInPlace ./frog/language_manager.py --subst-var out
'';
nativeBuildInputs = [
appstream-glib
desktop-file-utils
gettext
meson
ninja
pkg-config
glib
wrapGAppsHook4
gobject-introspection
blueprint-compiler
libxml2
];
buildInputs = [
librsvg
libnotify
libadwaita
libportal
zbar
tesseract5
gst_all_1.gstreamer
];
propagatedBuildInputs = with python3Packages; [
loguru
nanoid
posthog
pygobject3
python-dateutil
pillow
pytesseract
pyzbar
gtts
];
# This is to prevent double-wrapping the package. We'll let
# Python do it by adding certain arguments inside of the
# wrapper instead.
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = with lib; {
homepage = "https://getfrog.app/";
description = "Intuitive text extraction tool (OCR) for GNOME desktop";
license = licenses.mit;
mainProgram = "frog";
maintainers = with maintainers; [ foo-dogsquared ];
platforms = platforms.linux;
};
}