depot/third_party/nixpkgs/pkgs/development/python-modules/pdfx/default.nix
Default email 3a4df29a92 Project import generated by Copybara.
GitOrigin-RevId: 3d7435c638baffaa826b85459df0fff47f12317d
2022-06-16 19:23:12 +02:00

30 lines
804 B
Nix

{ lib, buildPythonPackage, fetchFromGitHub, pdfminer-six, chardet, pytestCheckHook }:
buildPythonPackage rec {
pname = "pdfx";
version = "1.4.1";
src = fetchFromGitHub {
owner = "metachris";
repo = "pdfx";
rev = "v${version}";
sha256 = "sha256-POpP6XwcqwvImrtIiDjpnHoNE0MKapuPjxojo+ocBK0=";
};
postPatch = ''
substituteInPlace requirements.txt \
--replace "chardet==4.0.0" "chardet" \
--replace "pdfminer.six==20201018" "pdfminer.six"
'';
propagatedBuildInputs = [ pdfminer-six chardet ];
checkInputs = [ 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 ];
};
}