-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdefault.nix
More file actions
79 lines (66 loc) · 1.58 KB
/
default.nix
File metadata and controls
79 lines (66 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
python3Packages,
gtk4,
libadwaita,
pkg-config,
wrapGAppsHook4,
gobject-introspection,
poppler_utils,
ghostscript,
fribidi,
jbig2enc ? null,
}:
python3Packages.buildPythonApplication {
pname = "bigocrpdf";
version = "3.0.0";
src = ./.;
pyproject = true;
build-system = with python3Packages; [ setuptools wheel ];
dependencies = with python3Packages; [
pygobject3
pycairo
rapidocr
pikepdf
reportlab
opencv4
pillow
numpy
scipy
odfpy
];
nativeBuildInputs = [
pkg-config
wrapGAppsHook4
gobject-introspection
];
buildInputs = [
gtk4
libadwaita
poppler_utils
ghostscript
fribidi
] ++ (if jbig2enc != null then [ jbig2enc ] else []);
postInstall = ''
# Install desktop files
mkdir -p $out/share/applications
cp $src/usr/share/applications/*.desktop $out/share/applications/ || true
# Install icons
mkdir -p $out/share/icons
cp -r $src/usr/share/icons/* $out/share/icons/ || true
# Install service menus
mkdir -p $out/share/kio/servicemenus
cp $src/usr/share/kio/servicemenus/*.desktop $out/share/kio/servicemenus/ || true
# Install locale files
mkdir -p $out/share/locale
cp -r $src/usr/share/locale/* $out/share/locale/ || true
# Install bin wrappers
mkdir -p $out/bin
cp $src/usr/bin/* $out/bin/ || true
'';
meta = {
description = "OCR toolkit for Linux — searchable PDFs, image OCR, PDF editor";
homepage = "https://github.com/biglinux/bigocrpdf";
license = "GPL-3.0-or-later";
mainProgram = "bigocrpdf";
};
}