tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
python3Packages.python-poppler: init at 0.4.1
Jonas Heinrich
1 year ago
aa8854e1
bc685706
+73
3 changed files
expand all
collapse all
unified
split
pkgs
development
python-modules
python-poppler
default.nix
use_system_pybind11.patch
top-level
python-packages.nix
+58
pkgs/development/python-modules/python-poppler/default.nix
···
1
1
+
{
2
2
+
lib,
3
3
+
buildPythonPackage,
4
4
+
fetchPypi,
5
5
+
pythonOlder,
6
6
+
pytestCheckHook,
7
7
+
setuptools,
8
8
+
meson-python,
9
9
+
ninja,
10
10
+
meson,
11
11
+
poppler,
12
12
+
pkg-config,
13
13
+
pybind11,
14
14
+
}:
15
15
+
16
16
+
buildPythonPackage rec {
17
17
+
pname = "python-poppler";
18
18
+
version = "0.4.1";
19
19
+
pyproject = true;
20
20
+
21
21
+
disabled = pythonOlder "3.6";
22
22
+
23
23
+
src = fetchPypi {
24
24
+
inherit version;
25
25
+
pname = "python_poppler";
26
26
+
hash = "sha256-5spcI+wCNQvyzvhaa/nxsmF5ZDbbR4F2+dJPsU7uzGo=";
27
27
+
};
28
28
+
29
29
+
patches = [
30
30
+
# Prevent Meson from downloading pybind11, use system version instead
31
31
+
./use_system_pybind11.patch
32
32
+
];
33
33
+
34
34
+
build-system = [ meson-python ];
35
35
+
36
36
+
buildInputs = [ pybind11 ];
37
37
+
38
38
+
nativeBuildInputs = [
39
39
+
ninja
40
40
+
pkg-config
41
41
+
];
42
42
+
43
43
+
propagatedBuildInputs = [ poppler ];
44
44
+
45
45
+
nativeCheckInputs = [ pytestCheckHook ];
46
46
+
47
47
+
pythonImportCheck = [ "poppler" ];
48
48
+
49
49
+
meta = {
50
50
+
description = "Python binding to poppler-cpp";
51
51
+
homepage = "https://github.com/cbrunet/python-poppler";
52
52
+
changelog = "https://cbrunet.net/python-poppler/changelog.html";
53
53
+
# Contradictory license definition
54
54
+
# https://github.com/cbrunet/python-poppler/issues/90
55
55
+
license = lib.licenses.gpl2Plus;
56
56
+
maintainers = [ lib.maintainers.onny ];
57
57
+
};
58
58
+
}
+13
pkgs/development/python-modules/python-poppler/use_system_pybind11.patch
···
1
1
+
diff --git a/meson.build b/meson.build
2
2
+
index c1ac57a..1d1ad1f 100644
3
3
+
--- a/meson.build
4
4
+
+++ b/meson.build
5
5
+
@@ -13,7 +13,6 @@ poppler_dep = dependency('poppler-cpp', version: '>=0.26.0')
6
6
+
python_mod = import('python')
7
7
+
python3 = python_mod.find_installation('python3', pure: false)
8
8
+
9
9
+
-pybind11_proj = subproject('pybind11')
10
10
+
-pybind11_dep = pybind11_proj.get_variable('pybind11_dep')
11
11
+
+pybind11_dep = dependency('pybind11')
12
12
+
13
13
+
subdir('src')
+2
pkgs/top-level/python-packages.nix
···
10474
10474
10475
10475
python-owasp-zap-v2-4 = callPackage ../development/python-modules/python-owasp-zap-v2-4 { };
10476
10476
10477
10477
+
python-poppler = callPackage ../development/python-modules/python-poppler { };
10478
10478
+
10477
10479
python-pptx = callPackage ../development/python-modules/python-pptx { };
10478
10480
10479
10481
python-songpal = callPackage ../development/python-modules/python-songpal { };