mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 09:04:16 +01:00
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
56 lines
1.2 KiB
Nix
56 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
pytestCheckHook,
|
|
meson-python,
|
|
ninja,
|
|
poppler,
|
|
pkg-config,
|
|
pybind11,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "python-poppler";
|
|
version = "0.4.1";
|
|
pyproject = true;
|
|
|
|
src = fetchPypi {
|
|
inherit version;
|
|
pname = "python_poppler";
|
|
hash = "sha256-5spcI+wCNQvyzvhaa/nxsmF5ZDbbR4F2+dJPsU7uzGo=";
|
|
};
|
|
|
|
patches = [
|
|
# Prevent Meson from downloading pybind11, use system version instead
|
|
./use_system_pybind11.patch
|
|
# Fix build with Poppler 25.01+
|
|
# See: https://github.com/cbrunet/python-poppler/pull/92
|
|
./poppler-25.patch
|
|
];
|
|
|
|
build-system = [ meson-python ];
|
|
|
|
buildInputs = [ pybind11 ];
|
|
|
|
nativeBuildInputs = [
|
|
ninja
|
|
pkg-config
|
|
];
|
|
|
|
propagatedBuildInputs = [ poppler ];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "poppler" ];
|
|
|
|
meta = {
|
|
description = "Python binding to poppler-cpp";
|
|
homepage = "https://github.com/cbrunet/python-poppler";
|
|
changelog = "https://cbrunet.net/python-poppler/changelog.html";
|
|
# Contradictory license definition
|
|
# https://github.com/cbrunet/python-poppler/issues/90
|
|
license = lib.licenses.gpl2Plus;
|
|
maintainers = [ lib.maintainers.onny ];
|
|
};
|
|
}
|