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