depot/third_party/nixpkgs/pkgs/development/python-modules/pdfx/default.nix
Default email 408a0d163f Project import generated by Copybara.
GitOrigin-RevId: e019872af81e4013fd518fcacfba74b1de21a50e
2021-04-13 15:44:15 -04:00

29 lines
738 B
Nix

{ lib, buildPythonPackage, fetchFromGitHub, pdfminer, 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"
'';
propagatedBuildInputs = [ pdfminer 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 ];
};
}