nixpkgs/pkgs/by-name/gi/gImageReader/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

72 lines
1.5 KiB
Nix

{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libuuid
, sane-backends, podofo, libjpeg, djvulibre, libxmlxx3, libzip, tesseract
, intltool, poppler, json-glib
, ninja
, python3
# Gtk deps
# upstream gImagereader supports Qt too
, gobject-introspection, wrapGAppsHook3
, gtkmm3, gtksourceview3, gtksourceviewmm, gtkspell3, gtkspellmm, cairomm
}:
let
variant = "gtk";
pythonEnv = python3.withPackages( ps: with ps;[ pygobject3 ] );
in
stdenv.mkDerivation rec {
pname = "gImageReader";
version = "3.4.2";
src = fetchFromGitHub {
owner= "manisandro";
repo = "gImageReader";
rev = "v${version}";
sha256 = "sha256-yBkVeufRRoSAc20/8mV39widBPloHFz12K7B4Y9xiWg=";
};
nativeBuildInputs = [
cmake ninja
intltool
pkg-config
pythonEnv
# Gtk specific
wrapGAppsHook3
gobject-introspection
];
buildInputs = [
libxmlxx3
libzip
libuuid
sane-backends
podofo
libjpeg
djvulibre
tesseract
poppler
# Gtk specific
gtkmm3
gtkspell3
gtkspellmm
gtksourceview3
gtksourceviewmm
cairomm
json-glib
];
# interface type can be where <type> is either gtk, qt5, qt4
cmakeFlags = [ "-DINTERFACE_TYPE=${variant}" ];
meta = with lib; {
description = "Simple Gtk/Qt front-end to tesseract-ocr";
mainProgram = "gimagereader-gtk";
homepage = "https://github.com/manisandro/gImageReader";
license = licenses.gpl3Plus;
maintainers = with maintainers; [teto];
platforms = platforms.linux;
};
}