lol

python3Packages.python-poppler: init at 0.4.1

+73
+58
pkgs/development/python-modules/python-poppler/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchPypi, 5 + pythonOlder, 6 + pytestCheckHook, 7 + setuptools, 8 + meson-python, 9 + ninja, 10 + meson, 11 + poppler, 12 + pkg-config, 13 + pybind11, 14 + }: 15 + 16 + buildPythonPackage rec { 17 + pname = "python-poppler"; 18 + version = "0.4.1"; 19 + pyproject = true; 20 + 21 + disabled = pythonOlder "3.6"; 22 + 23 + src = fetchPypi { 24 + inherit version; 25 + pname = "python_poppler"; 26 + hash = "sha256-5spcI+wCNQvyzvhaa/nxsmF5ZDbbR4F2+dJPsU7uzGo="; 27 + }; 28 + 29 + patches = [ 30 + # Prevent Meson from downloading pybind11, use system version instead 31 + ./use_system_pybind11.patch 32 + ]; 33 + 34 + build-system = [ meson-python ]; 35 + 36 + buildInputs = [ pybind11 ]; 37 + 38 + nativeBuildInputs = [ 39 + ninja 40 + pkg-config 41 + ]; 42 + 43 + propagatedBuildInputs = [ poppler ]; 44 + 45 + nativeCheckInputs = [ pytestCheckHook ]; 46 + 47 + pythonImportCheck = [ "poppler" ]; 48 + 49 + meta = { 50 + description = "Python binding to poppler-cpp"; 51 + homepage = "https://github.com/cbrunet/python-poppler"; 52 + changelog = "https://cbrunet.net/python-poppler/changelog.html"; 53 + # Contradictory license definition 54 + # https://github.com/cbrunet/python-poppler/issues/90 55 + license = lib.licenses.gpl2Plus; 56 + maintainers = [ lib.maintainers.onny ]; 57 + }; 58 + }
+13
pkgs/development/python-modules/python-poppler/use_system_pybind11.patch
··· 1 + diff --git a/meson.build b/meson.build 2 + index c1ac57a..1d1ad1f 100644 3 + --- a/meson.build 4 + +++ b/meson.build 5 + @@ -13,7 +13,6 @@ poppler_dep = dependency('poppler-cpp', version: '>=0.26.0') 6 + python_mod = import('python') 7 + python3 = python_mod.find_installation('python3', pure: false) 8 + 9 + -pybind11_proj = subproject('pybind11') 10 + -pybind11_dep = pybind11_proj.get_variable('pybind11_dep') 11 + +pybind11_dep = dependency('pybind11') 12 + 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 + python-poppler = callPackage ../development/python-modules/python-poppler { }; 10478 + 10477 10479 python-pptx = callPackage ../development/python-modules/python-pptx { }; 10478 10480 10479 10481 python-songpal = callPackage ../development/python-modules/python-songpal { };