nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 50 lines 1.0 kB view raw
1{ 2 lib, 3 python3Packages, 4 fetchFromGitHub, 5}: 6 7python3Packages.buildPythonApplication rec { 8 pname = "tocpdf"; 9 version = "0.3.9"; 10 pyproject = true; 11 12 src = fetchFromGitHub { 13 owner = "kszenes"; 14 repo = "tocPDF"; 15 rev = "v${version}"; 16 hash = "sha256-RaNMhEgJ2pSL9BvK1d2Z8AsUPhARaRtEiCnt/2E2uNs="; 17 }; 18 19 build-system = with python3Packages; [ 20 setuptools 21 ]; 22 23 dependencies = with python3Packages; [ 24 click 25 pdfplumber 26 pypdf 27 tika 28 tqdm 29 ]; 30 31 nativeCheckInputs = with python3Packages; [ 32 pytestCheckHook 33 ]; 34 35 disabledTests = [ 36 # touches network 37 "test_read_toc" 38 ]; 39 40 pythonImportsCheck = [ "tocPDF" ]; 41 42 meta = { 43 description = "Automatic CLI tool for generating outline of PDFs based on the table of contents"; 44 homepage = "https://github.com/kszenes/tocPDF"; 45 changelog = "https://github.com/kszenes/tocPDF/releases/tag/v${version}"; 46 license = lib.licenses.mit; 47 maintainers = with lib.maintainers; [ dansbandit ]; 48 mainProgram = "tocPDF"; 49 }; 50}