depot/third_party/nixpkgs/pkgs/development/python-modules/poppler-qt5/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

61 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
isPy3k,
fetchPypi,
sip,
qtbase,
qmake,
pyqt5,
pyqt-builder,
poppler,
pkg-config,
setuptools,
}:
buildPythonPackage rec {
pname = "python-poppler-qt5";
version = "21.3.0";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
hash = "sha256-tHfohB8OoOCf2rby8wXPON+XfZ4ULlaTo3RgXXXdb+A=";
};
buildInputs = [
qtbase.dev
poppler
pyqt-builder
];
nativeBuildInputs = [
pkg-config
qmake
sip
setuptools
];
propagatedBuildInputs = [ pyqt5.dev ];
format = "pyproject";
dontConfigure = true;
postPatch = ''
cat <<EOF >> pyproject.toml
[tool.sip.bindings.Poppler-Qt5]
include-dirs = ["${poppler.dev}/include/poppler"]
EOF
'';
# no tests, just bindings for `poppler_qt5`
doCheck = false;
pythonImportsCheck = [ "popplerqt5" ];
dontWrapQtApps = true;
meta = with lib; {
homepage = "https://github.com/frescobaldi/python-poppler-qt5";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ ];
};
}