2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
arxiv2bib,
|
|
|
|
beautifulsoup4,
|
|
|
|
bibtexparser,
|
|
|
|
buildPythonPackage,
|
|
|
|
chardet,
|
|
|
|
click,
|
|
|
|
colorama,
|
|
|
|
configparser,
|
|
|
|
dominate,
|
|
|
|
fetchFromGitHub,
|
|
|
|
filetype,
|
|
|
|
habanero,
|
|
|
|
isbnlib,
|
|
|
|
lxml,
|
|
|
|
prompt-toolkit,
|
|
|
|
pygments,
|
|
|
|
pyparsing,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-doi,
|
|
|
|
python-slugify,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
pyyaml,
|
|
|
|
requests,
|
|
|
|
stevedore,
|
|
|
|
tqdm,
|
|
|
|
typing-extensions,
|
|
|
|
whoosh,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "papis";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.13";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "papis";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-iRrf37hq+9D01JRaQIqg7yTPbLX6I0ZGnzG3r1DX464=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
arxiv2bib
|
|
|
|
beautifulsoup4
|
|
|
|
bibtexparser
|
|
|
|
chardet
|
|
|
|
click
|
|
|
|
colorama
|
|
|
|
configparser
|
2023-05-24 13:37:59 +00:00
|
|
|
dominate
|
2022-02-10 20:34:41 +00:00
|
|
|
filetype
|
|
|
|
habanero
|
|
|
|
isbnlib
|
|
|
|
lxml
|
|
|
|
prompt-toolkit
|
|
|
|
pygments
|
|
|
|
pyparsing
|
2020-04-24 23:36:52 +00:00
|
|
|
python-doi
|
2022-02-10 20:34:41 +00:00
|
|
|
python-slugify
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
stevedore
|
|
|
|
tqdm
|
|
|
|
typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
whoosh
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-02-10 20:34:41 +00:00
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov=papis" ""
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d);
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "papis tests" ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/downloaders"
|
2023-05-24 13:37:59 +00:00
|
|
|
"papis/downloaders/usenix.py"
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"get_document_url"
|
|
|
|
"match"
|
|
|
|
"test_doi_to_data"
|
|
|
|
"test_downloader_getter"
|
|
|
|
"test_general"
|
2023-05-24 13:37:59 +00:00
|
|
|
"test_get_config_dirs"
|
2024-04-21 15:54:59 +00:00
|
|
|
"test_get_configuration"
|
2022-02-10 20:34:41 +00:00
|
|
|
"test_get_data"
|
2023-05-24 13:37:59 +00:00
|
|
|
"test_valid_dblp_key"
|
2022-02-10 20:34:41 +00:00
|
|
|
"test_validate_arxivid"
|
|
|
|
"test_yaml"
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [ "test_default_opener" ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "papis" ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Powerful command-line document and bibliography manager";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "papis";
|
2022-02-10 20:34:41 +00:00
|
|
|
homepage = "https://papis.readthedocs.io/";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/papis/papis/blob/v${version}/CHANGELOG.md";
|
2022-02-10 20:34:41 +00:00
|
|
|
license = licenses.gpl3Only;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
nico202
|
|
|
|
teto
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|