Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
44 lines
951 B
Nix
44 lines
951 B
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
python3Packages,
|
|
openai,
|
|
pdfminer,
|
|
|
|
withOpenai ? false,
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "pdftitle";
|
|
version = "0.20";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "metebalci";
|
|
repo = "pdftitle";
|
|
tag = "v${version}";
|
|
hash = "sha256-05SaAXYJ7l0ZldYufj0x9mYRwwGT7vlmq9a+ZF4pYiA=";
|
|
};
|
|
|
|
build-system = with python3Packages; [ setuptools ];
|
|
|
|
dependencies =
|
|
with python3Packages;
|
|
[
|
|
pdfminer
|
|
python-dotenv
|
|
]
|
|
++ lib.optional withOpenai openai;
|
|
|
|
pythonImportsCheck = [ "pdftitle" ];
|
|
|
|
meta = {
|
|
description = "Utility to extract the title from a PDF file";
|
|
homepage = "https://github.com/metebalci/pdftitle";
|
|
changelog = "https://github.com/metebalci/pdftitle/blob/v${version}/CHANGELOG.md";
|
|
license = lib.licenses.gpl3Only;
|
|
maintainers = with lib.maintainers; [ dansbandit ];
|
|
mainProgram = "pdftitle";
|
|
};
|
|
}
|