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-01-31 18:38:32 +00:00
|
|
|
version = "0.7.5";
|
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-01-31 18:38:32 +00:00
|
|
|
sha256 = "1b481sj92z9nw7gwbrpkgd4nlmqc1n73qilkc51k2r56cy1kjvss";
|
2018-02-09 12:16:36 +00:00
|
|
|
};
|
|
|
|
|
2019-01-31 18:38:32 +00:00
|
|
|
# Update click version to 7.0.0
|
|
|
|
patches = fetchpatch {
|
|
|
|
url = https://github.com/papis/papis/commit/fddb80978a37a229300b604c26e992e2dc90913f.patch;
|
|
|
|
sha256 = "0cmagfdaaml1pxhnxggifpb47z5g1p231qywnvnqpd3dm93382w1";
|
|
|
|
};
|
2018-02-09 12:16:36 +00:00
|
|
|
|
2019-02-12 22:10:44 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2019-01-31 18:38:32 +00:00
|
|
|
click requests filetype pyparsing configparser
|
|
|
|
arxiv2bib pyyaml chardet beautifulsoup4 prompt_toolkit
|
|
|
|
bibtexparser python-slugify pyparser pylibgen
|
|
|
|
habanero isbnlib
|
|
|
|
# optional dependencies
|
|
|
|
dmenu-python whoosh
|
2018-02-09 12:16:36 +00:00
|
|
|
];
|
|
|
|
|
2019-01-31 18:38:32 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dt "$out/etc/bash_completion.d" scripts/shell_completion/build/bash/papis
|
|
|
|
'';
|
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-01-31 18:38:32 +00:00
|
|
|
# most of the downloader tests require a network connection
|
|
|
|
checkPhase = ''
|
|
|
|
HOME=$(mktemp -d) pytest papis tests --ignore tests/downloaders
|
2018-02-20 22:53:43 +00:00
|
|
|
'';
|
2018-02-09 12:16:36 +00:00
|
|
|
|
2019-01-31 18:38:32 +00:00
|
|
|
# FIXME: find out why 39 tests fail
|
|
|
|
doCheck = false;
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|