Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 54 lines 1.6 kB view raw
1{ lib, buildPythonPackage, fetchFromGitHub, xdg_utils 2, requests, filetype, pyparsing, configparser, arxiv2bib 3, pyyaml, chardet, beautifulsoup4, colorama, bibtexparser 4, pylibgen, click, python-slugify, habanero, isbnlib 5, prompt_toolkit, pygments 6#, optional, dependencies 7, jinja2, whoosh, pytest 8, stdenv 9}: 10 11buildPythonPackage rec { 12 pname = "papis"; 13 version = "0.8.2"; 14 15 # Missing tests on Pypi 16 src = fetchFromGitHub { 17 owner = "papis"; 18 repo = pname; 19 rev = "v${version}"; 20 sha256 = "0sa4hpgjvqkjcmp9bjr27b5m5jg4pfspdc8nf1ny80sr0kzn72hb"; 21 }; 22 23 propagatedBuildInputs = [ 24 requests filetype pyparsing configparser arxiv2bib 25 pyyaml chardet beautifulsoup4 colorama bibtexparser 26 pylibgen click python-slugify habanero isbnlib 27 prompt_toolkit pygments 28 # optional dependencies 29 jinja2 whoosh 30 ]; 31 32 doCheck = !stdenv.isDarwin; 33 34 checkInputs = ([ 35 pytest 36 ]) ++ [ 37 xdg_utils 38 ]; 39 40 # most of the downloader tests and 4 other tests require a network connection 41 # test_export_yaml and test_citations check for the exact output produced by pyyaml 3.x and 42 # fail with 5.x 43 checkPhase = '' 44 HOME=$(mktemp -d) pytest papis tests --ignore tests/downloaders \ 45 -k "not test_get_data and not test_doi_to_data and not test_general and not get_document_url and not test_export_yaml and not test_citations" 46 ''; 47 48 meta = { 49 description = "Powerful command-line document and bibliography manager"; 50 homepage = https://papis.readthedocs.io/en/latest/; 51 license = lib.licenses.gpl3; 52 maintainers = with lib.maintainers; [ nico202 teto ]; 53 }; 54}