2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools-scm,
|
|
|
|
requests,
|
|
|
|
tqdm,
|
|
|
|
nose,
|
|
|
|
vcrpy,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "habanero";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.2.6";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sckott";
|
|
|
|
repo = pname;
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-Pw0TgXxDRmR565hdNGipfDZ7P32pxWkmPWfaYK0RaI4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
tqdm
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
vcrpy
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "habanero" ];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
# almost the entirety of the test suite makes network calls
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "test/test-filters.py" ];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python interface to Library Genesis";
|
2022-03-30 09:31:56 +00:00
|
|
|
homepage = "https://habanero.readthedocs.io/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nico202 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|