at 23.05-pre 2.0 kB view raw
1{ lib 2, stdenv 3, arxiv2bib 4, beautifulsoup4 5, bibtexparser 6, buildPythonPackage 7, chardet 8, click 9, colorama 10, configparser 11, fetchFromGitHub 12, filetype 13, habanero 14, isbnlib 15, lxml 16, prompt-toolkit 17, pygments 18, pyparsing 19, pytestCheckHook 20, python-doi 21, python-slugify 22, pythonAtLeast 23, pythonOlder 24, pyyaml 25, requests 26, stevedore 27, tqdm 28, typing-extensions 29, whoosh 30, xdg-utils 31}: 32 33buildPythonPackage rec { 34 pname = "papis"; 35 version = "0.12"; 36 format = "setuptools"; 37 38 disabled = pythonOlder "3.7"; 39 40 src = fetchFromGitHub { 41 owner = "papis"; 42 repo = pname; 43 rev = "refs/tags/v${version}"; 44 hash = "sha256-WKsU/5LXqXiFpWyTZGpvZn4lyANPosbvuhYH3opbBRs="; 45 }; 46 47 propagatedBuildInputs = [ 48 arxiv2bib 49 beautifulsoup4 50 bibtexparser 51 chardet 52 click 53 colorama 54 configparser 55 filetype 56 habanero 57 isbnlib 58 lxml 59 prompt-toolkit 60 pygments 61 pyparsing 62 python-doi 63 python-slugify 64 pyyaml 65 requests 66 stevedore 67 tqdm 68 typing-extensions 69 whoosh 70 ]; 71 72 postPatch = '' 73 substituteInPlace setup.py \ 74 --replace "isbnlib>=3.9.1,<3.10" "isbnlib>=3.9" 75 substituteInPlace setup.cfg \ 76 --replace "--cov=papis" "" 77 ''; 78 79 # Tests are failing on Python > 3.9 80 doCheck = !stdenv.isDarwin && !(pythonAtLeast "3.10"); 81 82 checkInputs = ([ 83 pytestCheckHook 84 ]) ++ [ 85 xdg-utils 86 ]; 87 88 preCheck = '' 89 export HOME=$(mktemp -d); 90 ''; 91 92 pytestFlagsArray = [ 93 "papis tests" 94 ]; 95 96 disabledTestPaths = [ 97 "tests/downloaders" 98 ]; 99 100 disabledTests = [ 101 "get_document_url" 102 "match" 103 "test_doi_to_data" 104 "test_downloader_getter" 105 "test_general" 106 "test_get_data" 107 "test_validate_arxivid" 108 "test_yaml" 109 ]; 110 111 pythonImportsCheck = [ 112 "papis" 113 ]; 114 115 meta = with lib; { 116 description = "Powerful command-line document and bibliography manager"; 117 homepage = "https://papis.readthedocs.io/"; 118 license = licenses.gpl3Only; 119 maintainers = with maintainers; [ nico202 teto ]; 120 }; 121}