nixpkgs/pkgs/development/python-modules/pdfx/default.nix
adisbladis 02dab4ab5c python3.pkgs.*: Explicitly pass buildPythonPackage format parameter
Long term we should move everything over to `pyproject = true`, but in
the mean time we can work towards deprecating the implicit `format` paremeter.

cc https://github.com/NixOS/nixpkgs/issues/253154
cc @mweinelt @figsoda
2023-12-07 17:46:49 +01:00

31 lines
833 B
Nix

{ lib, buildPythonPackage, fetchFromGitHub, pdfminer-six, chardet, pytestCheckHook }:
buildPythonPackage rec {
pname = "pdfx";
version = "1.4.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "metachris";
repo = "pdfx";
rev = "v${version}";
hash = "sha256-POpP6XwcqwvImrtIiDjpnHoNE0MKapuPjxojo+ocBK0=";
};
postPatch = ''
substituteInPlace requirements.txt \
--replace "chardet==4.0.0" "chardet" \
--replace "pdfminer.six==20201018" "pdfminer.six"
'';
propagatedBuildInputs = [ pdfminer-six chardet ];
nativeCheckInputs = [ pytestCheckHook ];
meta = with lib; {
inherit (src.meta) homepage;
description = "Extract references (pdf, url, doi, arxiv) and metadata from a PDF";
license = licenses.asl20;
maintainers = with maintainers; [ marsam ];
};
}