2019-01-31 18:38:32 +00:00
|
|
|
{ lib, fetchFromGitHub, fetchpatch
|
2019-02-12 22:10:44 +00:00
|
|
|
, python3, xdg_utils
|
2018-02-09 12:16:36 +00:00
|
|
|
}:
|
|
|
|
|
2019-02-12 22:10:44 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2018-02-09 12:16:36 +00:00
|
|
|
pname = "papis";
|
2019-02-28 21:42:50 +00:00
|
|
|
version = "0.8.2";
|
2018-02-09 12:16:36 +00:00
|
|
|
|
|
|
|
# Missing tests on Pypi
|
|
|
|
src = fetchFromGitHub {
|
2018-02-21 11:10:38 +00:00
|
|
|
owner = "papis";
|
2018-02-09 12:16:36 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2019-02-28 21:42:50 +00:00
|
|
|
sha256 = "0sa4hpgjvqkjcmp9bjr27b5m5jg4pfspdc8nf1ny80sr0kzn72hb";
|
2019-01-31 18:38:32 +00:00
|
|
|
};
|
2018-02-09 12:16:36 +00:00
|
|
|
|
2019-02-12 22:10:44 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2019-02-27 12:58:43 +00:00
|
|
|
requests filetype pyparsing configparser arxiv2bib
|
|
|
|
pyyaml chardet beautifulsoup4 colorama bibtexparser
|
|
|
|
pylibgen click python-slugify habanero isbnlib
|
|
|
|
prompt_toolkit pygments
|
2019-01-31 18:38:32 +00:00
|
|
|
# optional dependencies
|
2019-02-27 12:58:43 +00:00
|
|
|
jinja2 whoosh
|
2018-02-09 12:16:36 +00:00
|
|
|
];
|
|
|
|
|
2019-02-12 22:10:44 +00:00
|
|
|
checkInputs = (with python3.pkgs; [
|
2019-01-31 18:38:32 +00:00
|
|
|
pytest
|
|
|
|
]) ++ [
|
|
|
|
xdg_utils
|
|
|
|
];
|
2018-02-21 11:10:38 +00:00
|
|
|
|
2019-02-27 12:58:43 +00:00
|
|
|
# most of the downloader tests and 4 other tests require a network connection
|
2019-01-31 18:38:32 +00:00
|
|
|
checkPhase = ''
|
2019-02-27 12:58:43 +00:00
|
|
|
HOME=$(mktemp -d) pytest papis tests --ignore tests/downloaders \
|
|
|
|
-k "not test_get_data and not test_doi_to_data and not test_general and not get_document_url"
|
2018-02-20 22:53:43 +00:00
|
|
|
'';
|
2018-02-09 12:16:36 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Powerful command-line document and bibliography manager";
|
|
|
|
homepage = http://papis.readthedocs.io/en/latest/;
|
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
maintainers = [ lib.maintainers.nico202 ];
|
|
|
|
};
|
|
|
|
}
|