nixpkgs/pkgs/by-name/to/tocpdf/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.0 KiB
Nix
Raw Normal View History

2024-06-11 21:45:48 +00:00
{
lib,
python3Packages,
2024-10-11 18:48:28 +00:00
fetchFromGitHub,
2024-06-11 21:45:48 +00:00
}:
python3Packages.buildPythonApplication rec {
pname = "tocpdf";
2024-10-11 18:48:28 +00:00
version = "0.3.9";
2024-06-11 21:45:48 +00:00
pyproject = true;
2024-10-11 18:48:28 +00:00
src = fetchFromGitHub {
owner = "kszenes";
repo = "tocPDF";
rev = "v${version}";
hash = "sha256-RaNMhEgJ2pSL9BvK1d2Z8AsUPhARaRtEiCnt/2E2uNs=";
2024-06-11 21:45:48 +00:00
};
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
click
pdfplumber
pypdf
tika
tqdm
];
2024-10-11 18:48:28 +00:00
nativeCheckInputs = with python3Packages; [
pytestCheckHook
];
disabledTests = [
# touches network
"test_read_toc"
];
2024-06-11 21:45:48 +00:00
pythonImportsCheck = [ "tocPDF" ];
meta = {
description = "Automatic CLI tool for generating outline of PDFs based on the table of contents";
homepage = "https://github.com/kszenes/tocPDF";
2024-10-11 18:48:28 +00:00
changelog = "https://github.com/kszenes/tocPDF/releases/tag/v${version}";
2024-06-11 21:45:48 +00:00
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dansbandit ];
mainProgram = "tocPDF";
};
}