My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/python-modules/pdfx/default.nix

30 lines
796 B

{ 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" \
--replace "pdfminer.six==20201018" "pdfminer.six"
'';
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 ];
};
}